vercel 60.1.1 → 60.1.3
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/chunks/{add-QBCRXMR3.js → add-5INBQVKB.js} +1 -1
- package/dist/chunks/{add-JKIDAH7K.js → add-IEQXYKXU.js} +1 -1
- package/dist/chunks/{add-D6D2J6ID.js → add-QJSYPE26.js} +1 -1
- package/dist/chunks/{build-PP4JOW2C.js → build-Z7KM3GMP.js} +1 -1
- package/dist/chunks/{chunk-7HT5KIFA.js → chunk-25LSRUTF.js} +1 -1
- package/dist/chunks/{chunk-2ZIWDSUX.js → chunk-3HLNS2I4.js} +1 -1
- package/dist/chunks/{chunk-3KQRJYBJ.js → chunk-3MVT26LH.js} +1 -1
- package/dist/chunks/{chunk-M6UYGRPW.js → chunk-7CTHRXTG.js} +1 -1
- package/dist/chunks/{chunk-YG6LPJFT.js → chunk-7QVVD3WT.js} +1 -1
- package/dist/chunks/{chunk-7JAKGIQ6.js → chunk-B6PMTBCU.js} +1 -1
- package/dist/chunks/{chunk-GK5C5TE5.js → chunk-BEGUGOL7.js} +1 -1
- package/dist/chunks/{chunk-SGU7YIY3.js → chunk-BHVHQKUZ.js} +1 -1
- package/dist/chunks/{chunk-2TBUMUHF.js → chunk-CN4SCEIP.js} +1 -1
- package/dist/chunks/{chunk-Q5VLP2LY.js → chunk-D2ZPYXZ6.js} +1 -1
- package/dist/chunks/{chunk-CD4FLZED.js → chunk-DV4Z4WSD.js} +1 -1
- package/dist/chunks/{chunk-77WAICTF.js → chunk-E3EJLJFQ.js} +1 -1
- package/dist/chunks/{chunk-WUH5HYCX.js → chunk-FZKWLGRG.js} +1 -1
- package/dist/chunks/{chunk-ZWYU5SBC.js → chunk-GL7HB5ZK.js} +1 -1
- package/dist/chunks/{chunk-G77TCKNI.js → chunk-HJ3E752K.js} +1 -1
- package/dist/chunks/{chunk-LNOX5GIA.js → chunk-IS43O66T.js} +1 -1
- package/dist/chunks/{chunk-GZBSABCA.js → chunk-JM3BFUXX.js} +1 -1
- package/dist/chunks/{chunk-4S6WFNRF.js → chunk-JZUVWAOK.js} +2 -2
- package/dist/chunks/chunk-LAYFSD5A.js +7 -0
- package/dist/chunks/{chunk-4OKKSZVX.js → chunk-LFQTA3CF.js} +1 -1
- package/dist/chunks/{chunk-KTB75ID3.js → chunk-M5Y335WI.js} +1 -1
- package/dist/chunks/{chunk-6A6LV2S2.js → chunk-MDZ2JJP3.js} +1 -1
- package/dist/chunks/{chunk-IXN5A5WZ.js → chunk-NR367IWV.js} +1 -1
- package/dist/chunks/{chunk-JMNAVONO.js → chunk-OCWSKPV4.js} +1 -1
- package/dist/chunks/{chunk-YMLWTVT5.js → chunk-QLS2XUFL.js} +1 -1
- package/dist/chunks/{chunk-RB3NPNPD.js → chunk-QVAZWF3J.js} +1 -1
- package/dist/chunks/{chunk-DPH3CQXE.js → chunk-R7ZRVA7E.js} +2 -2
- package/dist/chunks/{chunk-HMB4MZOB.js → chunk-RMYQX7NP.js} +1 -1
- package/dist/chunks/{chunk-C6QYMZ3S.js → chunk-TAG2AZXS.js} +1 -1
- package/dist/chunks/{chunk-RLCFE3MK.js → chunk-TTKDYUJD.js} +3 -3
- package/dist/chunks/{chunk-MSLHCYBD.js → chunk-U6AYMUHX.js} +2 -2
- package/dist/chunks/{chunk-URI72S7J.js → chunk-UFZ4W2PA.js} +1 -1
- package/dist/chunks/{chunk-VVWALKUM.js → chunk-UO2ECTIU.js} +1 -1
- package/dist/chunks/{chunk-STO2JRII.js → chunk-V54UKUGF.js} +1 -1
- package/dist/chunks/{chunk-3CQQXHDI.js → chunk-VCB6KNW3.js} +1 -1
- package/dist/chunks/chunk-W26LLGQV.js +7 -0
- package/dist/chunks/{chunk-H4IUDU5W.js → chunk-YXBDDHPL.js} +1 -1
- package/dist/chunks/{chunk-LUVIR6F2.js → chunk-YXTE2H6I.js} +1 -1
- package/dist/chunks/{clear-TQFWNYKK.js → clear-AZWSIGIF.js} +1 -1
- package/dist/chunks/{compile-vercel-config-YY3CODZP.js → compile-vercel-config-56X2X4Z3.js} +1 -1
- package/dist/chunks/{config-4FCRR7C5.js → config-A53AXEGB.js} +1 -1
- package/dist/chunks/{config-VZQLRHHA.js → config-NGVEJABO.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-MPLEIGYN.js → delete-LX44AJYC.js} +1 -1
- package/dist/chunks/{delete-L45TA4WK.js → delete-TA6UVDSJ.js} +1 -1
- package/dist/chunks/{detect-projects-3AFQ2AC5.js → detect-projects-LEVGWMQE.js} +1 -1
- package/dist/chunks/{detect-services-7QL6RPKV.js → detect-services-KO3GQ2ZK.js} +1 -1
- package/dist/chunks/{disable-WY6N4R7I.js → disable-E7TU3QIX.js} +1 -1
- package/dist/chunks/{discard-3VYFSUTH.js → discard-SVF5HBYG.js} +1 -1
- package/dist/chunks/{edit-VOZ4IKZI.js → edit-2RLFRAOJ.js} +1 -1
- package/dist/chunks/{edit-FCPWK252.js → edit-VCOF42GW.js} +1 -1
- package/dist/chunks/{enable-IJ7UEQ3G.js → enable-H6RL2XIW.js} +1 -1
- package/dist/chunks/{export-L4D4GCJI.js → export-JW3FFP7N.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-GSWBCLZX.js → generate-cert-for-deploy-25UQ2477.js} +1 -1
- package/dist/chunks/{image-ORGBK7MR.js → image-MHAVMOJB.js} +1 -1
- package/dist/chunks/{import-builders-N4XIYEW5.js → import-builders-5UODCCVF.js} +1 -1
- package/dist/chunks/{inspect-377IAEIY.js → inspect-43UJHR4K.js} +1 -1
- package/dist/chunks/{inspect-V6IX3MOJ.js → inspect-HJF2XFBX.js} +1 -1
- package/dist/chunks/{inspect-F4OENUQT.js → inspect-KBJ7F64J.js} +1 -1
- package/dist/chunks/{inspect-GTALMRKE.js → inspect-LIGFVYDM.js} +1 -1
- package/dist/chunks/{inspect-2EMBEQHZ.js → inspect-VETXDYUD.js} +1 -1
- package/dist/chunks/{list-57XWFXDW.js → list-EGYYRTG5.js} +1 -1
- package/dist/chunks/{list-GKXJQRX6.js → list-KAGIR3PD.js} +1 -1
- package/dist/chunks/{list-5ZBTU324.js → list-NAABRL7N.js} +1 -1
- package/dist/chunks/{login-MQXAAFBP.js → login-MZ67I5ZB.js} +1 -1
- package/dist/chunks/{logs-ZYELN5F2.js → logs-GHHH2DZA.js} +1 -1
- package/dist/chunks/{ls-AAU7AKS7.js → ls-7JFKEA5P.js} +1 -1
- package/dist/chunks/{ls-POKSXYZU.js → ls-GOLB26ER.js} +1 -1
- package/dist/chunks/{ls-VYEJT272.js → ls-JHJPWFMF.js} +1 -1
- package/dist/chunks/{ls-LMHRMNKE.js → ls-MMA5XS6S.js} +1 -1
- package/dist/chunks/{ls-NX3EMRFH.js → ls-QXEB3MBD.js} +1 -1
- package/dist/chunks/{ls-GD6LB7IE.js → ls-UAQ2QDGG.js} +1 -1
- package/dist/chunks/{ls-ADATML6R.js → ls-YA4OQL3F.js} +1 -1
- package/dist/chunks/{mutate-QMU5QHF3.js → mutate-AJYMI5UB.js} +1 -1
- package/dist/chunks/{notifications-OYUKYMU7.js → notifications-DKZMDRHS.js} +1 -1
- package/dist/chunks/{open-SNN3JPON.js → open-L5DJKOV4.js} +1 -1
- package/dist/chunks/{permissions-5LSKNTW7.js → permissions-BRSVLT6O.js} +1 -1
- package/dist/chunks/{publish-FIHJARRJ.js → publish-PXKC5GXE.js} +1 -1
- package/dist/chunks/{pull-2M2BJYAS.js → pull-ZBELCNJJ.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-VKWKDDUD.js → purchase-domain-if-available-BI7AHJMX.js} +1 -1
- package/dist/chunks/{push-VN6BPT3B.js → push-G4JYPC5S.js} +1 -1
- package/dist/chunks/{query-P35ZTMXV.js → query-JGUDFRPJ.js} +1 -1
- package/dist/chunks/{reorder-L4L2V3MZ.js → reorder-VTFBS2DW.js} +1 -1
- package/dist/chunks/{reply-XIJ54B7U.js → reply-HXGAMNR6.js} +1 -1
- package/dist/chunks/{resolve-W2O6M4GH.js → resolve-IGQSKGRI.js} +1 -1
- package/dist/chunks/{restore-OZPJHXTE.js → restore-XKLJMOKB.js} +1 -1
- package/dist/chunks/{rm-IM7VAVCG.js → rm-3REOGKTJ.js} +1 -1
- package/dist/chunks/{rm-4EUHQZ7U.js → rm-C2OYOAJY.js} +1 -1
- package/dist/chunks/{rm-OYSWVVSJ.js → rm-DL7NRDLF.js} +1 -1
- package/dist/chunks/{rm-2YDLXDCB.js → rm-DTF2JN5L.js} +1 -1
- package/dist/chunks/{rm-HM7V26WX.js → rm-SQM4TQOV.js} +1 -1
- package/dist/chunks/{rule-inspect-75RUPIVB.js → rule-inspect-PQUJOWHR.js} +1 -1
- package/dist/chunks/{rules-PKOTTFKG.js → rules-IX7WN6XW.js} +1 -1
- package/dist/chunks/{schema-EPUGS3PX.js → schema-R2J4TS6Q.js} +1 -1
- package/dist/chunks/{schema-NJC47D5M.js → schema-WFKR7ULE.js} +1 -1
- package/dist/chunks/{set-GESKJPQA.js → set-763MJP2G.js} +1 -1
- package/dist/chunks/{setup-and-link-PM46H7GU.js → setup-and-link-57NI3GOM.js} +1 -1
- package/dist/chunks/{tags-MBJR7IQW.js → tags-FE4GVQQO.js} +1 -1
- package/dist/chunks/{update-TNUYPCS3.js → update-27EMACWZ.js} +1 -1
- package/dist/chunks/vlt-builder-importer-QEWS6M2P.js +11 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +3 -3
- package/dist/commands/dev/index.js +5 -5
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands-bulk.js +20 -16
- package/dist/index.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +53 -53
- package/dist/chunks/chunk-6PFC3KWQ.js +0 -7
- package/dist/chunks/chunk-VHTNAYWA.js +0 -7
- package/dist/chunks/vlt-builder-importer-6DGKK72W.js +0 -11
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{displayDetectedServices,readConfig,setupAndLink}from"../../chunks/chunk-C6QYMZ3S.js";import{tryDetectServices}from"../../chunks/chunk-7JAKGIQ6.js";import"../../chunks/chunk-VVWALKUM.js";import{import_write_build_result,require_detect_builders_with_services,require_get_files,require_mime_types,require_service_schedules}from"../../chunks/chunk-3CQQXHDI.js";import{importBuilders,require_npa}from"../../chunks/chunk-4S6WFNRF.js";import"../../chunks/chunk-CJPM2DXZ.js";import"../../chunks/chunk-7RR7MIMT.js";import"../../chunks/chunk-QHJLRTVY.js";import{require_fast_deep_equal}from"../../chunks/chunk-4MZK6JT6.js";import"../../chunks/chunk-3B4P7YHO.js";import{getUpdateCommand}from"../../chunks/chunk-Q5VLP2LY.js";import"../../chunks/chunk-KKS7XWEX.js";import{readJSONFile}from"../../chunks/chunk-LNOX5GIA.js";import"../../chunks/chunk-YMLWTVT5.js";import"../../chunks/chunk-XQQGQ55A.js";import"../../chunks/chunk-2H77IRPI.js";import{pickOverrides,require_dist as require_dist5}from"../../chunks/chunk-MSLHCYBD.js";import"../../chunks/chunk-OHDEHZLX.js";import"../../chunks/chunk-M2W3HKV3.js";import"../../chunks/chunk-PHW54NU5.js";import"../../chunks/chunk-V6MR45PD.js";import"../../chunks/chunk-HWWHR7H3.js";import"../../chunks/chunk-2I64AYHG.js";import{require_ms}from"../../chunks/chunk-QTKJC2O5.js";import{promptExperimentalServicesMigration}from"../../chunks/chunk-GZBSABCA.js";import{validateConfig}from"../../chunks/chunk-VHTNAYWA.js";import{require_brace_expansion,require_dist as require_dist3,require_dist2 as require_dist4,require_minimatch}from"../../chunks/chunk-JMNAVONO.js";import{require_main}from"../../chunks/chunk-3KQRJYBJ.js";import"../../chunks/chunk-P2O5DOYE.js";import{require_inherits}from"../../chunks/chunk-L3JDEHCQ.js";import{VERCEL_OIDC_TOKEN,pullEnvRecords}from"../../chunks/chunk-M6UYGRPW.js";import"../../chunks/chunk-ZWYU5SBC.js";import"../../chunks/chunk-H4FTGLWV.js";import"../../chunks/chunk-ULLWCOYC.js";import{require_json_parse_better_errors}from"../../chunks/chunk-N6CNMMSZ.js";import"../../chunks/chunk-I46LFJJG.js";import{getSubcommand}from"../../chunks/chunk-ETV3C2CV.js";import"../../chunks/chunk-OI263FBO.js";import"../../chunks/chunk-STO2JRII.js";import{printProjectNotFoundError}from"../../chunks/chunk-GK5C5TE5.js";import"../../chunks/chunk-WUH5HYCX.js";import{require_frameworks}from"../../chunks/chunk-KK4AJES5.js";import{DEV_QUEUE_API_PREFIX,DEV_QUEUE_DEFAULT_PORT,DEV_QUEUE_PROXY_PREFIX,DEV_RESOURCE_TOKEN,DEV_RUNTIME_CACHE_DEFAULT_PORT,DEV_SCHEDULES_DEFAULT_PORT,DEV_SCHEDULES_PROXY_PREFIX,devCommand,getDevQueueEnv,getDevSchedulesEnv,isValidDevResourceHost,listenOnDevResourcePort}from"../../chunks/chunk-WSZHNPA6.js";import{require_dist as require_dist2}from"../../chunks/chunk-FAW6NBLQ.js";import"../../chunks/chunk-5UOVEMYX.js";import"../../chunks/chunk-SOJCELXH.js";import{param}from"../../chunks/chunk-SXUEGVWB.js";import"../../chunks/chunk-6BZCSVH6.js";import{help}from"../../chunks/chunk-5U25FWD5.js";import"../../chunks/chunk-6TAQ6OWD.js";import"../../chunks/chunk-R3B67TKQ.js";import"../../chunks/chunk-C5KVTG2O.js";import"../../chunks/chunk-6NPXWN5F.js";import"../../chunks/chunk-WPS6JZF6.js";import{detectExplicitScope,getLocalPathConfig,highlight}from"../../chunks/chunk-4OKKSZVX.js";import{getGlobalPathConfig}from"../../chunks/chunk-JSKGZLE4.js";import{TelemetryClient}from"../../chunks/chunk-A5VLP25I.js";import"../../chunks/chunk-RCTYVKM5.js";import{isNativeBinaryInstall}from"../../chunks/chunk-7T6TL3GQ.js";import"../../chunks/chunk-GHM7V3GG.js";import"../../chunks/chunk-5XJNPXQK.js";import{printError}from"../../chunks/chunk-N5AIKGEO.js";import{parseArguments}from"../../chunks/chunk-WWB66KP5.js";import{directFetch}from"../../chunks/chunk-MY4MONOH.js";import{VERCEL_DIR,findRepoRoot,getLinkedProject,getVercelDirectory,require_lib,require_pluralize,resolveProjectCwd}from"../../chunks/chunk-RLCFE3MK.js";import"../../chunks/chunk-F2ZWW2IO.js";import"../../chunks/chunk-B4ATVYZW.js";import"../../chunks/chunk-PPCFQQSU.js";import"../../chunks/chunk-BRK4OB4B.js";import"../../chunks/chunk-OSCCYU74.js";import{buildCommandWithYes,outputActionRequired}from"../../chunks/chunk-KCARCOP5.js";import"../../chunks/chunk-BKV35LVB.js";import{getFlagsSpecification}from"../../chunks/chunk-JAJW3P42.js";import{printAlignedLabel}from"../../chunks/chunk-YMM3VY3J.js";import"../../chunks/chunk-SM5JI6QM.js";import"../../chunks/chunk-VOZEB6PD.js";import{CantParseJSONFile,LambdaSizeExceededError,MissingDotenvVarsError,NowError,require_bytes}from"../../chunks/chunk-RINZXCDJ.js";import{cmd,getCommandName,getCommandNamePlain,getTitleName}from"../../chunks/chunk-FI772UVH.js";import{Diagnostic,defineDiagnostics,link_default,output_manager_default,require_build_utils}from"../../chunks/chunk-EWWFNMPZ.js";import{require_dist}from"../../chunks/chunk-QGIQK47P.js";import{pkg_default}from"../../chunks/chunk-AVSPFBLM.js";import"../../chunks/chunk-XCJDGQO7.js";import"../../chunks/chunk-YPTLSODC.js";import"../../chunks/chunk-7HL2RPUO.js";import{require_source}from"../../chunks/chunk-U7KCDTCH.js";import{require_supports_color}from"../../chunks/chunk-N3ZZ7FHQ.js";import"../../chunks/chunk-GU6VIFR5.js";import{__commonJS,__require,__toESM}from"../../chunks/chunk-6L236MNA.js";var require_bytes2=__commonJS({"../../node_modules/.pnpm/bytes@3.1.0/node_modules/bytes/index.js"(exports2,module2){"use strict";module2.exports=bytes2;module2.exports.format=format;module2.exports.parse=parse2;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function bytes2(value,options){return typeof value=="string"?parse2(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.pb?unit="PB":mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse2(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});var require_callsite_tostring=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/callsite-tostring.js"(exports2,module2){"use strict";module2.exports=callSiteToString2;function callSiteFileLocation(callSite){var fileName,fileLocation="";if(callSite.isNative()?fileLocation="native":callSite.isEval()?(fileName=callSite.getScriptNameOrSourceURL(),fileName||(fileLocation=callSite.getEvalOrigin())):fileName=callSite.getFileName(),fileName){fileLocation+=fileName;var lineNumber=callSite.getLineNumber();if(lineNumber!=null){fileLocation+=":"+lineNumber;var columnNumber=callSite.getColumnNumber();columnNumber&&(fileLocation+=":"+columnNumber)}}return fileLocation||"unknown source"}function callSiteToString2(callSite){var addSuffix=!0,fileLocation=callSiteFileLocation(callSite),functionName=callSite.getFunctionName(),isConstructor=callSite.isConstructor(),isMethodCall=!(callSite.isToplevel()||isConstructor),line="";if(isMethodCall){var methodName=callSite.getMethodName(),typeName=getConstructorName(callSite);functionName?(typeName&&functionName.indexOf(typeName)!==0&&(line+=typeName+"."),line+=functionName,methodName&&functionName.lastIndexOf("."+methodName)!==functionName.length-methodName.length-1&&(line+=" [as "+methodName+"]")):line+=typeName+"."+(methodName||"<anonymous>")}else isConstructor?line+="new "+(functionName||"<anonymous>"):functionName?line+=functionName:(addSuffix=!1,line+=fileLocation);return addSuffix&&(line+=" ("+fileLocation+")"),line}function getConstructorName(obj){var receiver=obj.receiver;return receiver.constructor&&receiver.constructor.name||null}}});var require_event_listener_count=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/event-listener-count.js"(exports2,module2){"use strict";module2.exports=eventListenerCount2;function eventListenerCount2(emitter,type){return emitter.listeners(type).length}}});var require_compat=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js"(exports2,module2){"use strict";var EventEmitter=__require("events").EventEmitter;lazyProperty(module2.exports,"callSiteToString",function(){var limit=Error.stackTraceLimit,obj={},prep=Error.prepareStackTrace;function prepareObjectStackTrace2(obj2,stack3){return stack3}Error.prepareStackTrace=prepareObjectStackTrace2,Error.stackTraceLimit=2,Error.captureStackTrace(obj);var stack2=obj.stack.slice();return Error.prepareStackTrace=prep,Error.stackTraceLimit=limit,stack2[0].toString?toString:require_callsite_tostring()});lazyProperty(module2.exports,"eventListenerCount",function(){return EventEmitter.listenerCount||require_event_listener_count()});function lazyProperty(obj,prop,getter){function get(){var val=getter();return Object.defineProperty(obj,prop,{configurable:!0,enumerable:!0,value:val}),val}Object.defineProperty(obj,prop,{configurable:!0,enumerable:!0,get})}function toString(obj){return obj.toString()}}});var require_depd=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/index.js"(exports,module){var callSiteToString=require_compat().callSiteToString,eventListenerCount=require_compat().eventListenerCount,relative=__require("path").relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(str,namespace){for(var vals=str.split(/[ ,]+/),ns=String(namespace).toLowerCase(),i=0;i<vals.length;i++){var val=vals[i];if(val&&(val==="*"||val.toLowerCase()===ns))return!0}return!1}function convertDataDescriptorToAccessor(obj,prop,message2){var descriptor=Object.getOwnPropertyDescriptor(obj,prop),value=descriptor.value;return descriptor.get=function(){return value},descriptor.writable&&(descriptor.set=function(val){return value=val}),delete descriptor.value,delete descriptor.writable,Object.defineProperty(obj,prop,descriptor),descriptor}function createArgumentsString(arity){for(var str="",i=0;i<arity;i++)str+=", arg"+i;return str.substr(2)}function createStackString(stack2){var str=this.name+": "+this.namespace;this.message&&(str+=" deprecated "+this.message);for(var i=0;i<stack2.length;i++)str+=`
|
|
7
|
+
import{displayDetectedServices,readConfig,setupAndLink}from"../../chunks/chunk-TAG2AZXS.js";import{tryDetectServices}from"../../chunks/chunk-B6PMTBCU.js";import"../../chunks/chunk-UO2ECTIU.js";import{import_write_build_result,require_detect_builders_with_services,require_get_files,require_mime_types,require_service_schedules}from"../../chunks/chunk-VCB6KNW3.js";import{importBuilders,require_npa}from"../../chunks/chunk-JZUVWAOK.js";import"../../chunks/chunk-CJPM2DXZ.js";import"../../chunks/chunk-7RR7MIMT.js";import"../../chunks/chunk-QHJLRTVY.js";import{require_fast_deep_equal}from"../../chunks/chunk-4MZK6JT6.js";import"../../chunks/chunk-3B4P7YHO.js";import{getUpdateCommand}from"../../chunks/chunk-D2ZPYXZ6.js";import"../../chunks/chunk-KKS7XWEX.js";import{readJSONFile}from"../../chunks/chunk-IS43O66T.js";import"../../chunks/chunk-QLS2XUFL.js";import"../../chunks/chunk-XQQGQ55A.js";import"../../chunks/chunk-2H77IRPI.js";import{pickOverrides,require_dist as require_dist5}from"../../chunks/chunk-U6AYMUHX.js";import"../../chunks/chunk-OHDEHZLX.js";import"../../chunks/chunk-M2W3HKV3.js";import"../../chunks/chunk-PHW54NU5.js";import"../../chunks/chunk-V6MR45PD.js";import"../../chunks/chunk-HWWHR7H3.js";import"../../chunks/chunk-2I64AYHG.js";import{require_ms}from"../../chunks/chunk-QTKJC2O5.js";import{promptExperimentalServicesMigration}from"../../chunks/chunk-JM3BFUXX.js";import{validateConfig}from"../../chunks/chunk-LAYFSD5A.js";import{require_brace_expansion,require_dist as require_dist3,require_dist2 as require_dist4,require_minimatch}from"../../chunks/chunk-OCWSKPV4.js";import{require_main}from"../../chunks/chunk-3MVT26LH.js";import"../../chunks/chunk-P2O5DOYE.js";import{require_inherits}from"../../chunks/chunk-L3JDEHCQ.js";import{VERCEL_OIDC_TOKEN,pullEnvRecords}from"../../chunks/chunk-7CTHRXTG.js";import"../../chunks/chunk-GL7HB5ZK.js";import"../../chunks/chunk-H4FTGLWV.js";import"../../chunks/chunk-ULLWCOYC.js";import{require_json_parse_better_errors}from"../../chunks/chunk-N6CNMMSZ.js";import"../../chunks/chunk-I46LFJJG.js";import{getSubcommand}from"../../chunks/chunk-ETV3C2CV.js";import"../../chunks/chunk-OI263FBO.js";import"../../chunks/chunk-V54UKUGF.js";import{printProjectNotFoundError}from"../../chunks/chunk-BEGUGOL7.js";import"../../chunks/chunk-FZKWLGRG.js";import{require_frameworks}from"../../chunks/chunk-KK4AJES5.js";import{DEV_QUEUE_API_PREFIX,DEV_QUEUE_DEFAULT_PORT,DEV_QUEUE_PROXY_PREFIX,DEV_RESOURCE_TOKEN,DEV_RUNTIME_CACHE_DEFAULT_PORT,DEV_SCHEDULES_DEFAULT_PORT,DEV_SCHEDULES_PROXY_PREFIX,devCommand,getDevQueueEnv,getDevSchedulesEnv,isValidDevResourceHost,listenOnDevResourcePort}from"../../chunks/chunk-WSZHNPA6.js";import{require_dist as require_dist2}from"../../chunks/chunk-FAW6NBLQ.js";import"../../chunks/chunk-5UOVEMYX.js";import"../../chunks/chunk-SOJCELXH.js";import{param}from"../../chunks/chunk-SXUEGVWB.js";import"../../chunks/chunk-6BZCSVH6.js";import{help}from"../../chunks/chunk-5U25FWD5.js";import"../../chunks/chunk-6TAQ6OWD.js";import"../../chunks/chunk-R3B67TKQ.js";import"../../chunks/chunk-C5KVTG2O.js";import"../../chunks/chunk-6NPXWN5F.js";import"../../chunks/chunk-WPS6JZF6.js";import{detectExplicitScope,getLocalPathConfig,highlight}from"../../chunks/chunk-LFQTA3CF.js";import{getGlobalPathConfig}from"../../chunks/chunk-JSKGZLE4.js";import{TelemetryClient}from"../../chunks/chunk-A5VLP25I.js";import"../../chunks/chunk-RCTYVKM5.js";import{isNativeBinaryInstall}from"../../chunks/chunk-7T6TL3GQ.js";import"../../chunks/chunk-GHM7V3GG.js";import"../../chunks/chunk-5XJNPXQK.js";import{printError}from"../../chunks/chunk-N5AIKGEO.js";import{parseArguments}from"../../chunks/chunk-WWB66KP5.js";import{directFetch}from"../../chunks/chunk-MY4MONOH.js";import{VERCEL_DIR,findRepoRoot,getLinkedProject,getVercelDirectory,require_lib,require_pluralize,resolveProjectCwd}from"../../chunks/chunk-TTKDYUJD.js";import"../../chunks/chunk-F2ZWW2IO.js";import"../../chunks/chunk-B4ATVYZW.js";import"../../chunks/chunk-PPCFQQSU.js";import"../../chunks/chunk-BRK4OB4B.js";import"../../chunks/chunk-OSCCYU74.js";import{buildCommandWithYes,outputActionRequired}from"../../chunks/chunk-KCARCOP5.js";import"../../chunks/chunk-BKV35LVB.js";import{getFlagsSpecification}from"../../chunks/chunk-JAJW3P42.js";import{printAlignedLabel}from"../../chunks/chunk-YMM3VY3J.js";import"../../chunks/chunk-SM5JI6QM.js";import"../../chunks/chunk-VOZEB6PD.js";import{CantParseJSONFile,LambdaSizeExceededError,MissingDotenvVarsError,NowError,require_bytes}from"../../chunks/chunk-RINZXCDJ.js";import{cmd,getCommandName,getCommandNamePlain,getTitleName}from"../../chunks/chunk-FI772UVH.js";import{Diagnostic,defineDiagnostics,link_default,output_manager_default,require_build_utils}from"../../chunks/chunk-EWWFNMPZ.js";import{require_dist}from"../../chunks/chunk-QGIQK47P.js";import{pkg_default}from"../../chunks/chunk-AVSPFBLM.js";import"../../chunks/chunk-XCJDGQO7.js";import"../../chunks/chunk-YPTLSODC.js";import"../../chunks/chunk-7HL2RPUO.js";import{require_source}from"../../chunks/chunk-U7KCDTCH.js";import{require_supports_color}from"../../chunks/chunk-N3ZZ7FHQ.js";import"../../chunks/chunk-GU6VIFR5.js";import{__commonJS,__require,__toESM}from"../../chunks/chunk-6L236MNA.js";var require_bytes2=__commonJS({"../../node_modules/.pnpm/bytes@3.1.0/node_modules/bytes/index.js"(exports2,module2){"use strict";module2.exports=bytes2;module2.exports.format=format;module2.exports.parse=parse2;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function bytes2(value,options){return typeof value=="string"?parse2(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.pb?unit="PB":mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse2(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});var require_callsite_tostring=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/callsite-tostring.js"(exports2,module2){"use strict";module2.exports=callSiteToString2;function callSiteFileLocation(callSite){var fileName,fileLocation="";if(callSite.isNative()?fileLocation="native":callSite.isEval()?(fileName=callSite.getScriptNameOrSourceURL(),fileName||(fileLocation=callSite.getEvalOrigin())):fileName=callSite.getFileName(),fileName){fileLocation+=fileName;var lineNumber=callSite.getLineNumber();if(lineNumber!=null){fileLocation+=":"+lineNumber;var columnNumber=callSite.getColumnNumber();columnNumber&&(fileLocation+=":"+columnNumber)}}return fileLocation||"unknown source"}function callSiteToString2(callSite){var addSuffix=!0,fileLocation=callSiteFileLocation(callSite),functionName=callSite.getFunctionName(),isConstructor=callSite.isConstructor(),isMethodCall=!(callSite.isToplevel()||isConstructor),line="";if(isMethodCall){var methodName=callSite.getMethodName(),typeName=getConstructorName(callSite);functionName?(typeName&&functionName.indexOf(typeName)!==0&&(line+=typeName+"."),line+=functionName,methodName&&functionName.lastIndexOf("."+methodName)!==functionName.length-methodName.length-1&&(line+=" [as "+methodName+"]")):line+=typeName+"."+(methodName||"<anonymous>")}else isConstructor?line+="new "+(functionName||"<anonymous>"):functionName?line+=functionName:(addSuffix=!1,line+=fileLocation);return addSuffix&&(line+=" ("+fileLocation+")"),line}function getConstructorName(obj){var receiver=obj.receiver;return receiver.constructor&&receiver.constructor.name||null}}});var require_event_listener_count=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/event-listener-count.js"(exports2,module2){"use strict";module2.exports=eventListenerCount2;function eventListenerCount2(emitter,type){return emitter.listeners(type).length}}});var require_compat=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js"(exports2,module2){"use strict";var EventEmitter=__require("events").EventEmitter;lazyProperty(module2.exports,"callSiteToString",function(){var limit=Error.stackTraceLimit,obj={},prep=Error.prepareStackTrace;function prepareObjectStackTrace2(obj2,stack3){return stack3}Error.prepareStackTrace=prepareObjectStackTrace2,Error.stackTraceLimit=2,Error.captureStackTrace(obj);var stack2=obj.stack.slice();return Error.prepareStackTrace=prep,Error.stackTraceLimit=limit,stack2[0].toString?toString:require_callsite_tostring()});lazyProperty(module2.exports,"eventListenerCount",function(){return EventEmitter.listenerCount||require_event_listener_count()});function lazyProperty(obj,prop,getter){function get(){var val=getter();return Object.defineProperty(obj,prop,{configurable:!0,enumerable:!0,value:val}),val}Object.defineProperty(obj,prop,{configurable:!0,enumerable:!0,get})}function toString(obj){return obj.toString()}}});var require_depd=__commonJS({"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/index.js"(exports,module){var callSiteToString=require_compat().callSiteToString,eventListenerCount=require_compat().eventListenerCount,relative=__require("path").relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(str,namespace){for(var vals=str.split(/[ ,]+/),ns=String(namespace).toLowerCase(),i=0;i<vals.length;i++){var val=vals[i];if(val&&(val==="*"||val.toLowerCase()===ns))return!0}return!1}function convertDataDescriptorToAccessor(obj,prop,message2){var descriptor=Object.getOwnPropertyDescriptor(obj,prop),value=descriptor.value;return descriptor.get=function(){return value},descriptor.writable&&(descriptor.set=function(val){return value=val}),delete descriptor.value,delete descriptor.writable,Object.defineProperty(obj,prop,descriptor),descriptor}function createArgumentsString(arity){for(var str="",i=0;i<arity;i++)str+=", arg"+i;return str.substr(2)}function createStackString(stack2){var str=this.name+": "+this.namespace;this.message&&(str+=" deprecated "+this.message);for(var i=0;i<stack2.length;i++)str+=`
|
|
8
8
|
at `+callSiteToString(stack2[i]);return str}function depd(namespace){if(!namespace)throw new TypeError("argument namespace is required");var stack2=getStack(),site2=callSiteLocation(stack2[1]),file=site2[0];function deprecate2(message2){log.call(deprecate2,message2)}return deprecate2._file=file,deprecate2._ignored=isignored(namespace),deprecate2._namespace=namespace,deprecate2._traced=istraced(namespace),deprecate2._warned=Object.create(null),deprecate2.function=wrapfunction,deprecate2.property=wrapproperty,deprecate2}function isignored(namespace){if(process.noDeprecation)return!0;var str=process.env.NO_DEPRECATION||"";return containsNamespace(str,namespace)}function istraced(namespace){if(process.traceDeprecation)return!0;var str=process.env.TRACE_DEPRECATION||"";return containsNamespace(str,namespace)}function log(message2,site2){var haslisteners=eventListenerCount(process,"deprecation")!==0;if(!(!haslisteners&&this._ignored)){var caller,callFile,callSite,depSite,i=0,seen=!1,stack2=getStack(),file=this._file;for(site2?(depSite=site2,callSite=callSiteLocation(stack2[1]),callSite.name=depSite.name,file=callSite[0]):(i=2,depSite=callSiteLocation(stack2[i]),callSite=depSite);i<stack2.length;i++)if(caller=callSiteLocation(stack2[i]),callFile=caller[0],callFile===file)seen=!0;else if(callFile===this._file)file=this._file;else if(seen)break;var key=caller?depSite.join(":")+"__"+caller.join(":"):void 0;if(!(key!==void 0&&key in this._warned)){this._warned[key]=!0;var msg=message2;if(msg||(msg=callSite===depSite||!callSite.name?defaultMessage(depSite):defaultMessage(callSite)),haslisteners){var err=DeprecationError(this._namespace,msg,stack2.slice(i));process.emit("deprecation",err);return}var format=process.stderr.isTTY?formatColor:formatPlain,output=format.call(this,msg,caller,stack2.slice(i));process.stderr.write(output+`
|
|
9
9
|
`,"utf8")}}}function callSiteLocation(callSite){var file=callSite.getFileName()||"<anonymous>",line=callSite.getLineNumber(),colm=callSite.getColumnNumber();callSite.isEval()&&(file=callSite.getEvalOrigin()+", "+file);var site2=[file,line,colm];return site2.callSite=callSite,site2.name=callSite.getFunctionName(),site2}function defaultMessage(site2){var callSite=site2.callSite,funcName=site2.name;funcName||(funcName="<anonymous@"+formatLocation(site2)+">");var context=callSite.getThis(),typeName=context&&callSite.getTypeName();return typeName==="Object"&&(typeName=void 0),typeName==="Function"&&(typeName=context.name||typeName),typeName&&callSite.getMethodName()?typeName+"."+funcName:funcName}function formatPlain(msg,caller,stack2){var timestamp=new Date().toUTCString(),formatted=timestamp+" "+this._namespace+" deprecated "+msg;if(this._traced){for(var i=0;i<stack2.length;i++)formatted+=`
|
|
10
10
|
at `+callSiteToString(stack2[i]);return formatted}return caller&&(formatted+=" at "+formatLocation(caller)),formatted}function formatColor(msg,caller,stack2){var formatted="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+msg+"\x1B[39m";if(this._traced){for(var i=0;i<stack2.length;i++)formatted+=`
|
|
@@ -29,8 +29,8 @@ return fn.apply(this, arguments)
|
|
|
29
29
|
`," ","{","}","|","^","`",'"',"%",";"].map(function(v){return v.charCodeAt(0)}));Url.prototype._autoEscapeMap=autoEscapeMap;Url.prototype._afterQueryAutoEscapeMap=afterQueryAutoEscapeMap;module2.exports=Url;Url.replace=function(){__require.cache.url={exports:Url}}}});var require_glob_slash=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js"(exports2,module2){var path6=__require("path"),normalize2=value=>path6.posix.normalize(path6.posix.join("/",value));module2.exports=value=>value.charAt(0)==="!"?`!${normalize2(value.substr(1))}`:normalize2(value);module2.exports.normalize=normalize2}});var require_minimatch2=__commonJS({"../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2,module2){module2.exports=minimatch4;minimatch4.Minimatch=Minimatch;var path6={sep:"/"};try{path6=__require("path")}catch{}var GLOBSTAR=minimatch4.GLOBSTAR=Minimatch.GLOBSTAR={},expand=require_brace_expansion(),plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},qmark="[^/]",star=qmark+"*?",twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?",reSpecials=charSet("().*{}+?[]^$\\!");function charSet(s){return s.split("").reduce(function(set,c){return set[c]=!0,set},{})}var slashSplit=/\/+/;minimatch4.filter=filter;function filter(pattern,options){return options=options||{},function(p,i,list){return minimatch4(p,pattern,options)}}function ext(a,b){a=a||{},b=b||{};var t={};return Object.keys(b).forEach(function(k){t[k]=b[k]}),Object.keys(a).forEach(function(k){t[k]=a[k]}),t}minimatch4.defaults=function(def){if(!def||!Object.keys(def).length)return minimatch4;var orig=minimatch4,m=function(p,pattern,options){return orig.minimatch(p,pattern,ext(def,options))};return m.Minimatch=function(pattern,options){return new orig.Minimatch(pattern,ext(def,options))},m};Minimatch.defaults=function(def){return!def||!Object.keys(def).length?Minimatch:minimatch4.defaults(def).Minimatch};function minimatch4(p,pattern,options){if(typeof pattern!="string")throw new TypeError("glob pattern string required");return options||(options={}),!options.nocomment&&pattern.charAt(0)==="#"?!1:pattern.trim()===""?p==="":new Minimatch(pattern,options).match(p)}function Minimatch(pattern,options){if(!(this instanceof Minimatch))return new Minimatch(pattern,options);if(typeof pattern!="string")throw new TypeError("glob pattern string required");options||(options={}),pattern=pattern.trim(),path6.sep!=="/"&&(pattern=pattern.split(path6.sep).join("/")),this.options=options,this.set=[],this.pattern=pattern,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(!this._made){var pattern=this.pattern,options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=!0;return}if(!pattern){this.empty=!0;return}this.parseNegate();var set=this.globSet=this.braceExpand();options.debug&&(this.debug=console.error),this.debug(this.pattern,set),set=this.globParts=set.map(function(s){return s.split(slashSplit)}),this.debug(this.pattern,set),set=set.map(function(s,si,set2){return s.map(this.parse,this)},this),this.debug(this.pattern,set),set=set.filter(function(s){return s.indexOf(!1)===-1}),this.debug(this.pattern,set),this.set=set}}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var pattern=this.pattern,negate=!1,options=this.options,negateOffset=0;if(!options.nonegate){for(var i=0,l=pattern.length;i<l&&pattern.charAt(i)==="!";i++)negate=!negate,negateOffset++;negateOffset&&(this.pattern=pattern.substr(negateOffset)),this.negate=negate}}minimatch4.braceExpand=function(pattern,options){return braceExpand(pattern,options)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(pattern,options){if(options||(this instanceof Minimatch?options=this.options:options={}),pattern=typeof pattern>"u"?this.pattern:pattern,typeof pattern>"u")throw new TypeError("undefined pattern");return options.nobrace||!pattern.match(/\{.*\}/)?[pattern]:expand(pattern)}Minimatch.prototype.parse=parse2;var SUBPARSE={};function parse2(pattern,isSub){if(pattern.length>1024*64)throw new TypeError("pattern is too long");var options=this.options;if(!options.noglobstar&&pattern==="**")return GLOBSTAR;if(pattern==="")return"";var re="",hasMagic=!!options.nocase,escaping=!1,patternListStack=[],negativeLists=[],stateChar,inClass=!1,reClassStart=-1,classStart=-1,patternStart=pattern.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",self2=this;function clearStateChar(){if(stateChar){switch(stateChar){case"*":re+=star,hasMagic=!0;break;case"?":re+=qmark,hasMagic=!0;break;default:re+="\\"+stateChar;break}self2.debug("clearStateChar %j %j",stateChar,re),stateChar=!1}}for(var i=0,len=pattern.length,c;i<len&&(c=pattern.charAt(i));i++){if(this.debug("%s %s %s %j",pattern,i,re,c),escaping&&reSpecials[c]){re+="\\"+c,escaping=!1;continue}switch(c){case"/":return!1;case"\\":clearStateChar(),escaping=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",pattern,i,re,c),inClass){this.debug(" in class"),c==="!"&&i===classStart+1&&(c="^"),re+=c;continue}self2.debug("call clearStateChar %j",stateChar),clearStateChar(),stateChar=c,options.noext&&clearStateChar();continue;case"(":if(inClass){re+="(";continue}if(!stateChar){re+="\\(";continue}patternListStack.push({type:stateChar,start:i-1,reStart:re.length,open:plTypes[stateChar].open,close:plTypes[stateChar].close}),re+=stateChar==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",stateChar,re),stateChar=!1;continue;case")":if(inClass||!patternListStack.length){re+="\\)";continue}clearStateChar(),hasMagic=!0;var pl=patternListStack.pop();re+=pl.close,pl.type==="!"&&negativeLists.push(pl),pl.reEnd=re.length;continue;case"|":if(inClass||!patternListStack.length||escaping){re+="\\|",escaping=!1;continue}clearStateChar(),re+="|";continue;case"[":if(clearStateChar(),inClass){re+="\\"+c;continue}inClass=!0,classStart=i,reClassStart=re.length,re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c,escaping=!1;continue}if(inClass){var cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]")}catch{var sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0]+"\\]",hasMagic=hasMagic||sp[1],inClass=!1;continue}}hasMagic=!0,inClass=!1,re+=c;continue;default:clearStateChar(),escaping?escaping=!1:reSpecials[c]&&!(c==="^"&&inClass)&&(re+="\\"),re+=c}}for(inClass&&(cs=pattern.substr(classStart+1),sp=this.parse(cs,SUBPARSE),re=re.substr(0,reClassStart)+"\\["+sp[0],hasMagic=hasMagic||sp[1]),pl=patternListStack.pop();pl;pl=patternListStack.pop()){var tail=re.slice(pl.reStart+pl.open.length);this.debug("setting tail",re,pl),tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(_,$1,$2){return $2||($2="\\"),$1+$1+$2+"|"}),this.debug(`tail=%j
|
|
30
30
|
%s`,tail,tail,pl,re);var t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=!0,re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar(),escaping&&(re+="\\\\");var addPatternStart=!1;switch(re.charAt(0)){case".":case"[":case"(":addPatternStart=!0}for(var n=negativeLists.length-1;n>-1;n--){var nl=negativeLists[n],nlBefore=re.slice(0,nl.reStart),nlFirst=re.slice(nl.reStart,nl.reEnd-8),nlLast=re.slice(nl.reEnd-8,nl.reEnd),nlAfter=re.slice(nl.reEnd);nlLast+=nlAfter;var openParensBefore=nlBefore.split("(").length-1,cleanAfter=nlAfter;for(i=0;i<openParensBefore;i++)cleanAfter=cleanAfter.replace(/\)[+*?]?/,"");nlAfter=cleanAfter;var dollar="";nlAfter===""&&isSub!==SUBPARSE&&(dollar="$");var newRe=nlBefore+nlFirst+nlAfter+dollar+nlLast;re=newRe}if(re!==""&&hasMagic&&(re="(?=.)"+re),addPatternStart&&(re=patternStart+re),isSub===SUBPARSE)return[re,hasMagic];if(!hasMagic)return globUnescape(pattern);var flags=options.nocase?"i":"";try{var regExp=new RegExp("^"+re+"$",flags)}catch{return new RegExp("$.")}return regExp._glob=pattern,regExp._src=re,regExp}minimatch4.makeRe=function(pattern,options){return new Minimatch(pattern,options||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;var set=this.set;if(!set.length)return this.regexp=!1,this.regexp;var options=this.options,twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot,flags=options.nocase?"i":"",re=set.map(function(pattern){return pattern.map(function(p){return p===GLOBSTAR?twoStar:typeof p=="string"?regExpEscape(p):p._src}).join("\\/")}).join("|");re="^(?:"+re+")$",this.negate&&(re="^(?!"+re+").*$");try{this.regexp=new RegExp(re,flags)}catch{this.regexp=!1}return this.regexp}minimatch4.match=function(list,pattern,options){options=options||{};var mm=new Minimatch(pattern,options);return list=list.filter(function(f){return mm.match(f)}),mm.options.nonull&&!list.length&&list.push(pattern),list};Minimatch.prototype.match=match;function match(f,partial){if(this.debug("match",f,this.pattern),this.comment)return!1;if(this.empty)return f==="";if(f==="/"&&partial)return!0;var options=this.options;path6.sep!=="/"&&(f=f.split(path6.sep).join("/")),f=f.split(slashSplit),this.debug(this.pattern,"split",f);var set=this.set;this.debug(this.pattern,"set",set);var filename,i;for(i=f.length-1;i>=0&&(filename=f[i],!filename);i--);for(i=0;i<set.length;i++){var pattern=set[i],file=f;options.matchBase&&pattern.length===1&&(file=[filename]);var hit=this.matchOne(file,pattern,partial);if(hit)return options.flipNegate?!0:!this.negate}return options.flipNegate?!1:this.negate}Minimatch.prototype.matchOne=function(file,pattern,partial){var options=this.options;this.debug("matchOne",{this:this,file,pattern}),this.debug("matchOne",file.length,pattern.length);for(var fi=0,pi=0,fl=file.length,pl=pattern.length;fi<fl&&pi<pl;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi],f=file[fi];if(this.debug(pattern,p,f),p===!1)return!1;if(p===GLOBSTAR){this.debug("GLOBSTAR",[pattern,p,f]);var fr=fi,pr=pi+1;if(pr===pl){for(this.debug("** at the end");fi<fl;fi++)if(file[fi]==="."||file[fi]===".."||!options.dot&&file[fi].charAt(0)===".")return!1;return!0}for(;fr<fl;){var swallowee=file[fr];if(this.debug(`
|
|
31
31
|
globstar while`,file,fr,pattern,pr,swallowee),this.matchOne(file.slice(fr),pattern.slice(pr),partial))return this.debug("globstar found match!",fr,fl,swallowee),!0;if(swallowee==="."||swallowee===".."||!options.dot&&swallowee.charAt(0)==="."){this.debug("dot detected!",file,fr,pattern,pr);break}this.debug("globstar swallow a segment, and continue"),fr++}return!!(partial&&(this.debug(`
|
|
32
|
-
>>> no match, partial?`,file,fr,pattern,pr),fr===fl))}var hit;if(typeof p=="string"?(options.nocase?hit=f.toLowerCase()===p.toLowerCase():hit=f===p,this.debug("string match",p,f,hit)):(hit=f.match(p),this.debug("pattern match",p,f,hit)),!hit)return!1}if(fi===fl&&pi===pl)return!0;if(fi===fl)return partial;if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}});var require_path_to_regexp=__commonJS({"../../node_modules/.pnpm/path-to-regexp@2.2.1/node_modules/path-to-regexp/index.js"(exports2,module2){module2.exports=pathToRegexp;module2.exports.parse=parse2;module2.exports.compile=compile;module2.exports.tokensToFunction=tokensToFunction;module2.exports.tokensToRegExp=tokensToRegExp;var DEFAULT_DELIMITER="/",DEFAULT_DELIMITERS="./",PATH_REGEXP=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function parse2(str,options){for(var tokens=[],key=0,index=0,path6="",defaultDelimiter=options&&options.delimiter||DEFAULT_DELIMITER,delimiters=options&&options.delimiters||DEFAULT_DELIMITERS,pathEscaped=!1,res;(res=PATH_REGEXP.exec(str))!==null;){var m=res[0],escaped=res[1],offset=res.index;if(path6+=str.slice(index,offset),index=offset+m.length,escaped){path6+=escaped[1],pathEscaped=!0;continue}var prev="",next=str[index],name=res[2],capture=res[3],group=res[4],modifier=res[5];if(!pathEscaped&&path6.length){var k=path6.length-1;delimiters.indexOf(path6[k])>-1&&(prev=path6[k],path6=path6.slice(0,k))}path6&&(tokens.push(path6),path6="",pathEscaped=!1);var partial=prev!==""&&next!==void 0&&next!==prev,repeat=modifier==="+"||modifier==="*",optional=modifier==="?"||modifier==="*",delimiter2=prev||defaultDelimiter,pattern=capture||group;tokens.push({name:name||key++,prefix:prev,delimiter:delimiter2,optional,repeat,partial,pattern:pattern?escapeGroup(pattern):"[^"+escapeString(delimiter2)+"]+?"})}return(path6||index<str.length)&&tokens.push(path6+str.substr(index)),tokens}function compile(str,options){return tokensToFunction(parse2(str,options))}function tokensToFunction(tokens){for(var matches=new Array(tokens.length),i=0;i<tokens.length;i++)typeof tokens[i]=="object"&&(matches[i]=new RegExp("^(?:"+tokens[i].pattern+")$"));return function(data,options){for(var path6="",encode=options&&options.encode||encodeURIComponent,i2=0;i2<tokens.length;i2++){var token=tokens[i2];if(typeof token=="string"){path6+=token;continue}var value=data?data[token.name]:void 0,segment;if(Array.isArray(value)){if(!token.repeat)throw new TypeError('Expected "'+token.name+'" to not repeat, but got array');if(value.length===0){if(token.optional)continue;throw new TypeError('Expected "'+token.name+'" to not be empty')}for(var j=0;j<value.length;j++){if(segment=encode(value[j],token),!matches[i2].test(segment))throw new TypeError('Expected all "'+token.name+'" to match "'+token.pattern+'"');path6+=(j===0?token.prefix:token.delimiter)+segment}continue}if(typeof value=="string"||typeof value=="number"||typeof value=="boolean"){if(segment=encode(String(value),token),!matches[i2].test(segment))throw new TypeError('Expected "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path6+=token.prefix+segment;continue}if(token.optional){token.partial&&(path6+=token.prefix);continue}throw new TypeError('Expected "'+token.name+'" to be '+(token.repeat?"an array":"a string"))}return path6}}function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function escapeGroup(group){return group.replace(/([=!:$/()])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path6,keys){if(!keys)return path6;var groups=path6.source.match(/\((?!\?)/g);if(groups)for(var i=0;i<groups.length;i++)keys.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return path6}function arrayToRegexp(path6,keys,options){for(var parts=[],i=0;i<path6.length;i++)parts.push(pathToRegexp(path6[i],keys,options).source);return new RegExp("(?:"+parts.join("|")+")",flags(options))}function stringToRegexp(path6,keys,options){return tokensToRegExp(parse2(path6,options),keys,options)}function tokensToRegExp(tokens,keys,options){options=options||{};for(var strict=options.strict,end=options.end!==!1,delimiter2=escapeString(options.delimiter||DEFAULT_DELIMITER),delimiters=options.delimiters||DEFAULT_DELIMITERS,endsWith=[].concat(options.endsWith||[]).map(escapeString).concat("$").join("|"),route="",isEndDelimited=tokens.length===0,i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string")route+=escapeString(token),isEndDelimited=i===tokens.length-1&&delimiters.indexOf(token[token.length-1])>-1;else{var prefix=escapeString(token.prefix),capture=token.repeat?"(?:"+token.pattern+")(?:"+prefix+"(?:"+token.pattern+"))*":token.pattern;keys&&keys.push(token),token.optional?token.partial?route+=prefix+"("+capture+")?":route+="(?:"+prefix+"("+capture+"))?":route+=prefix+"("+capture+")"}}return end?(strict||(route+="(?:"+delimiter2+")?"),route+=endsWith==="$"?"$":"(?="+endsWith+")"):(strict||(route+="(?:"+delimiter2+"(?="+endsWith+"))?"),isEndDelimited||(route+="(?="+delimiter2+"|"+endsWith+")")),new RegExp("^"+route,flags(options))}function pathToRegexp(path6,keys,options){return path6 instanceof RegExp?regexpToRegexp(path6,keys):Array.isArray(path6)?arrayToRegexp(path6,keys,options):stringToRegexp(path6,keys,options)}}});var require_db=__commonJS({"../../node_modules/.pnpm/mime-db@1.33.0/node_modules/mime-db/db.json"(exports2,module2){module2.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"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/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"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"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iana"},"application/emma+xml":{source:"iana",extensions:["emma"]},"application/emotionml+xml":{source:"iana"},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana"},"application/epub+zip":{source:"iana",extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana"},"application/fhir+xml":{source:"iana"},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1,extensions:["woff"]},"application/framework-attributes+xml":{source:"iana"},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geoxacml+xml":{source:"iana"},"application/gml+xml":{source:"iana",extensions:["gml"]},"application/gpx+xml":{source:"apache",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"},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana"},"application/ibe-pkg-reply+xml":{source:"iana"},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana"},"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",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"},"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/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"},"application/kpml-response+xml":{source:"iana"},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana"},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana"},"application/lost+xml":{source:"iana",extensions:["lostxml"]},"application/lostsync+xml":{source:"iana"},"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",extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",extensions:["mathml"]},"application/mathml-content+xml":{source:"iana"},"application/mathml-presentation+xml":{source:"iana"},"application/mbms-associated-procedure-description+xml":{source:"iana"},"application/mbms-deregister+xml":{source:"iana"},"application/mbms-envelope+xml":{source:"iana"},"application/mbms-msk+xml":{source:"iana"},"application/mbms-msk-response+xml":{source:"iana"},"application/mbms-protection-description+xml":{source:"iana"},"application/mbms-reception-report+xml":{source:"iana"},"application/mbms-register+xml":{source:"iana"},"application/mbms-register-response+xml":{source:"iana"},"application/mbms-schedule+xml":{source:"iana"},"application/mbms-user-service-description+xml":{source:"iana"},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana"},"application/media_control+xml":{source:"iana"},"application/mediaservercontrol+xml":{source:"iana",extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",extensions:["metalink"]},"application/metalink4+xml":{source:"iana",extensions:["meta4"]},"application/mets+xml":{source:"iana",extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana"},"application/mods+xml":{source:"iana",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"},"application/mrb-publish+xml":{source:"iana"},"application/msc-ivr+xml":{source:"iana"},"application/msc-mixer+xml":{source:"iana"},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana"},"application/n-triples":{source:"iana"},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana"},"application/node":{source:"iana"},"application/nss":{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/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana"},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana"},"application/pidf-diff+xml":{source:"iana"},"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",extensions:["pls"]},"application/poc-settings+xml":{source:"iana"},"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"},"application/provenance+xml":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana"},"application/pskc+xml":{source:"iana",extensions:["pskcxml"]},"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"]},"application/reginfo+xml":{source:"iana",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",extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",extensions:["rld"]},"application/rfc+xml":{source:"iana"},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana"},"application/rls-services+xml":{source:"iana",extensions:["rs"]},"application/route-apd+xml":{source:"iana"},"application/route-s-tsid+xml":{source:"iana"},"application/route-usd+xml":{source:"iana"},"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",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"},"application/samlmetadata+xml":{source:"iana"},"application/sbml+xml":{source:"iana",extensions:["sbml"]},"application/scaip+xml":{source:"iana"},"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/sep+xml":{source:"iana"},"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",extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana"},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",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",extensions:["srx"]},"application/spirits-event+xml":{source:"iana"},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",extensions:["grxml"]},"application/sru+xml":{source:"iana",extensions:["sru"]},"application/ssdl+xml":{source:"apache",extensions:["ssdl"]},"application/ssml+xml":{source:"iana",extensions:["ssml"]},"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/tei+xml":{source:"iana",extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tnauthlist":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana"},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana"},"application/urc-ressheet+xml":{source:"iana"},"application/urc-targetdesc+xml":{source:"iana"},"application/urc-uisocketdesc+xml":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana"},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana"},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana"},"application/vnd.3gpp.bsf+xml":{source:"iana"},"application/vnd.3gpp.gmop+xml":{source:"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana"},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana"},"application/vnd.3gpp.mcptt-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana"},"application/vnd.3gpp.mid-call+xml":{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.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana"},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana"},"application/vnd.3gpp.srvcc-info+xml":{source:"iana"},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana"},"application/vnd.3gpp.ussd+xml":{source:"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana"},"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",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",extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"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"},"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.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.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",extensions:["mpkg"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"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"},"application/vnd.balsamiq.bmml+xml":{source:"iana"},"application/vnd.balsamiq.bmpr":{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"},"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.businessobjects":{source:"iana",extensions:["rep"]},"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",extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana"},"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"},"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",extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana"},"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"},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{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.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",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.desmume.movie":{source:"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana"},"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.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"},"application/vnd.dvb.notif-container+xml":{source:"iana"},"application/vnd.dvb.notif-generic+xml":{source:"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana"},"application/vnd.dvb.notif-init+xml":{source:"iana"},"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.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"},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana"},"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"},"application/vnd.eszigno3+xml":{source:"iana",extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana"},"application/vnd.etsi.asic-e+zip":{source:"iana"},"application/vnd.etsi.asic-s+zip":{source:"iana"},"application/vnd.etsi.cug+xml":{source:"iana"},"application/vnd.etsi.iptvcommand+xml":{source:"iana"},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana"},"application/vnd.etsi.iptvprofile+xml":{source:"iana"},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana"},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana"},"application/vnd.etsi.iptvservice+xml":{source:"iana"},"application/vnd.etsi.iptvsync+xml":{source:"iana"},"application/vnd.etsi.iptvueprofile+xml":{source:"iana"},"application/vnd.etsi.mcid+xml":{source:"iana"},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana"},"application/vnd.etsi.pstn+xml":{source:"iana"},"application/vnd.etsi.sci+xml":{source:"iana"},"application/vnd.etsi.simservs+xml":{source:"iana"},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana"},"application/vnd.etsi.tsl.der":{source:"iana"},"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.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"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.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.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.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana"},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"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"},"application/vnd.gov.sk.e-form+zip":{source:"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana"},"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",extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",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.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-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"},"application/vnd.imagemeter.image+zip":{source:"iana"},"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"},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana"},"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"},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana"},"application/vnd.iptc.g2.packageitem+xml":{source:"iana"},"application/vnd.iptc.g2.planningitem+xml":{source:"iana"},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"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.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",extensions:["lasxml"]},"application/vnd.liberty-request+xml":{source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",extensions:["lbe"]},"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"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana"},"application/vnd.marlin.drm.conftoken+xml":{source:"iana"},"application/vnd.marlin.drm.license+xml":{source:"iana"},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"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"},"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"},"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"},"application/vnd.ms-printing.printticket+xml":{source:"apache"},"application/vnd.ms-printschematicket+xml":{source:"iana"},"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.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"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"},"application/vnd.nokia.iptv.config+xml":{source:"iana"},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana"},"application/vnd.nokia.landmarkcollection+xml":{source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{source:"iana"},"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"},"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.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana"},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana"},"application/vnd.oipf.dae.xhtml+xml":{source:"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana"},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana"},"application/vnd.oipf.spdlist+xml":{source:"iana"},"application/vnd.oipf.ueprofile+xml":{source:"iana"},"application/vnd.oipf.userprofile+xml":{source:"iana"},"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"},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.imd+xml":{source:"iana"},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana"},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana"},"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"},"application/vnd.oma.bcast.sprov+xml":{source:"iana"},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana"},"application/vnd.oma.cab-feature-handler+xml":{source:"iana"},"application/vnd.oma.cab-pcc+xml":{source:"iana"},"application/vnd.oma.cab-subs-invite+xml":{source:"iana"},"application/vnd.oma.cab-user-prefs+xml":{source:"iana"},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana"},"application/vnd.oma.group-usage-list+xml":{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"},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana"},"application/vnd.oma.poc.final-report+xml":{source:"iana"},"application/vnd.oma.poc.groups+xml":{source:"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana"},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana"},"application/vnd.oma.xcap-directory+xml":{source:"iana"},"application/vnd.omads-email+xml":{source:"iana"},"application/vnd.omads-file+xml":{source:"iana"},"application/vnd.omads-folder+xml":{source:"iana"},"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"},"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"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana"},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana"},"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"},"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.paos.xml":{source:"apache"},"application/vnd.patentdive":{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"},"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.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"},"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"},"application/vnd.radisys.msml+xml":{source:"iana"},"application/vnd.radisys.msml-audit+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana"},"application/vnd.radisys.msml-conf+xml":{source:"iana"},"application/vnd.radisys.msml-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana"},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{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",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.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.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"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.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.software602.filler.form+xml":{source:"iana"},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",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.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana"},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana"},"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.tmd.mediaflex.api+xml":{source:"iana"},"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",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.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",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.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"},"application/vnd.wv.ssp+xml":{source:"iana"},"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"},"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",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",extensions:["zaz"]},"application/voicexml+xml":{source:"iana",extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana"},"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",extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",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",extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",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-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-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-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:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",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"},"application/xaml+xml":{source:"apache",extensions:["xaml"]},"application/xcap-att+xml":{source:"iana"},"application/xcap-caps+xml":{source:"iana"},"application/xcap-diff+xml":{source:"iana",extensions:["xdf"]},"application/xcap-el+xml":{source:"iana"},"application/xcap-error+xml":{source:"iana"},"application/xcap-ns+xml":{source:"iana"},"application/xcon-conference-info+xml":{source:"iana"},"application/xcon-conference-info-diff+xml":{source:"iana"},"application/xenc+xml":{source:"iana",extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache"},"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"},"application/xmpp+xml":{source:"iana"},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",extensions:["xpl"]},"application/xslt+xml":{source:"iana",extensions:["xslt"]},"application/xspf+xml":{source:"apache",extensions:["xspf"]},"application/xv+xml":{source:"iana",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"},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana"},"application/yin+xml":{source:"iana",extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{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/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"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/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/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"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"]},"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/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{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/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{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.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",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana"},"image/apng":{compressible:!1,extensions:["apng"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana"},"image/emf":{source:"iana"},"image/fits":{source:"iana"},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana"},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"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"},"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"},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/tiff-fx":{source:"iana"},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana"},"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"},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"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.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"},"image/vnd.valve.source.texture":{source:"iana"},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana"},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana"},"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"},"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/vnd.collada+xml":{source:"iana",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"},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.valve.source.compiled-map":{source:"iana"},"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"},"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"},"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",compressible:!1},"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/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/fwdred":{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":{extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"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/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"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",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"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"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.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"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":{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":{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/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{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"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"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/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{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/vp8":{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 require_mime_db=__commonJS({"../../node_modules/.pnpm/mime-db@1.33.0/node_modules/mime-db/index.js"(exports2,module2){module2.exports=require_db()}});var require_mime_types2=__commonJS({"../../node_modules/.pnpm/mime-types@2.1.18/node_modules/mime-types/index.js"(exports2){"use strict";var db=require_mime_db(),extname3=__require("path").extname,EXTRACT_TYPE_REGEXP=/^\s*([^;\s]*)(?:;|\s|$)/,TEXT_TYPE_REGEXP=/^text\//i;exports2.charset=charset;exports2.charsets={lookup:charset};exports2.contentType=contentType2;exports2.extension=extension;exports2.extensions=Object.create(null);exports2.lookup=lookup;exports2.types=Object.create(null);populateMaps(exports2.extensions,exports2.types);function charset(type){if(!type||typeof type!="string")return!1;var match=EXTRACT_TYPE_REGEXP.exec(type),mime=match&&db[match[1].toLowerCase()];return mime&&mime.charset?mime.charset:match&&TEXT_TYPE_REGEXP.test(match[1])?"UTF-8":!1}function contentType2(str){if(!str||typeof str!="string")return!1;var mime=str.indexOf("/")===-1?exports2.lookup(str):str;if(!mime)return!1;if(mime.indexOf("charset")===-1){var charset2=exports2.charset(mime);charset2&&(mime+="; charset="+charset2.toLowerCase())}return mime}function extension(type){if(!type||typeof type!="string")return!1;var match=EXTRACT_TYPE_REGEXP.exec(type),exts=match&&exports2.extensions[match[1].toLowerCase()];return!exts||!exts.length?!1:exts[0]}function lookup(path6){if(!path6||typeof path6!="string")return!1;var extension2=extname3("x."+path6).toLowerCase().substr(1);return extension2&&exports2.types[extension2]||!1}function populateMaps(extensions,types){var preference=["nginx","apache",void 0,"iana"];Object.keys(db).forEach(function(type){var mime=db[type],exts=mime.extensions;if(!(!exts||!exts.length)){extensions[type]=exts;for(var i=0;i<exts.length;i++){var extension2=exts[i];if(types[extension2]){var from=preference.indexOf(db[types[extension2]].source),to=preference.indexOf(mime.source);if(types[extension2]!=="application/octet-stream"&&(from>to||from===to&&types[extension2].substr(0,12)==="application/"))continue}types[extension2]=type}}})}}});var require_content_disposition=__commonJS({"../../node_modules/.pnpm/content-disposition@0.5.2/node_modules/content-disposition/index.js"(exports2,module2){"use strict";module2.exports=contentDisposition;module2.exports.parse=parse2;var basename2=__require("path").basename,ENCODE_URL_ATTR_CHAR_REGEXP=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,HEX_ESCAPE_REGEXP=/%[0-9A-Fa-f]{2}/,HEX_ESCAPE_REPLACE_REGEXP=/%([0-9A-Fa-f]{2})/g,NON_LATIN1_REGEXP=/[^\x20-\x7e\xa0-\xff]/g,QESC_REGEXP=/\\([\u0000-\u007f])/g,QUOTE_REGEXP=/([\\"])/g,PARAM_REGEXP=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,TEXT_REGEXP=/^[\x20-\x7e\x80-\xff]+$/,TOKEN_REGEXP=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,EXT_VALUE_REGEXP=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,DISPOSITION_TYPE_REGEXP=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function contentDisposition(filename,options){var opts=options||{},type=opts.type||"attachment",params=createparams(filename,opts.fallback);return format(new ContentDisposition(type,params))}function createparams(filename,fallback){if(filename!==void 0){var params={};if(typeof filename!="string")throw new TypeError("filename must be a string");if(fallback===void 0&&(fallback=!0),typeof fallback!="string"&&typeof fallback!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof fallback=="string"&&NON_LATIN1_REGEXP.test(fallback))throw new TypeError("fallback must be ISO-8859-1 string");var name=basename2(filename),isQuotedString=TEXT_REGEXP.test(name),fallbackName=typeof fallback!="string"?fallback&&getlatin1(name):basename2(fallback),hasFallback=typeof fallbackName=="string"&&fallbackName!==name;return(hasFallback||!isQuotedString||HEX_ESCAPE_REGEXP.test(name))&&(params["filename*"]=name),(isQuotedString||hasFallback)&&(params.filename=hasFallback?fallbackName:name),params}}function format(obj){var parameters=obj.parameters,type=obj.type;if(!type||typeof type!="string"||!TOKEN_REGEXP.test(type))throw new TypeError("invalid type");var string=String(type).toLowerCase();if(parameters&&typeof parameters=="object")for(var param2,params=Object.keys(parameters).sort(),i=0;i<params.length;i++){param2=params[i];var val=param2.substr(-1)==="*"?ustring(parameters[param2]):qstring(parameters[param2]);string+="; "+param2+"="+val}return string}function decodefield(str){var match=EXT_VALUE_REGEXP.exec(str);if(!match)throw new TypeError("invalid extended field value");var charset=match[1].toLowerCase(),encoded=match[2],value,binary=encoded.replace(HEX_ESCAPE_REPLACE_REGEXP,pdecode);switch(charset){case"iso-8859-1":value=getlatin1(binary);break;case"utf-8":value=new Buffer(binary,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return value}function getlatin1(val){return String(val).replace(NON_LATIN1_REGEXP,"?")}function parse2(string){if(!string||typeof string!="string")throw new TypeError("argument string is required");var match=DISPOSITION_TYPE_REGEXP.exec(string);if(!match)throw new TypeError("invalid type format");var index=match[0].length,type=match[1].toLowerCase(),key,names=[],params={},value;for(index=PARAM_REGEXP.lastIndex=match[0].substr(-1)===";"?index-1:index;match=PARAM_REGEXP.exec(string);){if(match.index!==index)throw new TypeError("invalid parameter format");if(index+=match[0].length,key=match[1].toLowerCase(),value=match[2],names.indexOf(key)!==-1)throw new TypeError("invalid duplicate parameter");if(names.push(key),key.indexOf("*")+1===key.length){key=key.slice(0,-1),value=decodefield(value),params[key]=value;continue}typeof params[key]!="string"&&(value[0]==='"'&&(value=value.substr(1,value.length-2).replace(QESC_REGEXP,"$1")),params[key]=value)}if(index!==-1&&index!==string.length)throw new TypeError("invalid parameter format");return new ContentDisposition(type,params)}function pdecode(str,hex){return String.fromCharCode(parseInt(hex,16))}function pencode(char){var hex=String(char).charCodeAt(0).toString(16).toUpperCase();return hex.length===1?"%0"+hex:"%"+hex}function qstring(val){var str=String(val);return'"'+str.replace(QUOTE_REGEXP,"\\$1")+'"'}function ustring(val){var str=String(val),encoded=encodeURIComponent(str).replace(ENCODE_URL_ATTR_CHAR_REGEXP,pencode);return"UTF-8''"+encoded}function ContentDisposition(type,parameters){this.type=type,this.parameters=parameters}}});var require_path_is_inside=__commonJS({"../../node_modules/.pnpm/path-is-inside@1.0.2/node_modules/path-is-inside/lib/path-is-inside.js"(exports2,module2){"use strict";var path6=__require("path");module2.exports=function(thePath,potentialParent){return thePath=stripTrailingSep(thePath),potentialParent=stripTrailingSep(potentialParent),process.platform==="win32"&&(thePath=thePath.toLowerCase(),potentialParent=potentialParent.toLowerCase()),thePath.lastIndexOf(potentialParent,0)===0&&(thePath[potentialParent.length]===path6.sep||thePath[potentialParent.length]===void 0)};function stripTrailingSep(thePath){return thePath[thePath.length-1]===path6.sep?thePath.slice(0,-1):thePath}}});var require_range_parser=__commonJS({"../../node_modules/.pnpm/range-parser@1.2.0/node_modules/range-parser/index.js"(exports2,module2){"use strict";module2.exports=rangeParser;function rangeParser(size,str,options){var index=str.indexOf("=");if(index===-1)return-2;var arr=str.slice(index+1).split(","),ranges=[];ranges.type=str.slice(0,index);for(var i=0;i<arr.length;i++){var range=arr[i].split("-"),start=parseInt(range[0],10),end=parseInt(range[1],10);isNaN(start)?(start=size-end,end=size-1):isNaN(end)&&(end=size-1),end>size-1&&(end=size-1),!(isNaN(start)||isNaN(end)||start>end||start<0)&&ranges.push({start,end})}return ranges.length<1?-1:options&&options.combine?combineRanges(ranges):ranges}function combineRanges(ranges){for(var ordered=ranges.map(mapWithIndex).sort(sortByRangeStart),j=0,i=1;i<ordered.length;i++){var range=ordered[i],current=ordered[j];range.start>current.end+1?ordered[++j]=range:range.end>current.end&&(current.end=range.end,current.index=Math.min(current.index,range.index))}ordered.length=j+1;var combined=ordered.sort(sortByRangeIndex).map(mapWithoutIndex);return combined.type=ranges.type,combined}function mapWithIndex(range,index){return{start:range.start,end:range.end,index}}function mapWithoutIndex(range){return{start:range.start,end:range.end}}function sortByRangeIndex(a,b){return a.index-b.index}function sortByRangeStart(a,b){return a.start-b.start}}});var require_directory=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/directory.js"(exports2,module2){(function(){function directory(it){var encodeHTML6=typeof _encodeHTML<"u"?_encodeHTML:function(doNotSkipEncoded){var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},matchHTML=doNotSkipEncoded?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(code){return code?code.toString().replace(matchHTML,function(m){return encodeHTMLRules[m]||m}):""}}(),out='<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Files within '+encodeHTML6(it.directory)+`</title> <style>body { margin: 0; padding: 30px; background: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased;}main { max-width: 920px;}header { display: flex; justify-content: space-between; flex-wrap: wrap;}h1 { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}header h1 a { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}h1 i { font-style: normal;}ul { margin: 0 0 0 -2px; padding: 20px 0 0 0;}ul li { list-style: none; font-size: 14px; display: flex; justify-content: space-between;}a { text-decoration: none;}ul a { color: #000; padding: 10px 5px; margin: 0 -5px; white-space: nowrap; overflow: hidden; display: block; width: 100%; text-overflow: ellipsis;}header a { color: #0076FF; font-size: 11px; font-weight: 400; display: inline-block; line-height: 20px;}svg { height: 13px; vertical-align: text-bottom;}ul a::before { display: inline-block; vertical-align: middle; margin-right: 10px; width: 24px; text-align: center; line-height: 12px;}ul a.file::before { content: url("data:image/svg+xml;utf8,<svg width='15' height='19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 8C8.34 8 7 6.66 7 5V1H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V8h-4zM8 5c0 1.1.9 2 2 2h3.59L8 1.41V5zM3 0h5l7 7v9c0 1.66-1.34 3-3 3H3c-1.66 0-3-1.34-3-3V3c0-1.66 1.34-3 3-3z' fill='black'/></svg>");}ul a:hover { text-decoration: underline;}ul a.folder::before { content: url("data:image/svg+xml;utf8,<svg width='20' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M18.784 3.87a1.565 1.565 0 0 0-.565-.356V2.426c0-.648-.523-1.171-1.15-1.171H8.996L7.908.25A.89.89 0 0 0 7.302 0H2.094C1.445 0 .944.523.944 1.171v2.3c-.21.085-.398.21-.565.356a1.348 1.348 0 0 0-.377 1.004l.398 9.83C.42 15.393 1.048 16 1.8 16h15.583c.753 0 1.36-.586 1.4-1.339l.398-9.83c.021-.313-.125-.69-.397-.962zM1.843 3.41V1.191c0-.146.104-.272.25-.272H7.26l1.234 1.088c.083.042.167.104.293.104h8.282c.125 0 .25.126.25.272V3.41H1.844zm15.54 11.712H1.78a.47.47 0 0 1-.481-.46l-.397-9.83c0-.147.041-.252.125-.356a.504.504 0 0 1 .377-.147H17.78c.125 0 .272.063.377.147.083.083.125.209.125.334l-.418 9.83c-.021.272-.23.482-.481.482z' fill='black'/></svg>");}ul a.lambda::before { content: url("data:image/svg+xml; utf8,<svg width='15' height='19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3.5 14.4354H5.31622L7.30541 9.81311H7.43514L8.65315 13.0797C9.05676 14.1643 9.55405 14.5 10.7 14.5C11.0171 14.5 11.291 14.4677 11.5 14.4032V13.1572C11.3847 13.1766 11.2622 13.2024 11.1541 13.2024C10.6351 13.2024 10.3829 13.0281 10.1595 12.4664L8.02613 7.07586C7.21171 5.01646 6.54865 4.5 5.11441 4.5C4.83333 4.5 4.62432 4.53228 4.37207 4.59038V5.83635C4.56667 5.81052 4.66036 5.79761 4.77568 5.79761C5.64775 5.79761 5.9 6.0042 6.4045 7.19852L6.64234 7.77954L3.5 14.4354Z' fill='black'/><rect x='0.5' y='0.5' width='14' height='18' rx='2.5' stroke='black'/></svg>");}ul a.file.gif::before,ul a.file.jpg::before,ul a.file.png::before,ul a.file.svg::before { content: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='6' y='6' width='68' height='68' rx='5' ry='5'/><circle cx='24' cy='24' r='8'/><path d='M73 49L59 34 37 52m16 20L27 42 7 58'/></svg>");}::selection { background-color: #79FFE1; color: #000;}::-moz-selection { background-color: #79FFE1; color: #000;}@media (min-width: 768px) { ul {display: flex;flex-wrap: wrap; } ul li {width: 230px;padding-right: 20px; }}@media (min-width: 992px) { body {padding: 45px; } h1, header h1 a {font-size: 15px; } ul li {font-size: 13px;box-sizing: border-box;justify-content: flex-start; }}</style> </head> <body> <main> <header> <h1> <i>Index of </i> `,arr1=it.paths;if(arr1)for(var value,index=-1,l1=arr1.length-1;index<l1;)value=arr1[index+=1],out+=' <a href="/'+encodeHTML6(value.url)+'">'+encodeHTML6(value.name)+"</a> ";out+=' </h1> </header> <ul id="files"> ';var arr2=it.files;if(arr2)for(var value,index=-1,l2=arr2.length-1;index<l2;)value=arr2[index+=1],out+=' <li> <a href="'+encodeHTML6(value.relative)+'" title="'+encodeHTML6(value.title)+'" class="'+encodeHTML6(value.type)+" "+encodeHTML6(value.ext)+'">'+encodeHTML6(value.base)+"</a> </li> ";return out+=" </ul></main> </body></html>",out}var itself=directory,_encodeHTML=function(doNotSkipEncoded){var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},matchHTML=doNotSkipEncoded?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(code){return code?code.toString().replace(matchHTML,function(m){return encodeHTMLRules[m]||m}):""}}();typeof module2<"u"&&module2.exports?module2.exports=itself:typeof define=="function"?define(function(){return itself}):(window.render=window.render||{},window.render.directory=itself)})()}});var require_error=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/error.js"(exports2,module2){(function(){function error2(it){var out='<!DOCTYPE html><head> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/> <style> body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; } main, aside, section { display: flex; justify-content: center; align-items: center; flex-direction: column; } main { height: 100%; } aside { background: #000; flex-shrink: 1; padding: 30px 20px; } aside p { margin: 0; color: #999999; font-size: 14px; line-height: 24px; } aside a { color: #fff; text-decoration: none; } section span { font-size: 24px; font-weight: 500; display: block; border-bottom: 1px solid #EAEAEA; text-align: center; padding-bottom: 20px; width: 100px; } section p { font-size: 14px; font-weight: 400; } section span + p { margin: 20px 0 0 0; } @media (min-width: 768px) { section { height: 40px; flex-direction: row; } section span, section p { height: 100%; line-height: 40px; } section span { border-bottom: 0; border-right: 1px solid #EAEAEA; padding: 0 20px 0 0; width: auto; } section span + p { margin: 0; padding-left: 20px; } aside { padding: 50px 0; } aside p { max-width: 520px; text-align: center; } } </style></head><body> <main> <section> <span>'+it.statusCode+"</span> <p>"+it.message+"</p> </section> </main></body>";return out}var itself=error2,_encodeHTML=function(doNotSkipEncoded){var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},matchHTML=doNotSkipEncoded?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(code){return code?code.toString().replace(matchHTML,function(m){return encodeHTMLRules[m]||m}):""}}();typeof module2<"u"&&module2.exports?module2.exports=itself:typeof define=="function"?define(function(){return itself}):(window.render=window.render||{},window.render.error=itself)})()}});var require_src2=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js"(exports2,module2){var{promisify}=__require("util"),path6=__require("path"),{createHash}=__require("crypto"),{realpath,lstat:lstat2,createReadStream,readdir:readdir2}=__require("fs"),url4=require_urlparser(),slasher=require_glob_slash(),minimatch4=require_minimatch2(),pathToRegExp=require_path_to_regexp(),mime=require_mime_types2(),bytes2=require_bytes(),contentDisposition=require_content_disposition(),isPathInside=require_path_is_inside(),parseRange=require_range_parser(),directoryTemplate2=require_directory(),errorTemplate=require_error(),etags=new Map,calculateSha=(handlers,absolutePath)=>new Promise((resolve3,reject)=>{let hash=createHash("sha1");hash.update(path6.extname(absolutePath)),hash.update("-");let rs=handlers.createReadStream(absolutePath);rs.on("error",reject),rs.on("data",buf=>hash.update(buf)),rs.on("end",()=>{let sha=hash.digest("hex");resolve3(sha)})}),sourceMatches=(source,requestPath,allowSegments)=>{let keys=[],slashed=slasher(source),resolvedPath=path6.posix.resolve(requestPath),results=null;if(allowSegments){let normalized=slashed.replace("*","(.*)");results=pathToRegExp(normalized,keys).exec(resolvedPath),results||(keys.length=0)}return results||minimatch4(resolvedPath,slashed)?{keys,results}:null},toTarget=(source,destination,previousPath)=>{let matches=sourceMatches(source,previousPath,!0);if(!matches)return null;let{keys,results}=matches,props={},{protocol}=url4.parse(destination),normalizedDest=protocol?destination:slasher(destination),toPath=pathToRegExp.compile(normalizedDest);for(let index=0;index<keys.length;index++){let{name}=keys[index];props[name]=results[index+1]}return toPath(props)},applyRewrites=(requestPath,rewrites=[],repetitive)=>{let rewritesCopy=rewrites.slice(),fallback=repetitive?requestPath:null;if(rewritesCopy.length===0)return fallback;for(let index=0;index<rewritesCopy.length;index++){let{source,destination}=rewrites[index],target=toTarget(source,destination,requestPath);if(target)return rewritesCopy.splice(index,1),applyRewrites(slasher(target),rewritesCopy,!0)}return fallback},ensureSlashStart=target=>target.startsWith("/")?target:`/${target}`,shouldRedirect=(decodedPath,{redirects=[],trailingSlash},cleanUrl)=>{let slashing=typeof trailingSlash=="boolean",defaultType=301,matchHTML=/(\.html|\/index)$/g;if(redirects.length===0&&!slashing&&!cleanUrl)return null;let cleanedUrl=!1;if(cleanUrl&&matchHTML.test(decodedPath)&&(decodedPath=decodedPath.replace(matchHTML,""),cleanedUrl=!0),slashing){let{ext,name}=path6.parse(decodedPath),isTrailed=decodedPath.endsWith("/"),isDotfile=name.startsWith("."),target=null;if(!trailingSlash&&isTrailed?target=decodedPath.slice(0,-1):trailingSlash&&!isTrailed&&!ext&&!isDotfile&&(target=`${decodedPath}/`),decodedPath.indexOf("//")>-1&&(target=decodedPath.replace(/\/+/g,"/")),target)return{target:ensureSlashStart(target),statusCode:defaultType}}if(cleanedUrl)return{target:ensureSlashStart(decodedPath),statusCode:defaultType};for(let index=0;index<redirects.length;index++){let{source,destination,type}=redirects[index],target=toTarget(source,destination,decodedPath);if(target)return{target,statusCode:type||defaultType}}return null},appendHeaders=(target,source)=>{for(let index=0;index<source.length;index++){let{key,value}=source[index];target[key]=value}},getHeaders=async(handlers,config,current,absolutePath,stats)=>{let{headers:customHeaders=[],etag=!1}=config,related={},{base}=path6.parse(absolutePath),relativePath=path6.relative(current,absolutePath);if(customHeaders.length>0)for(let index=0;index<customHeaders.length;index++){let{source,headers:headers2}=customHeaders[index];sourceMatches(source,slasher(relativePath))&&appendHeaders(related,headers2)}let defaultHeaders={};if(stats){if(defaultHeaders={"Content-Length":stats.size,"Content-Disposition":contentDisposition(base,{type:"inline"}),"Accept-Ranges":"bytes"},etag){let[mtime,sha]=etags.get(absolutePath)||[];Number(mtime)!==Number(stats.mtime)&&(sha=await calculateSha(handlers,absolutePath),etags.set(absolutePath,[stats.mtime,sha])),defaultHeaders.ETag=`"${sha}"`}else defaultHeaders["Last-Modified"]=stats.mtime.toUTCString();let contentType2=mime.contentType(base);contentType2&&(defaultHeaders["Content-Type"]=contentType2)}let headers=Object.assign(defaultHeaders,related);for(let key in headers)headers.hasOwnProperty(key)&&headers[key]===null&&delete headers[key];return headers},applicable=(decodedPath,configEntry)=>{if(typeof configEntry=="boolean")return configEntry;if(Array.isArray(configEntry)){for(let index=0;index<configEntry.length;index++){let source=configEntry[index];if(sourceMatches(source,decodedPath))return!0}return!1}return!0},getPossiblePaths=(relativePath,extension)=>[path6.join(relativePath,`index${extension}`),relativePath.endsWith("/")?relativePath.replace(/\/$/g,extension):relativePath+extension].filter(item=>path6.basename(item)!==extension),findRelated=async(current,relativePath,rewrittenPath,originalStat)=>{let possible=rewrittenPath?[rewrittenPath]:getPossiblePaths(relativePath,".html"),stats=null;for(let index=0;index<possible.length;index++){let related=possible[index],absolutePath=path6.join(current,related);try{stats=await originalStat(absolutePath)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")throw err}if(stats)return{stats,absolutePath}}return null},canBeListed=(excluded,file)=>{let slashed=slasher(file),whether=!0;for(let mark=0;mark<excluded.length;mark++){let source=excluded[mark];if(sourceMatches(source,slashed)){whether=!1;break}}return whether},renderDirectory=async(current,acceptsJSON,handlers,methods,config,paths)=>{let{directoryListing,trailingSlash,unlisted=[],renderSingle}=config,slashSuffix=typeof trailingSlash=="boolean"?trailingSlash?"/":"":"/",{relativePath,absolutePath}=paths,excluded=[".DS_Store",".git",...unlisted];if(!applicable(relativePath,directoryListing)&&!renderSingle)return{};let files=await handlers.readdir(absolutePath),canRenderSingle=renderSingle&&files.length===1;for(let index=0;index<files.length;index++){let file=files[index],filePath=path6.resolve(absolutePath,file),details=path6.parse(filePath),stats=null;if(methods.lstat?stats=await handlers.lstat(filePath,!0):stats=await handlers.lstat(filePath),details.relative=path6.join(relativePath,details.base),stats.isDirectory())details.base+=slashSuffix,details.relative+=slashSuffix,details.type="folder";else{if(canRenderSingle)return{singleFile:!0,absolutePath:filePath,stats};details.ext=details.ext.split(".")[1]||"txt",details.type="file",details.size=bytes2(stats.size,{unitSeparator:" ",decimalPlaces:0})}details.title=details.base,canBeListed(excluded,file)?files[index]=details:delete files[index]}let toRoot=path6.relative(current,absolutePath),directory=path6.join(path6.basename(current),toRoot,slashSuffix),pathParts=directory.split(path6.sep).filter(Boolean);if(files=files.sort((a,b)=>{let aIsDir=a.type==="directory",bIsDir=b.type==="directory";return aIsDir&&!bIsDir?-1:bIsDir&&!aIsDir||a.base>b.base?1:a.base<b.base?-1:0}).filter(Boolean),toRoot.length>0){let directoryPath=[...pathParts].slice(1),relative4=path6.join("/",...directoryPath,"..",slashSuffix);files.unshift({type:"directory",base:"..",relative:relative4,title:relative4,ext:""})}let subPaths=[];for(let index=0;index<pathParts.length;index++){let parents=[],isLast=index===pathParts.length-1,before=0;for(;before<=index;)parents.push(pathParts[before]),before++;parents.shift(),subPaths.push({name:pathParts[index]+(isLast?slashSuffix:"/"),url:index===0?"":parents.join("/")+slashSuffix})}let spec={files,directory,paths:subPaths};return{directory:acceptsJSON?JSON.stringify(spec):directoryTemplate2(spec)}},sendError=async(absolutePath,response,acceptsJSON,current,handlers,config,spec)=>{let{err:original,message:message2,code,statusCode}=spec;if(original&&process.env.NODE_ENV!=="test"&&console.error(original),response.statusCode=statusCode,acceptsJSON){response.setHeader("Content-Type","application/json; charset=utf-8"),response.end(JSON.stringify({error:{code,message:message2}}));return}let stats=null,errorPage=path6.join(current,`${statusCode}.html`);try{stats=await handlers.lstat(errorPage)}catch(err){err.code!=="ENOENT"&&console.error(err)}if(stats){let stream=null;try{stream=await handlers.createReadStream(errorPage);let headers2=await getHeaders(handlers,config,current,errorPage,stats);response.writeHead(statusCode,headers2),stream.pipe(response);return}catch(err){console.error(err)}}let headers=await getHeaders(handlers,config,current,absolutePath,null);headers["Content-Type"]="text/html; charset=utf-8",response.writeHead(statusCode,headers),response.end(errorTemplate({statusCode,message:message2}))},internalError=async(...args2)=>{let lastIndex=args2.length-1,err=args2[lastIndex];return args2[lastIndex]={statusCode:500,code:"internal_server_error",message:"A server error has occurred",err},sendError(...args2)},getHandlers=methods=>Object.assign({lstat:promisify(lstat2),realpath:promisify(realpath),createReadStream,readdir:promisify(readdir2),sendError},methods);module2.exports=async(request,response,config={},methods={})=>{let cwd=process.cwd(),current=config.public?path6.resolve(cwd,config.public):cwd,handlers=getHandlers(methods),relativePath=null,acceptsJSON=null;request.headers.accept&&(acceptsJSON=request.headers.accept.includes("application/json"));try{relativePath=decodeURIComponent(url4.parse(request.url).pathname)}catch{return sendError("/",response,acceptsJSON,current,handlers,config,{statusCode:400,code:"bad_request",message:"Bad Request"})}let absolutePath=path6.join(current,relativePath);if(!isPathInside(absolutePath,current))return sendError(absolutePath,response,acceptsJSON,current,handlers,config,{statusCode:400,code:"bad_request",message:"Bad Request"});let cleanUrl=applicable(relativePath,config.cleanUrls),redirect2=shouldRedirect(relativePath,config,cleanUrl);if(redirect2){response.writeHead(redirect2.statusCode,{Location:encodeURI(redirect2.target)}),response.end();return}let stats=null;if(path6.extname(relativePath)!=="")try{stats=await handlers.lstat(absolutePath)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}let rewrittenPath=applyRewrites(relativePath,config.rewrites);if(!stats&&(cleanUrl||rewrittenPath))try{let related=await findRelated(current,relativePath,rewrittenPath,handlers.lstat);related&&({stats,absolutePath}=related)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}if(!stats)try{stats=await handlers.lstat(absolutePath)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}if(stats&&stats.isDirectory()){let directory=null,singleFile=null;try{let related=await renderDirectory(current,acceptsJSON,handlers,methods,config,{relativePath,absolutePath});related.singleFile?{stats,absolutePath,singleFile}=related:{directory}=related}catch(err){if(err.code!=="ENOENT")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}if(directory){let contentType2=acceptsJSON?"application/json; charset=utf-8":"text/html; charset=utf-8";response.statusCode=200,response.setHeader("Content-Type",contentType2),response.end(directory);return}singleFile||(stats=null)}let isSymLink=stats&&stats.isSymbolicLink();if(!stats||!config.symlinks&&isSymLink)return handlers.sendError(absolutePath,response,acceptsJSON,current,handlers,config,{statusCode:404,code:"not_found",message:"The requested path could not be found"});isSymLink&&(absolutePath=await handlers.realpath(absolutePath),stats=await handlers.lstat(absolutePath));let streamOpts={};if(request.headers.range&&stats.size){let range=parseRange(stats.size,request.headers.range);if(typeof range=="object"&&range.type==="bytes"){let{start,end}=range[0];streamOpts.start=start,streamOpts.end=end,response.statusCode=206}else response.statusCode=416,response.setHeader("Content-Range",`bytes */${stats.size}`)}let stream=null;try{stream=await handlers.createReadStream(absolutePath,streamOpts)}catch(err){return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}let headers=await getHeaders(handlers,config,current,absolutePath,stats);if(streamOpts.start!==void 0&&streamOpts.end!==void 0&&(headers["Content-Range"]=`bytes ${streamOpts.start}-${streamOpts.end}/${stats.size}`,headers["Content-Length"]=streamOpts.end-streamOpts.start+1),request.headers.range==null&&headers.ETag&&headers.ETag===request.headers["if-none-match"]){response.statusCode=304,response.end();return}response.writeHead(response.statusCode||200,headers),stream.pipe(response)}}});var require_dist6=__commonJS({"../../node_modules/.pnpm/pcre-to-regexp@1.0.0/node_modules/pcre-to-regexp/dist/index.js"(exports2,module2){"use strict";var characterClasses={alnum:"[A-Za-z0-9]",word:"[A-Za-z0-9_]",alpha:"[A-Za-z]",blank:"[ \\t]",cntrl:"[\\x00-\\x1F\\x7F]",digit:"\\d",graph:"[\\x21-\\x7E]",lower:"[a-z]",print:"[\\x20-\\x7E]",punct:"[\\]\\[!\"#$%&'()*+,./:;<=>?@\\\\^_`{|}~-]",space:"\\s",upper:"[A-Z]",xdigit:"[A-Fa-f0-9]"};function createPCRE(pattern,namedCaptures){pattern=String(pattern||"").trim();let originalPattern=pattern,delim,flags="";if(/^[^a-zA-Z\\\s]/.test(pattern)){delim=pattern[0];let lastDelimIndex=pattern.lastIndexOf(delim);flags+=pattern.substring(lastDelimIndex+1),pattern=pattern.substring(1,lastDelimIndex)}let numGroups=0;pattern=replaceCaptureGroups(pattern,group=>{if(/^\(\?[P<']/.test(group)){let match=/^\(\?P?[<']([^>']+)[>']/.exec(group);if(!match)throw new Error(`Failed to extract named captures from ${JSON.stringify(group)}`);let capture=group.substring(match[0].length,group.length-1);return namedCaptures&&(namedCaptures[numGroups]=match[1]),numGroups++,`(${capture})`}return group.substring(0,3)==="(?:"||numGroups++,group}),pattern=pattern.replace(/\[:([^:]+):\]/g,(characterClass,name)=>characterClasses[name]||characterClass);let regexp=new RegExp(pattern,flags);return regexp.delimiter=delim,regexp.pcrePattern=originalPattern,regexp.pcreFlags=flags,regexp}function replaceCaptureGroups(pattern,fn2){let start=0,depth=0,escaped=!1;for(let i=0;i<pattern.length;i++){let cur=pattern[i];if(escaped){escaped=!1;continue}switch(cur){case"(":depth===0&&(start=i),depth++;break;case")":if(depth>0&&(depth--,depth===0)){let end=i+1,l=start===0?"":pattern.substring(0,start),r=pattern.substring(end),v=String(fn2(pattern.substring(start,end)));pattern=l+v+r,i=start}break;case"\\":escaped=!0;break;default:break}}return pattern}createPCRE.characterClasses=characterClasses;module2.exports=createPCRE}});var require_dist7=__commonJS({"../../node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js"(exports2,module2){"use strict";function noop(){}function once2(emitter,name){let o=once2.spread(emitter,name),r=o.then(args2=>args2[0]);return r.cancel=o.cancel,r}(function(once3){function spread(emitter,name){let c=null,p=new Promise((resolve3,reject)=>{function cancel(){emitter.removeListener(name,onEvent),emitter.removeListener("error",onError),p.cancel=noop}function onEvent(...args2){cancel(),resolve3(args2)}function onError(err){cancel(),reject(err)}c=cancel,emitter.on(name,onEvent),emitter.on("error",onError)});if(!c)throw new TypeError("Could not get `cancel()` function");return p.cancel=c,p}once3.spread=spread})(once2||(once2={}));module2.exports=once2}});var require_get_port=__commonJS({"../../node_modules/.pnpm/get-port@5.1.1/node_modules/get-port/index.js"(exports2,module2){"use strict";var net=__require("net"),Locked=class extends Error{constructor(port){super(`${port} is locked`)}},lockedPorts={old:new Set,young:new Set},releaseOldLockedPortsIntervalMs=1e3*15,interval,getAvailablePort=options=>new Promise((resolve3,reject)=>{let server=net.createServer();server.unref(),server.on("error",reject),server.listen(options,()=>{let{port}=server.address();server.close(()=>{resolve3(port)})})}),portCheckSequence=function*(ports){ports&&(yield*ports),yield 0};module2.exports=async options=>{let ports;options&&(ports=typeof options.port=="number"?[options.port]:options.port),interval===void 0&&(interval=setInterval(()=>{lockedPorts.old=lockedPorts.young,lockedPorts.young=new Set},releaseOldLockedPortsIntervalMs),interval.unref&&interval.unref());for(let port of portCheckSequence(ports))try{let availablePort=await getAvailablePort({...options,port});for(;lockedPorts.old.has(availablePort)||lockedPorts.young.has(availablePort);){if(port!==0)throw new Locked(port);availablePort=await getAvailablePort({...options,port})}return lockedPorts.young.add(availablePort),availablePort}catch(error2){if(!["EADDRINUSE","EACCES"].includes(error2.code)&&!(error2 instanceof Locked))throw error2}throw new Error("No available ports found")};module2.exports.makeRange=(from,to)=>{if(!Number.isInteger(from)||!Number.isInteger(to))throw new TypeError("`from` and `to` must be integer numbers");if(from<1024||from>65535)throw new RangeError("`from` must be between 1024 and 65535");if(to<1024||to>65536)throw new RangeError("`to` must be between 1024 and 65536");if(to<from)throw new RangeError("`to` must be greater than or equal to `from`");return function*(from2,to2){for(let port=from2;port<=to2;port++)yield port}(from,to)}}});var require_is_port_reachable=__commonJS({"../../node_modules/.pnpm/is-port-reachable@3.1.0/node_modules/is-port-reachable/index.js"(exports2,module2){"use strict";var net=__require("net");module2.exports=async(port,{timeout=1e3,host}={})=>{let promise=new Promise((resolve3,reject)=>{let socket=new net.Socket,onError=()=>{socket.destroy(),reject()};socket.setTimeout(timeout),socket.once("error",onError),socket.once("timeout",onError),socket.connect(port,host,()=>{socket.end(),resolve3()})});try{return await promise,!0}catch{return!1}}}});var require_dispatch=__commonJS({"../../internals/local-schedules/dist/dispatch.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),dispatch_exports={};__export(dispatch_exports,{createDispatch:()=>createDispatch});module2.exports=__toCommonJS(dispatch_exports);function createDispatch(schedule,payload,scheduledAtMs,occurrenceId,invokeSource,signal){let scheduledAt=new Date(scheduledAtMs).toISOString(),common={schedule,occurrenceId,scheduledAt,invokeSource,signal};return schedule.target.type==="queue"?{...common,delivery:{type:"queue",topic:schedule.target.topic,message:{scheduleId:schedule.scheduleId,executionId:occurrenceId,name:schedule.name,namespace:schedule.namespace,trackId:schedule.trackId,scheduledAt,source:schedule.source,...payload===void 0?{}:{payload:JSON.parse(payload)}}}}:{...common,delivery:{type:"function",function:schedule.target.function,headers:{"ce-specversion":"1.0","ce-type":"com.vercel.schedule.v1beta","ce-source":`/schedule/${encodeURIComponent(schedule.namespace)}/${encodeURIComponent(schedule.name)}`,"ce-id":occurrenceId,"ce-vssscheduleid":schedule.scheduleId,"ce-vssscheduledat":scheduledAt,"ce-vssschedulename":schedule.name,"ce-vssnamespace":schedule.namespace,"ce-vssschedulesource":schedule.source}}}}}});var require_node2=__commonJS({"../../node_modules/.pnpm/ulid@3.0.1/node_modules/ulid/dist/node/index.cjs"(exports2){"use strict";var crypto=__require("node:crypto"),B32_CHARACTERS="0123456789ABCDEFGHJKMNPQRSTVWXYZ",ENCODING="0123456789ABCDEFGHJKMNPQRSTVWXYZ",ENCODING_LEN=32,MAX_ULID="7ZZZZZZZZZZZZZZZZZZZZZZZZZ",MIN_ULID="00000000000000000000000000",RANDOM_LEN=16,TIME_LEN=10,TIME_MAX=0xffffffffffff,ULID_REGEX=/^[0-7][0-9a-hjkmnp-tv-zA-HJKMNP-TV-Z]{25}$/,UUID_REGEX=/^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/;exports2.ULIDErrorCode=void 0;(function(ULIDErrorCode){ULIDErrorCode.Base32IncorrectEncoding="B32_ENC_INVALID",ULIDErrorCode.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",ULIDErrorCode.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",ULIDErrorCode.EncodeTimeNegative="ENC_TIME_NEG",ULIDErrorCode.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",ULIDErrorCode.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",ULIDErrorCode.PRNGDetectFailure="PRNG_DETECT",ULIDErrorCode.ULIDInvalid="ULID_INVALID",ULIDErrorCode.Unexpected="UNEXPECTED",ULIDErrorCode.UUIDInvalid="UUID_INVALID"})(exports2.ULIDErrorCode||(exports2.ULIDErrorCode={}));var ULIDError=class extends Error{constructor(errorCode,message2){super(`${message2} (${errorCode})`),this.name="ULIDError",this.code=errorCode}};function randomChar(prng){let randomPosition=Math.floor(prng()*ENCODING_LEN)%ENCODING_LEN;return ENCODING.charAt(randomPosition)}function replaceCharAt(str,index,char){return index>str.length-1?str:str.substr(0,index)+char+str.substr(index+1)}function crockfordEncode(input){let output=[],bitsRead=0,buffer=0,reversedInput=new Uint8Array(input.slice().reverse());for(let byte of reversedInput)for(buffer|=byte<<bitsRead,bitsRead+=8;bitsRead>=5;)output.unshift(buffer&31),buffer>>>=5,bitsRead-=5;return bitsRead>0&&output.unshift(buffer&31),output.map(byte=>B32_CHARACTERS.charAt(byte)).join("")}function crockfordDecode(input){let sanitizedInput=input.toUpperCase().split("").reverse().join(""),output=[],bitsRead=0,buffer=0;for(let character of sanitizedInput){let byte=B32_CHARACTERS.indexOf(character);if(byte===-1)throw new Error(`Invalid base 32 character found in string: ${character}`);for(buffer|=byte<<bitsRead,bitsRead+=5;bitsRead>=8;)output.unshift(buffer&255),buffer>>>=8,bitsRead-=8}return(bitsRead>=5||buffer>0)&&output.unshift(buffer&255),new Uint8Array(output)}function fixULIDBase32(id){return id.replace(/i/gi,"1").replace(/l/gi,"1").replace(/o/gi,"0").replace(/-/g,"")}function incrementBase32(str){let done,index=str.length,char,charIndex,output=str,maxCharIndex=ENCODING_LEN-1;for(;!done&&index-->=0;){if(char=output[index],charIndex=ENCODING.indexOf(char),charIndex===-1)throw new ULIDError(exports2.ULIDErrorCode.Base32IncorrectEncoding,"Incorrectly encoded string");if(charIndex===maxCharIndex){output=replaceCharAt(output,index,ENCODING[0]);continue}done=replaceCharAt(output,index,ENCODING[charIndex+1])}if(typeof done=="string")return done;throw new ULIDError(exports2.ULIDErrorCode.Base32IncorrectEncoding,"Failed incrementing string")}function decodeTime(id){if(id.length!==TIME_LEN+RANDOM_LEN)throw new ULIDError(exports2.ULIDErrorCode.DecodeTimeValueMalformed,"Malformed ULID");let time=id.substr(0,TIME_LEN).toUpperCase().split("").reverse().reduce((carry,char,index)=>{let encodingIndex=ENCODING.indexOf(char);if(encodingIndex===-1)throw new ULIDError(exports2.ULIDErrorCode.DecodeTimeInvalidCharacter,`Time decode error: Invalid character: ${char}`);return carry+=encodingIndex*Math.pow(ENCODING_LEN,index)},0);if(time>TIME_MAX)throw new ULIDError(exports2.ULIDErrorCode.DecodeTimeValueMalformed,`Malformed ULID: timestamp too large: ${time}`);return time}function detectPRNG(root){let rootLookup=detectRoot(),globalCrypto=rootLookup&&(rootLookup.crypto||rootLookup.msCrypto)||(typeof crypto<"u"?crypto:null);if(typeof globalCrypto?.getRandomValues=="function")return()=>{let buffer=new Uint8Array(1);return globalCrypto.getRandomValues(buffer),buffer[0]/255};if(typeof globalCrypto?.randomBytes=="function")return()=>globalCrypto.randomBytes(1).readUInt8()/255;if(crypto?.randomBytes)return()=>crypto.randomBytes(1).readUInt8()/255;throw new ULIDError(exports2.ULIDErrorCode.PRNGDetectFailure,"Failed to find a reliable PRNG")}function detectRoot(){return inWebWorker()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function encodeRandom(len,prng){let str="";for(;len>0;len--)str=randomChar(prng)+str;return str}function encodeTime(now,len=TIME_LEN){if(isNaN(now))throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeValueMalformed,`Time must be a number: ${now}`);if(now>TIME_MAX)throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${TIME_MAX}: ${now}`);if(now<0)throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeNegative,`Time must be positive: ${now}`);if(Number.isInteger(now)===!1)throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeValueMalformed,`Time must be an integer: ${now}`);let mod,str="";for(let currentLen=len;currentLen>0;currentLen--)mod=now%ENCODING_LEN,str=ENCODING.charAt(mod)+str,now=(now-mod)/ENCODING_LEN;return str}function inWebWorker(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function isValid(id){return typeof id=="string"&&id.length===TIME_LEN+RANDOM_LEN&&id.toUpperCase().split("").every(char=>ENCODING.indexOf(char)!==-1)}function monotonicFactory(prng){let currentPRNG=prng||detectPRNG(),lastTime=0,lastRandom;return function(seedTime){let seed=!seedTime||isNaN(seedTime)?Date.now():seedTime;if(seed<=lastTime){let incrementedRandom=lastRandom=incrementBase32(lastRandom);return encodeTime(lastTime,TIME_LEN)+incrementedRandom}lastTime=seed;let newRandom=lastRandom=encodeRandom(RANDOM_LEN,currentPRNG);return encodeTime(seed,TIME_LEN)+newRandom}}function ulid(seedTime,prng){let currentPRNG=prng||detectPRNG(),seed=!seedTime||isNaN(seedTime)?Date.now():seedTime;return encodeTime(seed,TIME_LEN)+encodeRandom(RANDOM_LEN,currentPRNG)}function ulidToUUID(ulid2){if(!ULID_REGEX.test(ulid2))throw new ULIDError(exports2.ULIDErrorCode.ULIDInvalid,`Invalid ULID: ${ulid2}`);let uint8Array=crockfordDecode(ulid2),uuid=Array.from(uint8Array).map(byte=>byte.toString(16).padStart(2,"0")).join("");return uuid=uuid.substring(0,8)+"-"+uuid.substring(8,12)+"-"+uuid.substring(12,16)+"-"+uuid.substring(16,20)+"-"+uuid.substring(20),uuid.toUpperCase()}function uuidToULID(uuid){if(!UUID_REGEX.test(uuid))throw new ULIDError(exports2.ULIDErrorCode.UUIDInvalid,`Invalid UUID: ${uuid}`);let bytes2=uuid.replace(/-/g,"").match(/.{1,2}/g);if(!bytes2)throw new ULIDError(exports2.ULIDErrorCode.Unexpected,`Failed parsing UUID bytes: ${uuid}`);let uint8Array=new Uint8Array(bytes2.map(byte=>parseInt(byte,16)));return crockfordEncode(uint8Array)}exports2.MAX_ULID=MAX_ULID;exports2.MIN_ULID=MIN_ULID;exports2.TIME_LEN=TIME_LEN;exports2.TIME_MAX=TIME_MAX;exports2.ULIDError=ULIDError;exports2.decodeTime=decodeTime;exports2.encodeTime=encodeTime;exports2.fixULIDBase32=fixULIDBase32;exports2.incrementBase32=incrementBase32;exports2.isValid=isValid;exports2.monotonicFactory=monotonicFactory;exports2.ulid=ulid;exports2.ulidToUUID=ulidToUUID;exports2.uuidToULID=uuidToULID}});var require_ids=__commonJS({"../../internals/local-schedules/dist/ids.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),ids_exports={};__export(ids_exports,{generateScheduleId:()=>generateScheduleId,scheduleExecutionId:()=>scheduleExecutionId});module2.exports=__toCommonJS(ids_exports);var import_node_crypto2=__require("node:crypto"),import_ulid=require_node2(),CROCKFORD_BASE32="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function generateScheduleId(){return`sch_${(0,import_ulid.ulid)()}`}function scheduleExecutionId(scheduleId,scheduledAtMs){let hash=(0,import_node_crypto2.createHash)("sha256").update(`${scheduleId}:${scheduledAtMs}`).digest(),value=hash.readBigUInt64BE(0)<<64n|hash.readBigUInt64BE(8),encoded="";for(let i=0;i<26;i++)encoded=CROCKFORD_BASE32[Number(value&31n)]+encoded,value>>=5n;return`schx_${encoded}`}}});var require_types=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/types.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0})}});var require_CronField=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronField.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronField=void 0;var CronField=class _CronField{#hasLastChar=!1;#hasQuestionMarkChar=!1;#wildcard=!1;#values=[];options={rawValue:""};static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(values,options={rawValue:""}){if(!Array.isArray(values))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(values.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...options,rawValue:options.rawValue??""},this.#values=values.sort(_CronField.sorter),this.#wildcard=this.options.wildcard!==void 0?this.options.wildcard:this.#isWildcardValue(),this.#hasLastChar=this.options.rawValue.includes("L")||values.includes("L"),this.#hasQuestionMarkChar=this.options.rawValue.includes("?")||values.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#hasLastChar}get hasQuestionMarkChar(){return this.#hasQuestionMarkChar}get isWildcard(){return this.#wildcard}get values(){return this.#values}static sorter(a,b){let aIsNumber=typeof a=="number",bIsNumber=typeof b=="number";return aIsNumber&&bIsNumber?a-b:!aIsNumber&&!bIsNumber?a.localeCompare(b):aIsNumber?-1:1}serialize(){return{wildcard:this.#wildcard,values:this.#values}}validate(){let badValue,charsString=this.chars.length>0?` or chars ${this.chars.join("")}`:"",charTest=value=>char=>new RegExp(`^\\d{0,2}${char}$`).test(value),rangeTest=value=>(badValue=value,typeof value=="number"?value>=this.min&&value<=this.max:this.chars.some(charTest(value)));if(!this.#values.every(rangeTest))throw new Error(`${this.constructor.name} Validation error, got value ${badValue} expected range ${this.min}-${this.max}${charsString}`);let duplicate=this.#values.find((value,index)=>this.#values.indexOf(value)!==index);if(duplicate)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${duplicate}`)}#isWildcardValue(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(_,i)=>i+this.min).every(value=>this.#values.includes(value))}};exports2.CronField=CronField}});var require_CronDayOfMonth=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronDayOfMonth.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronDayOfMonth=void 0;var CronField_1=require_CronField(),MIN_DAY=1,MAX_DAY=31,DAY_CHARS=Object.freeze(["L"]),CronDayOfMonth=class extends CronField_1.CronField{static get min(){return MIN_DAY}static get max(){return MAX_DAY}static get chars(){return DAY_CHARS}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronDayOfMonth=CronDayOfMonth}});var require_CronDayOfWeek=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronDayOfWeek.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronDayOfWeek=void 0;var CronField_1=require_CronField(),MIN_DAY=0,MAX_DAY=7,DAY_CHARS=Object.freeze(["L"]),CronDayOfWeek=class extends CronField_1.CronField{static get min(){return MIN_DAY}static get max(){return MAX_DAY}static get chars(){return DAY_CHARS}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};exports2.CronDayOfWeek=CronDayOfWeek}});var require_CronHour=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronHour.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronHour=void 0;var CronField_1=require_CronField(),MIN_HOUR=0,MAX_HOUR=23,HOUR_CHARS=Object.freeze([]),CronHour=class extends CronField_1.CronField{static get min(){return MIN_HOUR}static get max(){return MAX_HOUR}static get chars(){return HOUR_CHARS}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronHour=CronHour}});var require_CronMinute=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronMinute.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronMinute=void 0;var CronField_1=require_CronField(),MIN_MINUTE=0,MAX_MINUTE=59,MINUTE_CHARS=Object.freeze([]),CronMinute=class extends CronField_1.CronField{static get min(){return MIN_MINUTE}static get max(){return MAX_MINUTE}static get chars(){return MINUTE_CHARS}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronMinute=CronMinute}});var require_CronDate=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronDate.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronDate=exports2.DAYS_IN_MONTH=exports2.DateMathOp=exports2.TimeUnit=void 0;var luxon_1=__require("luxon"),TimeUnit;(function(TimeUnit2){TimeUnit2.Second="Second",TimeUnit2.Minute="Minute",TimeUnit2.Hour="Hour",TimeUnit2.Day="Day",TimeUnit2.Month="Month",TimeUnit2.Year="Year"})(TimeUnit||(exports2.TimeUnit=TimeUnit={}));var DateMathOp;(function(DateMathOp2){DateMathOp2.Add="Add",DateMathOp2.Subtract="Subtract"})(DateMathOp||(exports2.DateMathOp=DateMathOp={}));exports2.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var CronDate=class _CronDate{#date;#dstStart=null;#dstEnd=null;#verbMap={add:{[TimeUnit.Year]:this.addYear.bind(this),[TimeUnit.Month]:this.addMonth.bind(this),[TimeUnit.Day]:this.addDay.bind(this),[TimeUnit.Hour]:this.addHour.bind(this),[TimeUnit.Minute]:this.addMinute.bind(this),[TimeUnit.Second]:this.addSecond.bind(this)},subtract:{[TimeUnit.Year]:this.subtractYear.bind(this),[TimeUnit.Month]:this.subtractMonth.bind(this),[TimeUnit.Day]:this.subtractDay.bind(this),[TimeUnit.Hour]:this.subtractHour.bind(this),[TimeUnit.Minute]:this.subtractMinute.bind(this),[TimeUnit.Second]:this.subtractSecond.bind(this)}};constructor(timestamp,tz){let dateOpts={zone:tz};if(timestamp?timestamp instanceof _CronDate?(this.#date=timestamp.#date,this.#dstStart=timestamp.#dstStart,this.#dstEnd=timestamp.#dstEnd):timestamp instanceof Date?this.#date=luxon_1.DateTime.fromJSDate(timestamp,dateOpts):typeof timestamp=="number"?this.#date=luxon_1.DateTime.fromMillis(timestamp,dateOpts):(this.#date=luxon_1.DateTime.fromISO(timestamp,dateOpts),this.#date.isValid||(this.#date=luxon_1.DateTime.fromRFC2822(timestamp,dateOpts)),this.#date.isValid||(this.#date=luxon_1.DateTime.fromSQL(timestamp,dateOpts)),this.#date.isValid||(this.#date=luxon_1.DateTime.fromFormat(timestamp,"EEE, d MMM yyyy HH:mm:ss",dateOpts))):this.#date=luxon_1.DateTime.local(),!this.#date.isValid)throw new Error(`CronDate: unhandled timestamp: ${timestamp}`);tz&&tz!==this.#date.zoneName&&(this.#date=this.#date.setZone(tz))}static#isLeapYear(year){return year%4===0&&year%100!==0||year%400===0}get dstStart(){return this.#dstStart}set dstStart(value){this.#dstStart=value}get dstEnd(){return this.#dstEnd}set dstEnd(value){this.#dstEnd=value}addYear(){this.#date=this.#date.plus({years:1})}addMonth(){this.#date=this.#date.plus({months:1}).startOf("month")}addDay(){this.#date=this.#date.plus({days:1}).startOf("day")}addHour(){this.#date=this.#date.plus({hours:1}).startOf("hour")}addMinute(){this.#date=this.#date.plus({minutes:1}).startOf("minute")}addSecond(){this.#date=this.#date.plus({seconds:1})}subtractYear(){this.#date=this.#date.minus({years:1})}subtractMonth(){this.#date=this.#date.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#date=this.#date.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#date=this.#date.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#date=this.#date.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#date=this.#date.minus({seconds:1})}addUnit(unit){this.#verbMap.add[unit]()}subtractUnit(unit){this.#verbMap.subtract[unit]()}invokeDateOperation(verb,unit){if(verb===DateMathOp.Add){this.addUnit(unit);return}if(verb===DateMathOp.Subtract){this.subtractUnit(unit);return}throw new Error(`Invalid verb: ${verb}`)}getDate(){return this.#date.day}getFullYear(){return this.#date.year}getDay(){let weekday=this.#date.weekday;return weekday===7?0:weekday}getMonth(){return this.#date.month-1}getHours(){return this.#date.hour}getMinutes(){return this.#date.minute}getSeconds(){return this.#date.second}getMilliseconds(){return this.#date.millisecond}getTime(){return this.#date.valueOf()}getUTCDate(){return this.#getUTC().day}getUTCFullYear(){return this.#getUTC().year}getUTCDay(){let weekday=this.#getUTC().weekday;return weekday===7?0:weekday}getUTCMonth(){return this.#getUTC().month-1}getUTCHours(){return this.#getUTC().hour}getUTCMinutes(){return this.#getUTC().minute}getUTCSeconds(){return this.#getUTC().second}toISOString(){return this.#date.toUTC().toISO()}toJSON(){return this.#date.toJSON()}setDate(d){this.#date=this.#date.set({day:d})}setFullYear(y){this.#date=this.#date.set({year:y})}setDay(d){this.#date=this.#date.set({weekday:d})}setMonth(m){this.#date=this.#date.set({month:m+1})}setHours(h){this.#date=this.#date.set({hour:h})}setMinutes(m){this.#date=this.#date.set({minute:m})}setSeconds(s){this.#date=this.#date.set({second:s})}setMilliseconds(s){this.#date=this.#date.set({millisecond:s})}toString(){return this.toDate().toString()}toDate(){return this.#date.toJSDate()}isLastDayOfMonth(){let{day,month}=this.#date;if(month===2){let isLeap=_CronDate.#isLeapYear(this.#date.year);return day===exports2.DAYS_IN_MONTH[month-1]-(isLeap?0:1)}return day===exports2.DAYS_IN_MONTH[month-1]}isLastWeekdayOfMonth(){let{day,month}=this.#date,lastDay;return month===2?lastDay=exports2.DAYS_IN_MONTH[month-1]-(_CronDate.#isLeapYear(this.#date.year)?0:1):lastDay=exports2.DAYS_IN_MONTH[month-1],day>lastDay-7}applyDateOperation(op,unit,hoursLength){if(unit===TimeUnit.Month||unit===TimeUnit.Day){this.invokeDateOperation(op,unit);return}let previousHour=this.getHours();this.invokeDateOperation(op,unit);let currentHour=this.getHours(),diff=currentHour-previousHour;diff===2?hoursLength!==24&&(this.dstStart=currentHour):diff===0&&this.getMinutes()===0&&this.getSeconds()===0&&hoursLength!==24&&(this.dstEnd=currentHour)}#getUTC(){return this.#date.toUTC()}};exports2.CronDate=CronDate;exports2.default=CronDate}});var require_CronMonth=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronMonth.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronMonth=void 0;var CronDate_1=require_CronDate(),CronField_1=require_CronField(),MIN_MONTH=1,MAX_MONTH=12,MONTH_CHARS=Object.freeze([]),CronMonth=class extends CronField_1.CronField{static get min(){return MIN_MONTH}static get max(){return MAX_MONTH}static get chars(){return MONTH_CHARS}static get daysInMonth(){return CronDate_1.DAYS_IN_MONTH}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronMonth=CronMonth}});var require_CronSecond=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronSecond.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronSecond=void 0;var CronField_1=require_CronField(),MIN_SECOND=0,MAX_SECOND=59,SECOND_CHARS=Object.freeze([]),CronSecond=class extends CronField_1.CronField{static get min(){return MIN_SECOND}static get max(){return MAX_SECOND}static get chars(){return SECOND_CHARS}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronSecond=CronSecond}});var require_fields=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/index.js"(exports2){"use strict";var __createBinding=exports2&&exports2.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=exports2&&exports2.__exportStar||function(m,exports3){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports3,p)&&__createBinding(exports3,m,p)};Object.defineProperty(exports2,"__esModule",{value:!0});__exportStar(require_types(),exports2);__exportStar(require_CronDayOfMonth(),exports2);__exportStar(require_CronDayOfWeek(),exports2);__exportStar(require_CronField(),exports2);__exportStar(require_CronHour(),exports2);__exportStar(require_CronMinute(),exports2);__exportStar(require_CronMonth(),exports2);__exportStar(require_CronSecond(),exports2)}});var require_CronFieldCollection=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronFieldCollection.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronFieldCollection=void 0;var fields_1=require_fields(),CronFieldCollection=class _CronFieldCollection{#second;#minute;#hour;#dayOfMonth;#month;#dayOfWeek;static from(base,fields){return new _CronFieldCollection({second:this.resolveField(fields_1.CronSecond,base.second,fields.second),minute:this.resolveField(fields_1.CronMinute,base.minute,fields.minute),hour:this.resolveField(fields_1.CronHour,base.hour,fields.hour),dayOfMonth:this.resolveField(fields_1.CronDayOfMonth,base.dayOfMonth,fields.dayOfMonth),month:this.resolveField(fields_1.CronMonth,base.month,fields.month),dayOfWeek:this.resolveField(fields_1.CronDayOfWeek,base.dayOfWeek,fields.dayOfWeek)})}static resolveField(constructor,baseField,fieldValue){return fieldValue?fieldValue instanceof fields_1.CronField?fieldValue:new constructor(fieldValue):baseField}constructor({second,minute,hour,dayOfMonth,month,dayOfWeek}){if(!second)throw new Error("Validation error, Field second is missing");if(!minute)throw new Error("Validation error, Field minute is missing");if(!hour)throw new Error("Validation error, Field hour is missing");if(!dayOfMonth)throw new Error("Validation error, Field dayOfMonth is missing");if(!month)throw new Error("Validation error, Field month is missing");if(!dayOfWeek)throw new Error("Validation error, Field dayOfWeek is missing");if(month.values.length===1&&!dayOfMonth.hasLastChar&&!(parseInt(dayOfMonth.values[0],10)<=fields_1.CronMonth.daysInMonth[month.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#second=second,this.#minute=minute,this.#hour=hour,this.#month=month,this.#dayOfWeek=dayOfWeek,this.#dayOfMonth=dayOfMonth}get second(){return this.#second}get minute(){return this.#minute}get hour(){return this.#hour}get dayOfMonth(){return this.#dayOfMonth}get month(){return this.#month}get dayOfWeek(){return this.#dayOfWeek}static compactField(input){if(input.length===0)return[];let output=[],current;return input.forEach((item,i,arr)=>{if(current===void 0){current={start:item,count:1};return}let prevItem=arr[i-1]||current.start,nextItem=arr[i+1];if(item==="L"||item==="W"){output.push(current),output.push({start:item,count:1}),current=void 0;return}if(current.step===void 0&&nextItem!==void 0){let step=item-prevItem,nextStep=nextItem-item;if(step<=nextStep){current={...current,count:2,end:item,step};return}current.step=1}item-(current.end??0)===current.step?(current.count++,current.end=item):(current.count===1?output.push({start:current.start,count:1}):current.count===2?(output.push({start:current.start,count:1}),output.push({start:current.end??prevItem,count:1})):output.push(current),current={start:item,count:1})}),current&&output.push(current),output}static#handleSingleRange(field,range,max){let step=range.step;return step?step===1&&range.start===field.min&&range.end&&range.end>=max?field.hasQuestionMarkChar?"?":"*":step!==1&&range.start===field.min&&range.end&&range.end>=max-step+1?`*/${step}`:null:null}static#handleMultipleRanges(range,max){let step=range.step;if(step===1)return`${range.start}-${range.end}`;let multiplier=range.start===0?range.count-1:range.count;if(!step)throw new Error("Unexpected range step");if(!range.end)throw new Error("Unexpected range end");if(step*multiplier>range.end){let mapFn=(_,index)=>{if(typeof range.start!="number")throw new Error("Unexpected range start");return index%step===0?range.start+index:null};if(typeof range.start!="number")throw new Error("Unexpected range start");let seed={length:range.end-range.start+1};return Array.from(seed,mapFn).filter(value=>value!==null).join(",")}return range.end===max-step+1?`${range.start}/${step}`:`${range.start}-${range.end}/${step}`}stringifyField(field){let max=field.max,values=field.values;if(field instanceof fields_1.CronDayOfWeek){max=6;let dayOfWeek=this.#dayOfWeek.values;values=dayOfWeek[dayOfWeek.length-1]===7?dayOfWeek.slice(0,-1):dayOfWeek}field instanceof fields_1.CronDayOfMonth&&(max=this.#month.values.length===1?fields_1.CronMonth.daysInMonth[this.#month.values[0]-1]:field.max);let ranges=_CronFieldCollection.compactField(values);if(ranges.length===1){let singleRangeResult=_CronFieldCollection.#handleSingleRange(field,ranges[0],max);if(singleRangeResult)return singleRangeResult}return ranges.map(range=>{let value=range.count===1?range.start.toString():_CronFieldCollection.#handleMultipleRanges(range,max);return field instanceof fields_1.CronDayOfWeek&&field.nthDay>0?`${value}#${field.nthDay}`:value}).join(",")}stringify(includeSeconds=!1){let arr=[];return includeSeconds&&arr.push(this.stringifyField(this.#second)),arr.push(this.stringifyField(this.#minute),this.stringifyField(this.#hour),this.stringifyField(this.#dayOfMonth),this.stringifyField(this.#month),this.stringifyField(this.#dayOfWeek)),arr.join(" ")}serialize(){return{second:this.#second.serialize(),minute:this.#minute.serialize(),hour:this.#hour.serialize(),dayOfMonth:this.#dayOfMonth.serialize(),month:this.#month.serialize(),dayOfWeek:this.#dayOfWeek.serialize()}}};exports2.CronFieldCollection=CronFieldCollection}});var require_CronExpression=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronExpression.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronExpression=exports2.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var CronDate_1=require_CronDate();exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";exports2.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var LOOP_LIMIT=1e4,CronExpression=class _CronExpression{#options;#tz;#currentDate;#startDate;#endDate;#fields;constructor(fields,options){this.#options=options,this.#tz=options.tz,this.#startDate=options.startDate?new CronDate_1.CronDate(options.startDate,this.#tz):null,this.#endDate=options.endDate?new CronDate_1.CronDate(options.endDate,this.#tz):null;let currentDateValue=options.currentDate??options.startDate;if(currentDateValue){let tempCurrentDate=new CronDate_1.CronDate(currentDateValue,this.#tz);this.#startDate&&tempCurrentDate.getTime()<this.#startDate.getTime()?currentDateValue=this.#startDate:this.#endDate&&tempCurrentDate.getTime()>this.#endDate.getTime()&&(currentDateValue=this.#endDate)}this.#currentDate=new CronDate_1.CronDate(currentDateValue,this.#tz),this.#fields=fields}get fields(){return this.#fields}static fieldsToExpression(fields,options){return new _CronExpression(fields,options||{})}static#matchSchedule(value,sequence){return sequence.some(element=>element===value)}static#isLastWeekdayOfMonthMatch(expressions,currentDate){let isLastWeekdayOfMonth=currentDate.isLastWeekdayOfMonth();return expressions.some(expression=>{let weekday=parseInt(expression.toString().charAt(0),10)%7;if(Number.isNaN(weekday))throw new Error(`Invalid last weekday of the month expression: ${expression}`);return currentDate.getDay()===weekday&&isLastWeekdayOfMonth})}next(){return this.#findSchedule()}prev(){return this.#findSchedule(!0)}hasNext(){let current=this.#currentDate;try{return this.#findSchedule(),!0}catch{return!1}finally{this.#currentDate=current}}hasPrev(){let current=this.#currentDate;try{return this.#findSchedule(!0),!0}catch{return!1}finally{this.#currentDate=current}}take(limit){let items=[];if(limit>=0)for(let i=0;i<limit;i++)try{items.push(this.next())}catch{return items}else for(let i=0;i>limit;i--)try{items.push(this.prev())}catch{return items}return items}reset(newDate){this.#currentDate=new CronDate_1.CronDate(newDate||this.#options.currentDate)}stringify(includeSeconds=!1){return this.#fields.stringify(includeSeconds)}includesDate(date){let{second,minute,hour,month}=this.#fields,dt=new CronDate_1.CronDate(date,this.#tz);return!(!second.values.includes(dt.getSeconds())||!minute.values.includes(dt.getMinutes())||!hour.values.includes(dt.getHours())||!month.values.includes(dt.getMonth()+1)||!this.#matchDayOfMonth(dt)||this.#fields.dayOfWeek.nthDay>0&&Math.ceil(dt.getDate()/7)!==this.#fields.dayOfWeek.nthDay)}toString(){return this.#options.expression||this.stringify(!0)}#matchDayOfMonth(currentDate){let isDayOfMonthWildcardMatch=this.#fields.dayOfMonth.isWildcard,isRestrictedDayOfMonth=!isDayOfMonthWildcardMatch,isDayOfWeekWildcardMatch=this.#fields.dayOfWeek.isWildcard,isRestrictedDayOfWeek=!isDayOfWeekWildcardMatch,matchedDOM=_CronExpression.#matchSchedule(currentDate.getDate(),this.#fields.dayOfMonth.values)||this.#fields.dayOfMonth.hasLastChar&¤tDate.isLastDayOfMonth(),matchedDOW=_CronExpression.#matchSchedule(currentDate.getDay(),this.#fields.dayOfWeek.values)||this.#fields.dayOfWeek.hasLastChar&&_CronExpression.#isLastWeekdayOfMonthMatch(this.#fields.dayOfWeek.values,currentDate);return!!(isRestrictedDayOfMonth&&isRestrictedDayOfWeek&&(matchedDOM||matchedDOW)||matchedDOM&&!isRestrictedDayOfWeek||isDayOfMonthWildcardMatch&&!isDayOfWeekWildcardMatch&&matchedDOW)}#matchHour(currentDate,dateMathVerb,reverse){let currentHour=currentDate.getHours(),isMatch=_CronExpression.#matchSchedule(currentHour,this.#fields.hour.values),isDstStart=currentDate.dstStart===currentHour,isDstEnd=currentDate.dstEnd===currentHour;return!isMatch&&!isDstStart?(currentDate.dstStart=null,currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Hour,this.#fields.hour.values.length),!1):isDstStart&&!_CronExpression.#matchSchedule(currentHour-1,this.#fields.hour.values)?(currentDate.invokeDateOperation(dateMathVerb,CronDate_1.TimeUnit.Hour),!1):isDstEnd&&!reverse?(currentDate.dstEnd=null,currentDate.applyDateOperation(CronDate_1.DateMathOp.Add,CronDate_1.TimeUnit.Hour,this.#fields.hour.values.length),!1):!0}#validateTimeSpan(currentDate){if(!this.#startDate&&!this.#endDate)return;let currentTime=currentDate.getTime();if(this.#startDate&¤tTime<this.#startDate.getTime())throw new Error(exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#endDate&¤tTime>this.#endDate.getTime())throw new Error(exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#findSchedule(reverse=!1){let dateMathVerb=reverse?CronDate_1.DateMathOp.Subtract:CronDate_1.DateMathOp.Add,currentDate=new CronDate_1.CronDate(this.#currentDate),startTimestamp=currentDate.getTime(),stepCount=0;for(;++stepCount<LOOP_LIMIT;){if(this.#validateTimeSpan(currentDate),!this.#matchDayOfMonth(currentDate)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Day,this.#fields.hour.values.length);continue}if(!(this.#fields.dayOfWeek.nthDay<=0||Math.ceil(currentDate.getDate()/7)===this.#fields.dayOfWeek.nthDay)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Day,this.#fields.hour.values.length);continue}if(!_CronExpression.#matchSchedule(currentDate.getMonth()+1,this.#fields.month.values)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Month,this.#fields.hour.values.length);continue}if(this.#matchHour(currentDate,dateMathVerb,reverse)){if(!_CronExpression.#matchSchedule(currentDate.getMinutes(),this.#fields.minute.values)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Minute,this.#fields.hour.values.length);continue}if(!_CronExpression.#matchSchedule(currentDate.getSeconds(),this.#fields.second.values)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Second,this.#fields.hour.values.length);continue}if(startTimestamp===currentDate.getTime()){(dateMathVerb==="Add"||currentDate.getMilliseconds()===0)&¤tDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Second,this.#fields.hour.values.length);continue}break}}if(stepCount>LOOP_LIMIT)throw new Error(exports2.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return currentDate.getMilliseconds()!==0&¤tDate.setMilliseconds(0),this.#currentDate=currentDate,currentDate}[Symbol.iterator](){return{next:()=>({value:this.#findSchedule(),done:!this.hasNext()})}}};exports2.CronExpression=CronExpression;exports2.default=CronExpression}});var require_random=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/utils/random.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.seededRandom=seededRandom;function xfnv1a(str){let h=2166136261;for(let i=0;i<str.length;i++)h^=str.charCodeAt(i),h=Math.imul(h,16777619);return()=>h>>>0}function mulberry32(seed){return()=>{let t=seed+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function seededRandom(str){let seed=str?xfnv1a(str)():Math.floor(Math.random()*1e10);return mulberry32(seed)}}});var require_CronExpressionParser=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronExpressionParser.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronExpressionParser=exports2.DayOfWeek=exports2.Months=exports2.CronUnit=exports2.PredefinedExpressions=void 0;var CronFieldCollection_1=require_CronFieldCollection(),CronExpression_1=require_CronExpression(),random_1=require_random(),fields_1=require_fields(),PredefinedExpressions;(function(PredefinedExpressions2){PredefinedExpressions2["@yearly"]="0 0 0 1 1 *",PredefinedExpressions2["@annually"]="0 0 0 1 1 *",PredefinedExpressions2["@monthly"]="0 0 0 1 * *",PredefinedExpressions2["@weekly"]="0 0 0 * * 0",PredefinedExpressions2["@daily"]="0 0 0 * * *",PredefinedExpressions2["@hourly"]="0 0 * * * *",PredefinedExpressions2["@minutely"]="0 * * * * *",PredefinedExpressions2["@secondly"]="* * * * * *",PredefinedExpressions2["@weekdays"]="0 0 0 * * 1-5",PredefinedExpressions2["@weekends"]="0 0 0 * * 0,6"})(PredefinedExpressions||(exports2.PredefinedExpressions=PredefinedExpressions={}));var CronUnit;(function(CronUnit2){CronUnit2.Second="Second",CronUnit2.Minute="Minute",CronUnit2.Hour="Hour",CronUnit2.DayOfMonth="DayOfMonth",CronUnit2.Month="Month",CronUnit2.DayOfWeek="DayOfWeek"})(CronUnit||(exports2.CronUnit=CronUnit={}));var Months;(function(Months2){Months2[Months2.jan=1]="jan",Months2[Months2.feb=2]="feb",Months2[Months2.mar=3]="mar",Months2[Months2.apr=4]="apr",Months2[Months2.may=5]="may",Months2[Months2.jun=6]="jun",Months2[Months2.jul=7]="jul",Months2[Months2.aug=8]="aug",Months2[Months2.sep=9]="sep",Months2[Months2.oct=10]="oct",Months2[Months2.nov=11]="nov",Months2[Months2.dec=12]="dec"})(Months||(exports2.Months=Months={}));var DayOfWeek;(function(DayOfWeek2){DayOfWeek2[DayOfWeek2.sun=0]="sun",DayOfWeek2[DayOfWeek2.mon=1]="mon",DayOfWeek2[DayOfWeek2.tue=2]="tue",DayOfWeek2[DayOfWeek2.wed=3]="wed",DayOfWeek2[DayOfWeek2.thu=4]="thu",DayOfWeek2[DayOfWeek2.fri=5]="fri",DayOfWeek2[DayOfWeek2.sat=6]="sat"})(DayOfWeek||(exports2.DayOfWeek=DayOfWeek={}));var CronExpressionParser=class _CronExpressionParser{static parse(expression,options={}){let{strict=!1,hashSeed}=options,rand=(0,random_1.seededRandom)(hashSeed);expression=PredefinedExpressions[expression]||expression;let rawFields=_CronExpressionParser.#getRawFields(expression,strict);if(!(rawFields.dayOfMonth==="*"||rawFields.dayOfWeek==="*"||!strict))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let second=_CronExpressionParser.#parseField(CronUnit.Second,rawFields.second,fields_1.CronSecond.constraints,rand),minute=_CronExpressionParser.#parseField(CronUnit.Minute,rawFields.minute,fields_1.CronMinute.constraints,rand),hour=_CronExpressionParser.#parseField(CronUnit.Hour,rawFields.hour,fields_1.CronHour.constraints,rand),month=_CronExpressionParser.#parseField(CronUnit.Month,rawFields.month,fields_1.CronMonth.constraints,rand),dayOfMonth=_CronExpressionParser.#parseField(CronUnit.DayOfMonth,rawFields.dayOfMonth,fields_1.CronDayOfMonth.constraints,rand),{dayOfWeek:_dayOfWeek,nthDayOfWeek}=_CronExpressionParser.#parseNthDay(rawFields.dayOfWeek),dayOfWeek=_CronExpressionParser.#parseField(CronUnit.DayOfWeek,_dayOfWeek,fields_1.CronDayOfWeek.constraints,rand),fields=new CronFieldCollection_1.CronFieldCollection({second:new fields_1.CronSecond(second,{rawValue:rawFields.second}),minute:new fields_1.CronMinute(minute,{rawValue:rawFields.minute}),hour:new fields_1.CronHour(hour,{rawValue:rawFields.hour}),dayOfMonth:new fields_1.CronDayOfMonth(dayOfMonth,{rawValue:rawFields.dayOfMonth}),month:new fields_1.CronMonth(month,{rawValue:rawFields.month}),dayOfWeek:new fields_1.CronDayOfWeek(dayOfWeek,{rawValue:rawFields.dayOfWeek,nthDayOfWeek})});return new CronExpression_1.CronExpression(fields,{...options,expression})}static#getRawFields(expression,strict){if(strict&&!expression.length)throw new Error("Invalid cron expression");expression=expression||"0 * * * * *";let atoms=expression.trim().split(/\s+/);if(strict&&atoms.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(atoms.length>6)throw new Error("Invalid cron expression, too many fields");let defaults=["*","*","*","*","*","0"];atoms.length<defaults.length&&atoms.unshift(...defaults.slice(atoms.length));let[second,minute,hour,dayOfMonth,month,dayOfWeek]=atoms;return{second,minute,hour,dayOfMonth,month,dayOfWeek}}static#parseField(field,value,constraints,rand){if((field===CronUnit.Month||field===CronUnit.DayOfWeek)&&(value=value.replace(/[a-z]{3}/gi,match=>{match=match.toLowerCase();let replacer=Months[match]||DayOfWeek[match];if(replacer===void 0)throw new Error(`Validation error, cannot resolve alias "${match}"`);return replacer.toString()})),!constraints.validChars.test(value))throw new Error(`Invalid characters, got value: ${value}`);return value=this.#parseWildcard(value,constraints),value=this.#parseHashed(value,constraints,rand),this.#parseSequence(field,value,constraints)}static#parseWildcard(value,constraints){return value.replace(/[*?]/g,constraints.min+"-"+constraints.max)}static#parseHashed(value,constraints,rand){let randomValue=rand();return value.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(_,min,max,step)=>{if(min&&max&&step){let minNum=parseInt(min,10),maxNum=parseInt(max,10),stepNum=parseInt(step,10);if(minNum>maxNum)throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);if(stepNum<=0)throw new Error(`Invalid step: ${stepNum}, must be positive`);let minStart=Math.max(minNum,constraints.min),offset=Math.floor(randomValue*stepNum),values=[];for(let i=Math.floor(minStart/stepNum)*stepNum+offset;i<=maxNum;i+=stepNum)i>=minStart&&values.push(i);return values.join(",")}else if(min&&max){let minNum=parseInt(min,10),maxNum=parseInt(max,10);if(minNum>maxNum)throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);return String(Math.floor(randomValue*(maxNum-minNum+1))+minNum)}else if(step){let stepNum=parseInt(step,10);if(stepNum<=0)throw new Error(`Invalid step: ${stepNum}, must be positive`);let offset=Math.floor(randomValue*stepNum),values=[];for(let i=Math.floor(constraints.min/stepNum)*stepNum+offset;i<=constraints.max;i+=stepNum)i>=constraints.min&&values.push(i);return values.join(",")}else return String(Math.floor(randomValue*(constraints.max-constraints.min+1)+constraints.min))})}static#parseSequence(field,val,constraints){let stack2=[];function handleResult(result,constraints2){if(Array.isArray(result))stack2.push(...result);else if(_CronExpressionParser.#isValidConstraintChar(constraints2,result))stack2.push(result);else{let v=parseInt(result.toString(),10);if(!(v>=constraints2.min&&v<=constraints2.max))throw new Error(`Constraint error, got value ${result} expected range ${constraints2.min}-${constraints2.max}`);stack2.push(field===CronUnit.DayOfWeek?v%7:result)}}return val.split(",").forEach(atom=>{if(!(atom.length>0))throw new Error("Invalid list value format");handleResult(_CronExpressionParser.#parseRepeat(field,atom,constraints),constraints)}),stack2}static#parseRepeat(field,val,constraints){let atoms=val.split("/");if(atoms.length>2)throw new Error(`Invalid repeat: ${val}`);return atoms.length===2?(isNaN(parseInt(atoms[0],10))||(atoms[0]=`${atoms[0]}-${constraints.max}`),_CronExpressionParser.#parseRange(field,atoms[0],parseInt(atoms[1],10),constraints)):_CronExpressionParser.#parseRange(field,val,1,constraints)}static#validateRange(min,max,constraints){if(!(!isNaN(min)&&!isNaN(max)&&min>=constraints.min&&max<=constraints.max))throw new Error(`Constraint error, got range ${min}-${max} expected range ${constraints.min}-${constraints.max}`);if(min>max)throw new Error(`Invalid range: ${min}-${max}, min(${min}) > max(${max})`)}static#validateRepeatInterval(repeatInterval){if(!(!isNaN(repeatInterval)&&repeatInterval>0))throw new Error(`Constraint error, cannot repeat at every ${repeatInterval} time.`)}static#createRange(field,min,max,repeatInterval){let stack2=[];field===CronUnit.DayOfWeek&&max%7===0&&stack2.push(0);for(let index=min;index<=max;index+=repeatInterval)stack2.indexOf(index)===-1&&stack2.push(index);return stack2}static#parseRange(field,val,repeatInterval,constraints){let atoms=val.split("-");if(atoms.length<=1)return isNaN(+val)?val:+val;let[min,max]=atoms.map(num=>parseInt(num,10));return this.#validateRange(min,max,constraints),this.#validateRepeatInterval(repeatInterval),this.#createRange(field,min,max,repeatInterval)}static#parseNthDay(val){let atoms=val.split("#");if(atoms.length<=1)return{dayOfWeek:atoms[0]};let nthValue=+atoms[atoms.length-1],matches=val.match(/([,-/])/);if(matches!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${matches?.[0]}\` special characters are incompatible`);if(!(atoms.length<=2&&!isNaN(nthValue)&&nthValue>=1&&nthValue<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:atoms[0],nthDayOfWeek:nthValue}}static#isValidConstraintChar(constraints,value){return constraints.chars.some(char=>value.toString().includes(char))}};exports2.CronExpressionParser=CronExpressionParser}});var require_CronFileParser=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronFileParser.js"(exports2){"use strict";var __createBinding=exports2&&exports2.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=exports2&&exports2.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=exports2&&exports2.__importStar||function(){var ownKeys=function(o){return ownKeys=Object.getOwnPropertyNames||function(o2){var ar=[];for(var k in o2)Object.prototype.hasOwnProperty.call(o2,k)&&(ar[ar.length]=k);return ar},ownKeys(o)};return function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k=ownKeys(mod),i=0;i<k.length;i++)k[i]!=="default"&&__createBinding(result,mod,k[i]);return __setModuleDefault(result,mod),result}}();Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronFileParser=void 0;var CronExpressionParser_1=require_CronExpressionParser(),CronFileParser=class _CronFileParser{static async parseFile(filePath){let{readFile:readFile3}=await Promise.resolve().then(()=>__importStar(__require("fs/promises"))),data=await readFile3(filePath,"utf8");return _CronFileParser.#parseContent(data)}static parseFileSync(filePath){let{readFileSync:readFileSync3}=__require("fs"),data=readFileSync3(filePath,"utf8");return _CronFileParser.#parseContent(data)}static#parseContent(data){let blocks=data.split(`
|
|
33
|
-
`),result={variables:{},expressions:[],errors:{}};for(let block of blocks){let entry=block.trim();if(entry.length===0||entry.startsWith("#"))continue;let variableMatch=entry.match(/^(.*)=(.*)$/);if(variableMatch){let[,key,value]=variableMatch;result.variables[key]=value.replace(/["']/g,"");continue}try{let parsedEntry=_CronFileParser.#parseEntry(entry);result.expressions.push(parsedEntry.interval)}catch(err){result.errors[entry]=err}}return result}static#parseEntry(entry){let atoms=entry.split(" ");return{interval:CronExpressionParser_1.CronExpressionParser.parse(atoms.slice(0,5).join(" ")),command:atoms.slice(5,atoms.length)}}};exports2.CronFileParser=CronFileParser}});var require_dist8=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/index.js"(exports2){"use strict";var __createBinding=exports2&&exports2.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=exports2&&exports2.__exportStar||function(m,exports3){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports3,p)&&__createBinding(exports3,m,p)};Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronFileParser=exports2.CronExpressionParser=exports2.CronExpression=exports2.CronFieldCollection=exports2.CronDate=void 0;var CronExpressionParser_1=require_CronExpressionParser(),CronDate_1=require_CronDate();Object.defineProperty(exports2,"CronDate",{enumerable:!0,get:function(){return CronDate_1.CronDate}});var CronFieldCollection_1=require_CronFieldCollection();Object.defineProperty(exports2,"CronFieldCollection",{enumerable:!0,get:function(){return CronFieldCollection_1.CronFieldCollection}});var CronExpression_1=require_CronExpression();Object.defineProperty(exports2,"CronExpression",{enumerable:!0,get:function(){return CronExpression_1.CronExpression}});var CronExpressionParser_2=require_CronExpressionParser();Object.defineProperty(exports2,"CronExpressionParser",{enumerable:!0,get:function(){return CronExpressionParser_2.CronExpressionParser}});var CronFileParser_1=require_CronFileParser();Object.defineProperty(exports2,"CronFileParser",{enumerable:!0,get:function(){return CronFileParser_1.CronFileParser}});__exportStar(require_fields(),exports2);exports2.default=CronExpressionParser_1.CronExpressionParser}});var require_types2=__commonJS({"../../internals/local-schedules/dist/types.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),types_exports={};__export(types_exports,{ScheduleBrokerError:()=>ScheduleBrokerError2});module2.exports=__toCommonJS(types_exports);var ScheduleBrokerError2=class extends Error{constructor(code,message2){super(message2),this.code=code,this.name="ScheduleBrokerError"}}}});var require_timing=__commonJS({"../../internals/local-schedules/dist/timing.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),timing_exports={};__export(timing_exports,{nextCronOccurrence:()=>nextCronOccurrence,nextOccurrence:()=>nextOccurrence,singleOccurrence:()=>singleOccurrence,validateCronJitter:()=>validateCronJitter,validateTimezone:()=>validateTimezone});module2.exports=__toCommonJS(timing_exports);var import_cron_parser=require_dist8(),import_luxon=__require("luxon"),import_types=require_types2();function invalid(message2){throw new import_types.ScheduleBrokerError("invalid_request",message2)}function validateTimezone(timezone){(timezone.length>50||!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(timezone))&&invalid("Expected a valid IANA timezone");try{new Intl.DateTimeFormat("en-US",{timeZone:timezone})}catch{invalid("Expected a valid IANA timezone")}}function parseCron(cron,timezone,after){let fields=cron.split(" ");(fields.length!==5||fields.some(field=>!/^[\d*,/-]+$/.test(field))||fields[2]!=="*"&&fields[4]!=="*"||fields[4].split(/\D+/).some(value=>Number(value)>6))&&invalid("Expected a numeric five-field cron; one of day-of-month/day-of-week must be *, Sunday is 0");try{return import_cron_parser.CronExpressionParser.parse(`0 ${cron}`,{currentDate:after,tz:timezone,strict:!0})}catch(error2){invalid(`Invalid cron: ${error2 instanceof Error?error2.message:String(error2)}`)}}function validateCronJitter(cron,timezone,jitter){let{fields}=parseCron(cron,timezone,0),times=fields.hour.values.flatMap(hour=>fields.minute.values.map(minute=>hour*60+minute)),dayCycle=1440,[,,dayOfMonth,month,dayOfWeek]=cron.split(" ");if(dayOfMonth==="*"&&month==="*"&&dayOfWeek!=="*"){let days=fields.dayOfWeek.values.map(Number),gap=7-days[days.length-1]+days[0];for(let i=1;i<days.length;i++)gap=Math.min(gap,days[i]-days[i-1]);dayCycle*=gap}let cadence=dayCycle-times[times.length-1]+times[0];for(let i=1;i<times.length;i++)cadence=Math.min(cadence,times[i]-times[i-1]);jitter>cadence&&invalid("Jitter exceeds the cron cadence")}function nextCronOccurrence(cron,timezone,after){let iterator=parseCron(cron,timezone,after);for(let attempt=0;attempt<1500;attempt++){let timestamp;try{timestamp=iterator.next().getTime()}catch{invalid("Cron has no calculable next occurrence")}let local=import_luxon.DateTime.fromMillis(timestamp,{zone:timezone}),fields=iterator.fields;if(!fields.hour.values.some(hour=>hour===local.hour)||!fields.minute.values.some(minute=>minute===local.minute))continue;let first=Math.min(...local.getPossibleOffsets().map(date=>date.toMillis()));if(timestamp===first)return timestamp}invalid("Could not resolve cron across timezone transitions")}function singleOccurrence(at,timezone){/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/.test(at)||invalid("Expected YYYY-MM-DDTHH:mm:ss without a timezone suffix");let local=import_luxon.DateTime.fromISO(at,{zone:timezone});return(!local.isValid||local.toFormat("yyyy-MM-dd'T'HH:mm:ss")!==at)&&invalid("One-shot time is invalid or nonexistent in its timezone"),local.getPossibleOffsets().length!==1&&invalid("Ambiguous one-shot time in its timezone"),local.toMillis()}function nextOccurrence(expression,timezone,after){if(expression.type==="cron")return nextCronOccurrence(expression.cron,timezone,after);expression.type!=="single"&&invalid("Unknown schedule expression type");let at=singleOccurrence(expression.at,timezone);return at>=after?at:void 0}}});var require_schedule_broker=__commonJS({"../../internals/local-schedules/dist/schedule-broker.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),schedule_broker_exports={};__export(schedule_broker_exports,{ScheduleBroker:()=>ScheduleBroker3});module2.exports=__toCommonJS(schedule_broker_exports);var import_node_crypto2=__require("node:crypto"),import_node_util=__require("node:util"),import_dispatch=require_dispatch(),import_ids=require_ids(),import_timing=require_timing(),import_types=require_types2(),MAX_TIMER_DELAY=6e4;function invalid(message2){throw new import_types.ScheduleBrokerError("invalid_request",message2)}function identifier2(value){return(typeof value!="string"||!/^[0-9A-Za-z._-]{1,256}$/.test(value))&&invalid("Invalid schedule name or namespace"),value}function keyOf(input){return`${identifier2(input.namespace??"default")}/${identifier2(input.name)}`}function serializePayload(payload){if(payload!==void 0)try{let result=JSON.stringify(payload);return result===void 0&&invalid("Payload must be JSON serializable"),result}catch{invalid("Payload must be JSON serializable")}}function prepare(input,now){let timezone=input.timezone??"UTC";(0,import_timing.validateTimezone)(timezone),input.jitter!==void 0&&(!Number.isInteger(input.jitter)||input.jitter<1||input.jitter>15)&&invalid("Jitter must be an integer from 1 to 15 minutes");let target=input.target;(!target||target.type!=="queue"&&target.type!=="function"||typeof(target.type==="queue"?target.topic:target.function)!="string"||!(target.type==="queue"?target.topic:target.function))&&invalid("Expected a queue topic or function target");let next=(0,import_timing.nextOccurrence)(input.expression,timezone,now);return input.expression.type==="cron"&&input.jitter!==void 0&&(0,import_timing.validateCronJitter)(input.expression.cron,timezone,input.jitter),{expression:{...input.expression},timezone,...input.jitter===void 0?{}:{jitter:input.jitter},target:{...target},payload:serializePayload(input.payload),next}}var ScheduleBroker3=class{constructor(options){this.options=options,this.entries=new Map,this.inFlight=new Set,this.running=!1,this.closed=!1,this.scope={ownerId:options.ownerId,projectId:options.projectId,trackId:options.trackId},Object.values(this.scope).some(value=>typeof value!="string"||!value)&&invalid("An owner, project, and track are required"),this.now=options.now??Date.now,this.random=options.random??Math.random}start(){this.assertOpen(),this.running=!0,this.arm()}create(input){this.assertOpen(),input.target.type!=="queue"&&invalid("Dynamic schedules require a queue target");let name=input.name??`dyn.${(0,import_node_crypto2.randomBytes)(12).toString("hex")}`,key=keyOf({...input,name});if(this.entries.has(key))throw new import_types.ScheduleBrokerError("conflict",`Schedule ${key} already exists`);let entry=this.insert({...input,name},prepare(input,this.now()),"dynamic");return this.arm(),structuredClone(entry.schedule)}get(input){return structuredClone(this.require(input).schedule)}list(input={}){let namespace=identifier2(input.namespace??"default"),limit=input.limit??20;(!Number.isInteger(limit)||limit<1||limit>100)&&invalid("Limit must be between 1 and 100");let after="",scope=[this.scope.ownerId,this.scope.projectId,this.scope.trackId,namespace];if(input.cursor!==void 0)try{let cursor=JSON.parse(Buffer.from(input.cursor,"base64url").toString());(!Array.isArray(cursor)||cursor.length!==5||!scope.every((value,i)=>value===cursor[i]))&&invalid("Invalid list cursor"),after=identifier2(cursor[4])}catch{invalid("Invalid list cursor")}let records=[...this.entries.values()].map(entry=>entry.schedule).filter(schedule=>schedule.namespace===namespace&&schedule.name>after).sort((a,b)=>a.name<b.name?-1:a.name>b.name?1:0),data=records.slice(0,limit);return{data:structuredClone(data),cursor:records.length>limit?Buffer.from(JSON.stringify([...scope,data[data.length-1].name])).toString("base64url"):null}}update(input,changes){this.assertOpen();let entry=this.require(input);changes.target&&changes.target.type!=="queue"&&invalid("Management updates require a queue target");let prepared=prepare({...entry.schedule,...changes,expression:changes.expression??entry.schedule.expression,timezone:changes.timezone??entry.schedule.timezone,target:changes.target??entry.schedule.target,jitter:changes.jitter===null?void 0:changes.jitter??entry.schedule.jitter,payload:changes.payload===void 0?entry.payload===void 0?void 0:JSON.parse(entry.payload):changes.payload===null?void 0:changes.payload},this.schedulingBoundary(entry));return this.replace(entry,prepared),this.arm(),structuredClone(entry.schedule)}delete(input){this.assertOpen();let entry=this.require(input);return this.cancel(entry),this.entries.delete(keyOf(input)),this.arm(),{scheduleId:entry.schedule.scheduleId}}enable(input){return this.setState(input,"active")}disable(input){return this.setState(input,"inactive")}validateStatic(inputs){this.prepareStatic(inputs)}prepareStatic(inputs){this.assertOpen();let prepared=new Map;for(let input of inputs){"payload"in input&&invalid("Static schedule definitions cannot include a payload");let key=keyOf(input),existing=this.entries.get(key);if(prepared.has(key)||existing?.schedule.source==="dynamic")throw new import_types.ScheduleBrokerError("conflict",`Static schedule ${key} conflicts with an existing definition`);prepared.set(key,{input,value:{...prepare(input,this.schedulingBoundary(existing)),payload:existing?.payload}})}return prepared}reconcileStatic(inputs){let prepared=this.prepareStatic(inputs);for(let[key,entry]of this.entries)entry.schedule.source==="static"&&!prepared.has(key)&&(this.cancel(entry),this.entries.delete(key));let result=[];for(let[key,{input,value}]of prepared){let existing=this.entries.get(key),entry=existing??this.insert(input,value,"static");existing&&!this.matches(existing,value)&&this.replace(existing,value),result.push(structuredClone(entry.schedule))}return this.arm(),result}async invoke(input){this.assertOpen();let entry=this.require(input),at=this.now();await this.dispatch(entry,at,"manual")}async close(){this.closed=!0,this.running=!1,this.timer&&clearTimeout(this.timer),this.timer=void 0;for(let entry of this.entries.values())this.cancel(entry);await Promise.allSettled([...this.inFlight])}assertOpen(){if(this.closed)throw new import_types.ScheduleBrokerError("closed","Schedule broker is closed")}require(input){let key=keyOf(input),entry=this.entries.get(key);if(!entry)throw new import_types.ScheduleBrokerError("not_found",`Schedule ${key} not found`);return entry}insert(input,value,source){let{payload,next,...definition2}=value,now=this.now(),entry={schedule:{...this.scope,...definition2,scheduleId:(0,import_ids.generateScheduleId)(),name:input.name,namespace:input.namespace??"default",state:"active",source,createdAt:now,updatedAt:now},payload,next,consumed:!1,pending:new Map,controllers:new Set};return this.entries.set(keyOf(input),entry),entry}matches(entry,value){return(0,import_node_util.isDeepStrictEqual)(entry.schedule.expression,value.expression)&&(0,import_node_util.isDeepStrictEqual)(entry.schedule.target,value.target)&&entry.schedule.timezone===value.timezone&&entry.schedule.jitter===value.jitter&&entry.payload===value.payload}replace(entry,value){this.cancel(entry),(!(0,import_node_util.isDeepStrictEqual)(entry.schedule.expression,value.expression)||entry.schedule.timezone!==value.timezone)&&(entry.consumed=!1);let{payload,next,...definition2}=value;entry.schedule={...entry.schedule,...definition2,jitter:value.jitter,updatedAt:this.now()},entry.payload=payload,entry.next=entry.consumed||entry.schedule.state!=="active"?void 0:next}setState(input,state){this.assertOpen();let entry=this.require(input);if(entry.schedule.state!==state){let next=state==="active"&&!entry.consumed?(0,import_timing.nextOccurrence)(entry.schedule.expression,entry.schedule.timezone,this.schedulingBoundary(entry)):void 0;this.cancel(entry),entry.schedule={...entry.schedule,state,updatedAt:this.now()},entry.next=next,this.arm()}return structuredClone(entry.schedule)}schedulingBoundary(entry){return Math.max(this.now(),(entry?.lastScheduledAt??-1/0)+1)}cancel(entry){entry.next=void 0,entry.pending.clear();for(let controller of entry.controllers)controller.abort();entry.controllers.clear()}arm(){if(this.timer&&clearTimeout(this.timer),this.timer=void 0,!this.running)return;let deadline=1/0;for(let entry of this.entries.values()){entry.next!==void 0&&(deadline=Math.min(deadline,entry.next));for(let due of entry.pending.values())deadline=Math.min(deadline,due)}Number.isFinite(deadline)&&(this.timer=setTimeout(()=>this.tick(),Math.max(0,Math.min(MAX_TIMER_DELAY,deadline-this.now()))),this.timer.unref())}tick(){if(this.timer=void 0,!this.running)return;let now=this.now();for(let entry of this.entries.values()){if(entry.next!==void 0&&entry.next<=now){let at=entry.next;entry.lastScheduledAt=at;let offset=entry.schedule.jitter===void 0?0:Math.floor(this.random()*(entry.schedule.jitter*60+1))*1e3;entry.pending.set(at,at+offset),entry.next=entry.schedule.expression.type==="cron"?(0,import_timing.nextOccurrence)(entry.schedule.expression,entry.schedule.timezone,now):void 0}for(let[at,due]of entry.pending)due>now||(entry.pending.delete(at),this.dispatch(entry,at,"scheduled"))}this.arm()}dispatch(entry,at,source){let controller=new AbortController;entry.controllers.add(controller);let invocation=(0,import_dispatch.createDispatch)(structuredClone(entry.schedule),entry.payload,at,(0,import_ids.scheduleExecutionId)(entry.schedule.scheduleId,at),source,controller.signal),promise=Promise.resolve().then(async()=>{if(!(this.closed||controller.signal.aborted)){source==="scheduled"&&entry.schedule.expression.type==="single"&&(entry.consumed=!0);try{await this.options.dispatch(invocation)}catch(error2){if(controller.signal.aborted)return;if(source==="manual")throw error2;try{this.options.onError(error2,invocation)}catch{}}}}).finally(()=>{entry.controllers.delete(controller),this.inFlight.delete(promise)});return this.inFlight.add(promise),promise}}}});var require_dist9=__commonJS({"../../internals/local-schedules/dist/index.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{ScheduleBroker:()=>import_schedule_broker.ScheduleBroker});module2.exports=__toCommonJS(src_exports);var import_schedule_broker=require_schedule_broker();__reExport(src_exports,require_types2(),module2.exports)}});var require_tree_kill=__commonJS({"../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js"(exports2,module2){"use strict";var childProcess=__require("child_process"),spawn=childProcess.spawn,exec=childProcess.exec;module2.exports=function(pid,signal,callback){if(typeof signal=="function"&&callback===void 0&&(callback=signal,signal=void 0),pid=parseInt(pid),Number.isNaN(pid)){if(callback)return callback(new Error("pid must be a number"));throw new Error("pid must be a number")}var tree={},pidsToProcess={};switch(tree[pid]=[],pidsToProcess[pid]=1,process.platform){case"win32":exec("taskkill /pid "+pid+" /T /F",callback);break;case"darwin":buildProcessTree(pid,tree,pidsToProcess,function(parentPid){return spawn("pgrep",["-P",parentPid])},function(){killAll(tree,signal,callback)});break;default:buildProcessTree(pid,tree,pidsToProcess,function(parentPid){return spawn("ps",["-o","pid","--no-headers","--ppid",parentPid])},function(){killAll(tree,signal,callback)});break}};function killAll(tree,signal,callback){var killed={};try{Object.keys(tree).forEach(function(pid){tree[pid].forEach(function(pidpid){killed[pidpid]||(killPid(pidpid,signal),killed[pidpid]=1)}),killed[pid]||(killPid(pid,signal),killed[pid]=1)})}catch(err){if(callback)return callback(err);throw err}if(callback)return callback()}function killPid(pid,signal){try{process.kill(parseInt(pid,10),signal)}catch(err){if(err.code!=="ESRCH")throw err}}function buildProcessTree(parentPid,tree,pidsToProcess,spawnChildProcessesList,cb){var ps=spawnChildProcessesList(parentPid),allData="";ps.stdout.on("data",function(data){var data=data.toString("ascii");allData+=data});var onClose=function(code){if(delete pidsToProcess[parentPid],code!=0){Object.keys(pidsToProcess).length==0&&cb();return}allData.match(/\d+/g).forEach(function(pid){pid=parseInt(pid,10),tree[parentPid].push(pid),tree[pid]=[],pidsToProcess[pid]=1,buildProcessTree(pid,tree,pidsToProcess,spawnChildProcessesList,cb)})};ps.on("close",onClose)}}});var require_escape_html=__commonJS({"../../node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js"(exports2,module2){"use strict";var matchHtmlRegExp=/["'&<>]/;module2.exports=escapeHtml;function escapeHtml(string){var str=""+string,match=matchHtmlRegExp.exec(str);if(!match)return str;var escape2,html="",index=0,lastIndex=0;for(index=match.index;index<str.length;index++){switch(str.charCodeAt(index)){case 34:escape2=""";break;case 38:escape2="&";break;case 39:escape2="'";break;case 60:escape2="<";break;case 62:escape2=">";break;default:continue}lastIndex!==index&&(html+=str.substring(lastIndex,index)),lastIndex=index+1,html+=escape2}return lastIndex!==index?html+str.substring(lastIndex,index):html}}});var import_chalk4=__toESM(require_source(),1);import path5 from"path";var import_chalk3=__toESM(require_source(),1),import_ms8=__toESM(require_ms(),1),import_fs_extra2=__toESM(require_lib(),1),import_fs_detectors3=__toESM(require_dist4(),1),import_frameworks4=__toESM(require_frameworks(),1);import{resolve as resolve2,join as join6}from"path";var import_fs_extra=__toESM(require_lib(),1),import_ms6=__toESM(require_ms(),1),import_chalk2=__toESM(require_source(),1);import url3,{URL as URL2}from"url";import http from"http";import{Socket}from"net";var import_pluralize2=__toESM(require_pluralize(),1),import_raw_body2=__toESM(require_raw_body(),1),import_async_listen=__toESM(require_dist2(),1),import_minimatch3=__toESM(require_minimatch(),1),import_http_proxy_node16=__toESM(require_http_proxy_node16(),1),import_serve_handler=__toESM(require_src2(),1),import_pcre_to_regexp2=__toESM(require_dist6(),1),import_dotenv=__toESM(require_main(),1),import_once=__toESM(require_dist7(),1),import_directory=__toESM(require_directory(),1),import_get_port2=__toESM(require_get_port(),1),import_fast_deep_equal=__toESM(require_fast_deep_equal(),1);import{randomBytes as randomBytes2,timingSafeEqual}from"crypto";import{watch}from"chokidar";import path4,{isAbsolute as isAbsolute3,basename,dirname as dirname3,extname as extname2,join as join4,sep as sep2}from"path";var import_is_port_reachable=__toESM(require_is_port_reachable(),1);var import_build_utils=__toESM(require_build_utils(),1),import_ms=__toESM(require_ms(),1),REPORT_A_BUG="This is likely a bug in the Vercel CLI. Please report it at https://vercel.com/help.",REPORT_A_BUILDER_BUG="This is likely a bug in the Builder that produced this function. Report it to the Builder's author, or at https://vercel.com/help for an official `@vercel/*` Builder.",dev=defineDiagnostics({codes:{DEV_RECURSIVE_INVOCATION:{why:"`vercel dev` must not recursively invoke itself",fix:"Check the Development Command in your Project Settings and the `dev` script in `package.json` \u2014 neither should call `vercel dev`.",docs:"https://vercel.link/recursive-invocation-of-commands"},DEV_LOCK_HELD:{why:"Another `vercel dev` process is already running for this project",fix:p=>p.detail},DEV_INVALID_WINDOWS_PIPE:{why:p=>`Invalid Windows named pipe endpoint: ${p.endpoint}`,fix:"Use a pipe path beginning with `\\\\.\\`, e.g. `pipe:\\\\.\\pipe\\my-app`."},DEV_INVALID_UNIX_SOCKET:{why:p=>`Invalid UNIX domain socket endpoint: ${p.endpoint}`,fix:"Provide a socket path, e.g. `unix:/tmp/my-app.sock`."},DEV_INVALID_LISTEN_SCHEME:{why:p=>`Unknown \`--listen\` scheme (protocol): ${p.protocol}`,fix:"Use a port (e.g. `3000`), or a `tcp:`, `unix:`, or `pipe:` endpoint."},DEV_PORT_DETECTION_TIMED_OUT:{why:p=>`Detecting port ${p.port} timed out after ${(0,import_ms.default)(p.timeout)}`,fix:"Ensure your Development Command starts a server that listens on the expected port."},DEV_BUILDER_LOAD_FAILED:{why:p=>`Failed to load Builder "${p.use}"`,fix:"Check that the Builder is installed and spelled correctly in your `vercel.json` `builds` configuration."},DEV_SIDECAR_UNSUPPORTED_TYPE:{why:p=>`Development sidecar "${p.name}" has unsupported type "${p.type}"`,fix:REPORT_A_BUILDER_BUG},DEV_SIDECAR_DUPLICATE_NAME:{why:p=>`Multiple builders contributed a development sidecar named "${p.name}"`,fix:REPORT_A_BUILDER_BUG},DEV_QUEUE_CONSUMER_DUPLICATE:{why:p=>`Queue consumer "${p.consumerGroup}" is configured more than once for topic "${p.topic}"`,fix:"Remove the duplicate consumer configuration so each consumer subscribes to a topic only once."},DEV_QUEUE_FUNCTION_UNSUPPORTED:{why:p=>`Can't register the queue trigger for "${p.sourceFile}": ${p.reason}.`,fix:"Use an endpoint supported by the builder for local queue delivery, or test this trigger in a deployment."},DEV_FUNCTION_MANIFEST_INVALID:{why:p=>`Builder "${p.use}" returned an invalid development function manifest.`,fix:"Check getDevManifest output identities, invocation paths, and normalized trigger metadata. Paths must not contain an origin, query, fragment, or traversal."},DEV_FUNCTION_OUTPUT_DUPLICATE:{why:p=>`Development function output "${p.outputPath}" is configured more than once.`,fix:"Each deployment function output must have one owner."},DEV_SCHEDULE_FUNCTION_MISSING:{why:p=>`Schedule "${p.name}" targets missing development function "${p.outputPath}".`,fix:"Use the exact build output ID, not a source path or URL. The builder must expose it through getDevManifest or a supported per-entrypoint function build; service-hosted targets are not supported locally yet."},DEV_SCHEDULE_FUNCTION_TRIGGER:{why:p=>`Schedule "${p.name}" targets function "${p.outputPath}" without a sole schedule/v1beta trigger.`,fix:'Declare experimentalTriggers: [{ "type": "schedule/v1beta" }] on the target function, or have its builder return that trigger in getDevManifest.'},DEV_QUEUE_FUNCTION_UNMATCHED:{why:p=>`No local queue endpoint matches functions["${p.pattern}"]. Its queue trigger will not receive messages.`,fix:"Check the source path and earlier functions entries. The builder must support getDevManifest or a conventional per-entrypoint function build."},DEV_SERVICE_NO_DEV_SERVER:{why:p=>`No dev server available for service "${p.name}" (framework: ${p.framework})`,fix:"Add a Development Command for this service, or set its framework so one can be detected."},DEV_SERVICE_NO_PID:{why:p=>`Failed to start service "${p.name}": no PID returned`,fix:"Verify the service Development Command is executable and starts successfully."},DEV_SERVICE_NO_STDIO:{why:p=>`Failed to start service "${p.name}": expected child process to have stdout and stderr`,fix:REPORT_A_BUG},DEV_BUILDER_RESULT_NOT_LAMBDA:{why:'The result of "builder.build()" must be a `Lambda`',fix:REPORT_A_BUILDER_BUG},DEV_BUILDER_RESULT_HAS_MAXDURATION:{why:'The result of "builder.build()" must not contain `maxDuration`',fix:REPORT_A_BUILDER_BUG},DEV_BUILDER_RESULT_HAS_MEMORY:{why:'The result of "builder.build()" must not contain `memory`',fix:REPORT_A_BUILDER_BUG},DEV_UNSUPPORTED_BUILDER_VERSION:{why:p=>`${p.titleName} CLI does not support builder version ${p.version}`,fix:p=>p.updateMessage},DEV_INVALID_ROUTES:{why:p=>p.message,fix:REPORT_A_BUILDER_BUG},DEV_LISTEN_ADDRESS_IN_USE:{why:p=>`Requested socket ${p.address} is already in use`,fix:"Stop the process using that socket, or pass a different `--listen` address."},DEV_UNSUPPORTED_CONFIG_VERSION:{why:"Cannot run `version: 1` projects",fix:'Upgrade the project to the current configuration \u2014 remove `"version": 1` from your `vercel.json`.'},DEV_CWD_NOT_FOUND:{why:p=>`Directory \`${p.cwd}\` does not exist`,fix:"Run the command from an existing directory, or pass a valid path."},DEV_CWD_NOT_DIRECTORY:{why:p=>`Path \`${p.cwd}\` is not a directory`,fix:"Point the command at a directory rather than a file."},DEV_INTERNAL_ADDRESS_UNAVAILABLE:{why:"Invalid access to `address` because `start` has not yet populated `this.address`",fix:REPORT_A_BUG},DEV_INTERNAL_NO_ROUTE_RESULT:{why:"Expected Route Result but none was found",fix:REPORT_A_BUG},DEV_INTERNAL_MISSING_CHILD_STDIO:{why:"Expected child process to have stdout and stderr",fix:REPORT_A_BUG},DEV_SYSCALL_ERROR:{why:p=>p.message,fix:"This is an operating-system error. Check the file path, permissions, and ports referenced above, then retry."}}}),FIX_BY_CODE={missing_build_script:"Add a `build` script to your `package.json`, or set a Build Command in your Project Settings.",MISSING_DOTENV_VARS:"Define the missing variables in your `.env` file, or pull them with `vercel env pull`.",MAX_LAMBDA_SIZE_EXCEEDED:"Reduce the function bundle \u2014 trim dependencies or included files, or split the function.",NODE_DEPENDENCY_SYNC_FAILED:"Install your dependencies (e.g. `npm install`) and confirm they resolve, then retry.",INSTALL_COMMAND_FAILED:"Fix the dependency error logged above, then retry.",CONFLICTING_CONFIG_FILES:"Keep a single configuration file \u2014 remove the extra `vercel.json`/`now.json`.",CANT_PARSE_JSON_FILE:"Fix the JSON syntax error at the location shown above, then retry."};function toDiagnostic(err){if(err instanceof Diagnostic)return err;let source=err,why=err instanceof Error?err.message:typeof source.message=="string"?source.message:String(err);if(typeof source.errno=="number"||typeof source.syscall=="string")return dev.DEV_SYSCALL_ERROR({message:why,cause:err});let code=typeof source.code=="string"?source.code:void 0,docs=typeof source.link=="string"?source.link:void 0,action=typeof source.action=="string"?source.action:void 0,fix=code?FIX_BY_CODE[code]:void 0,diagnostic=new Diagnostic({why,fix,docs,cause:err});return code&&(diagnostic.name=code),action&&(diagnostic.action=action),diagnostic}var DevCommandExitError=class extends Diagnostic{constructor(message2,exitCode){super({why:message2,fix:"Your Development Command exited before the dev server was ready. Fix the error logged above, then confirm the command runs on its own (e.g. `npm run dev`)."});this.name="DEV_COMMAND_EXITED",this.exitCode=exitCode}},ServiceStartError=class extends Diagnostic{constructor(failures){let dedupeErrorCodes=new Set(["PYTHON_EXTERNAL_VENV_DETECTED"]),seenCodes=new Set,uniqueMessages=[],childFixes=[],childCodes=[];for(let err of failures){let message2=err instanceof Error?err.message:String(err),rawCode=err?.code,code=err instanceof import_build_utils.NowBuildError?err.code:typeof rawCode=="string"?rawCode:void 0;code&&dedupeErrorCodes.has(code)?seenCodes.has(code)||(uniqueMessages.push(message2),seenCodes.add(code)):uniqueMessages.push(message2),code&&!childCodes.includes(code)&&childCodes.push(code);let childFix=code?FIX_BY_CODE[code]:void 0;childFix&&!childFixes.includes(childFix)&&childFixes.push(childFix)}super({why:uniqueMessages.join(`
|
|
32
|
+
>>> no match, partial?`,file,fr,pattern,pr),fr===fl))}var hit;if(typeof p=="string"?(options.nocase?hit=f.toLowerCase()===p.toLowerCase():hit=f===p,this.debug("string match",p,f,hit)):(hit=f.match(p),this.debug("pattern match",p,f,hit)),!hit)return!1}if(fi===fl&&pi===pl)return!0;if(fi===fl)return partial;if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}});var require_path_to_regexp=__commonJS({"../../node_modules/.pnpm/path-to-regexp@2.2.1/node_modules/path-to-regexp/index.js"(exports2,module2){module2.exports=pathToRegexp;module2.exports.parse=parse2;module2.exports.compile=compile;module2.exports.tokensToFunction=tokensToFunction;module2.exports.tokensToRegExp=tokensToRegExp;var DEFAULT_DELIMITER="/",DEFAULT_DELIMITERS="./",PATH_REGEXP=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function parse2(str,options){for(var tokens=[],key=0,index=0,path6="",defaultDelimiter=options&&options.delimiter||DEFAULT_DELIMITER,delimiters=options&&options.delimiters||DEFAULT_DELIMITERS,pathEscaped=!1,res;(res=PATH_REGEXP.exec(str))!==null;){var m=res[0],escaped=res[1],offset=res.index;if(path6+=str.slice(index,offset),index=offset+m.length,escaped){path6+=escaped[1],pathEscaped=!0;continue}var prev="",next=str[index],name=res[2],capture=res[3],group=res[4],modifier=res[5];if(!pathEscaped&&path6.length){var k=path6.length-1;delimiters.indexOf(path6[k])>-1&&(prev=path6[k],path6=path6.slice(0,k))}path6&&(tokens.push(path6),path6="",pathEscaped=!1);var partial=prev!==""&&next!==void 0&&next!==prev,repeat=modifier==="+"||modifier==="*",optional=modifier==="?"||modifier==="*",delimiter2=prev||defaultDelimiter,pattern=capture||group;tokens.push({name:name||key++,prefix:prev,delimiter:delimiter2,optional,repeat,partial,pattern:pattern?escapeGroup(pattern):"[^"+escapeString(delimiter2)+"]+?"})}return(path6||index<str.length)&&tokens.push(path6+str.substr(index)),tokens}function compile(str,options){return tokensToFunction(parse2(str,options))}function tokensToFunction(tokens){for(var matches=new Array(tokens.length),i=0;i<tokens.length;i++)typeof tokens[i]=="object"&&(matches[i]=new RegExp("^(?:"+tokens[i].pattern+")$"));return function(data,options){for(var path6="",encode=options&&options.encode||encodeURIComponent,i2=0;i2<tokens.length;i2++){var token=tokens[i2];if(typeof token=="string"){path6+=token;continue}var value=data?data[token.name]:void 0,segment;if(Array.isArray(value)){if(!token.repeat)throw new TypeError('Expected "'+token.name+'" to not repeat, but got array');if(value.length===0){if(token.optional)continue;throw new TypeError('Expected "'+token.name+'" to not be empty')}for(var j=0;j<value.length;j++){if(segment=encode(value[j],token),!matches[i2].test(segment))throw new TypeError('Expected all "'+token.name+'" to match "'+token.pattern+'"');path6+=(j===0?token.prefix:token.delimiter)+segment}continue}if(typeof value=="string"||typeof value=="number"||typeof value=="boolean"){if(segment=encode(String(value),token),!matches[i2].test(segment))throw new TypeError('Expected "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path6+=token.prefix+segment;continue}if(token.optional){token.partial&&(path6+=token.prefix);continue}throw new TypeError('Expected "'+token.name+'" to be '+(token.repeat?"an array":"a string"))}return path6}}function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function escapeGroup(group){return group.replace(/([=!:$/()])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path6,keys){if(!keys)return path6;var groups=path6.source.match(/\((?!\?)/g);if(groups)for(var i=0;i<groups.length;i++)keys.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return path6}function arrayToRegexp(path6,keys,options){for(var parts=[],i=0;i<path6.length;i++)parts.push(pathToRegexp(path6[i],keys,options).source);return new RegExp("(?:"+parts.join("|")+")",flags(options))}function stringToRegexp(path6,keys,options){return tokensToRegExp(parse2(path6,options),keys,options)}function tokensToRegExp(tokens,keys,options){options=options||{};for(var strict=options.strict,end=options.end!==!1,delimiter2=escapeString(options.delimiter||DEFAULT_DELIMITER),delimiters=options.delimiters||DEFAULT_DELIMITERS,endsWith=[].concat(options.endsWith||[]).map(escapeString).concat("$").join("|"),route="",isEndDelimited=tokens.length===0,i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string")route+=escapeString(token),isEndDelimited=i===tokens.length-1&&delimiters.indexOf(token[token.length-1])>-1;else{var prefix=escapeString(token.prefix),capture=token.repeat?"(?:"+token.pattern+")(?:"+prefix+"(?:"+token.pattern+"))*":token.pattern;keys&&keys.push(token),token.optional?token.partial?route+=prefix+"("+capture+")?":route+="(?:"+prefix+"("+capture+"))?":route+=prefix+"("+capture+")"}}return end?(strict||(route+="(?:"+delimiter2+")?"),route+=endsWith==="$"?"$":"(?="+endsWith+")"):(strict||(route+="(?:"+delimiter2+"(?="+endsWith+"))?"),isEndDelimited||(route+="(?="+delimiter2+"|"+endsWith+")")),new RegExp("^"+route,flags(options))}function pathToRegexp(path6,keys,options){return path6 instanceof RegExp?regexpToRegexp(path6,keys):Array.isArray(path6)?arrayToRegexp(path6,keys,options):stringToRegexp(path6,keys,options)}}});var require_db=__commonJS({"../../node_modules/.pnpm/mime-db@1.33.0/node_modules/mime-db/db.json"(exports2,module2){module2.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"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/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"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"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iana"},"application/emma+xml":{source:"iana",extensions:["emma"]},"application/emotionml+xml":{source:"iana"},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana"},"application/epub+zip":{source:"iana",extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana"},"application/fhir+xml":{source:"iana"},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1,extensions:["woff"]},"application/framework-attributes+xml":{source:"iana"},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geoxacml+xml":{source:"iana"},"application/gml+xml":{source:"iana",extensions:["gml"]},"application/gpx+xml":{source:"apache",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"},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana"},"application/ibe-pkg-reply+xml":{source:"iana"},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana"},"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",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"},"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/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"},"application/kpml-response+xml":{source:"iana"},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana"},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana"},"application/lost+xml":{source:"iana",extensions:["lostxml"]},"application/lostsync+xml":{source:"iana"},"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",extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",extensions:["mathml"]},"application/mathml-content+xml":{source:"iana"},"application/mathml-presentation+xml":{source:"iana"},"application/mbms-associated-procedure-description+xml":{source:"iana"},"application/mbms-deregister+xml":{source:"iana"},"application/mbms-envelope+xml":{source:"iana"},"application/mbms-msk+xml":{source:"iana"},"application/mbms-msk-response+xml":{source:"iana"},"application/mbms-protection-description+xml":{source:"iana"},"application/mbms-reception-report+xml":{source:"iana"},"application/mbms-register+xml":{source:"iana"},"application/mbms-register-response+xml":{source:"iana"},"application/mbms-schedule+xml":{source:"iana"},"application/mbms-user-service-description+xml":{source:"iana"},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana"},"application/media_control+xml":{source:"iana"},"application/mediaservercontrol+xml":{source:"iana",extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",extensions:["metalink"]},"application/metalink4+xml":{source:"iana",extensions:["meta4"]},"application/mets+xml":{source:"iana",extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana"},"application/mods+xml":{source:"iana",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"},"application/mrb-publish+xml":{source:"iana"},"application/msc-ivr+xml":{source:"iana"},"application/msc-mixer+xml":{source:"iana"},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana"},"application/n-triples":{source:"iana"},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana"},"application/node":{source:"iana"},"application/nss":{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/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana"},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana"},"application/pidf-diff+xml":{source:"iana"},"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",extensions:["pls"]},"application/poc-settings+xml":{source:"iana"},"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"},"application/provenance+xml":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana"},"application/pskc+xml":{source:"iana",extensions:["pskcxml"]},"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"]},"application/reginfo+xml":{source:"iana",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",extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",extensions:["rld"]},"application/rfc+xml":{source:"iana"},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana"},"application/rls-services+xml":{source:"iana",extensions:["rs"]},"application/route-apd+xml":{source:"iana"},"application/route-s-tsid+xml":{source:"iana"},"application/route-usd+xml":{source:"iana"},"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",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"},"application/samlmetadata+xml":{source:"iana"},"application/sbml+xml":{source:"iana",extensions:["sbml"]},"application/scaip+xml":{source:"iana"},"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/sep+xml":{source:"iana"},"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",extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana"},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",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",extensions:["srx"]},"application/spirits-event+xml":{source:"iana"},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",extensions:["grxml"]},"application/sru+xml":{source:"iana",extensions:["sru"]},"application/ssdl+xml":{source:"apache",extensions:["ssdl"]},"application/ssml+xml":{source:"iana",extensions:["ssml"]},"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/tei+xml":{source:"iana",extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tnauthlist":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana"},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana"},"application/urc-ressheet+xml":{source:"iana"},"application/urc-targetdesc+xml":{source:"iana"},"application/urc-uisocketdesc+xml":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana"},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana"},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana"},"application/vnd.3gpp.bsf+xml":{source:"iana"},"application/vnd.3gpp.gmop+xml":{source:"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana"},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana"},"application/vnd.3gpp.mcptt-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana"},"application/vnd.3gpp.mid-call+xml":{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.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana"},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana"},"application/vnd.3gpp.srvcc-info+xml":{source:"iana"},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana"},"application/vnd.3gpp.ussd+xml":{source:"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana"},"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",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",extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"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"},"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.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.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",extensions:["mpkg"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"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"},"application/vnd.balsamiq.bmml+xml":{source:"iana"},"application/vnd.balsamiq.bmpr":{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"},"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.businessobjects":{source:"iana",extensions:["rep"]},"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",extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana"},"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"},"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",extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana"},"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"},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{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.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",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.desmume.movie":{source:"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana"},"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.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"},"application/vnd.dvb.notif-container+xml":{source:"iana"},"application/vnd.dvb.notif-generic+xml":{source:"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana"},"application/vnd.dvb.notif-init+xml":{source:"iana"},"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.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"},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana"},"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"},"application/vnd.eszigno3+xml":{source:"iana",extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana"},"application/vnd.etsi.asic-e+zip":{source:"iana"},"application/vnd.etsi.asic-s+zip":{source:"iana"},"application/vnd.etsi.cug+xml":{source:"iana"},"application/vnd.etsi.iptvcommand+xml":{source:"iana"},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana"},"application/vnd.etsi.iptvprofile+xml":{source:"iana"},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana"},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana"},"application/vnd.etsi.iptvservice+xml":{source:"iana"},"application/vnd.etsi.iptvsync+xml":{source:"iana"},"application/vnd.etsi.iptvueprofile+xml":{source:"iana"},"application/vnd.etsi.mcid+xml":{source:"iana"},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana"},"application/vnd.etsi.pstn+xml":{source:"iana"},"application/vnd.etsi.sci+xml":{source:"iana"},"application/vnd.etsi.simservs+xml":{source:"iana"},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana"},"application/vnd.etsi.tsl.der":{source:"iana"},"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.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"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.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.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.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana"},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"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"},"application/vnd.gov.sk.e-form+zip":{source:"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana"},"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",extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",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.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-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"},"application/vnd.imagemeter.image+zip":{source:"iana"},"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"},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana"},"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"},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana"},"application/vnd.iptc.g2.packageitem+xml":{source:"iana"},"application/vnd.iptc.g2.planningitem+xml":{source:"iana"},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"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.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",extensions:["lasxml"]},"application/vnd.liberty-request+xml":{source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",extensions:["lbe"]},"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"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana"},"application/vnd.marlin.drm.conftoken+xml":{source:"iana"},"application/vnd.marlin.drm.license+xml":{source:"iana"},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"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"},"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"},"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"},"application/vnd.ms-printing.printticket+xml":{source:"apache"},"application/vnd.ms-printschematicket+xml":{source:"iana"},"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.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"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"},"application/vnd.nokia.iptv.config+xml":{source:"iana"},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana"},"application/vnd.nokia.landmarkcollection+xml":{source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{source:"iana"},"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"},"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.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana"},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana"},"application/vnd.oipf.dae.xhtml+xml":{source:"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana"},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana"},"application/vnd.oipf.spdlist+xml":{source:"iana"},"application/vnd.oipf.ueprofile+xml":{source:"iana"},"application/vnd.oipf.userprofile+xml":{source:"iana"},"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"},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.imd+xml":{source:"iana"},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana"},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana"},"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"},"application/vnd.oma.bcast.sprov+xml":{source:"iana"},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana"},"application/vnd.oma.cab-feature-handler+xml":{source:"iana"},"application/vnd.oma.cab-pcc+xml":{source:"iana"},"application/vnd.oma.cab-subs-invite+xml":{source:"iana"},"application/vnd.oma.cab-user-prefs+xml":{source:"iana"},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana"},"application/vnd.oma.group-usage-list+xml":{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"},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana"},"application/vnd.oma.poc.final-report+xml":{source:"iana"},"application/vnd.oma.poc.groups+xml":{source:"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana"},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana"},"application/vnd.oma.xcap-directory+xml":{source:"iana"},"application/vnd.omads-email+xml":{source:"iana"},"application/vnd.omads-file+xml":{source:"iana"},"application/vnd.omads-folder+xml":{source:"iana"},"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"},"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"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana"},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana"},"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"},"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.paos.xml":{source:"apache"},"application/vnd.patentdive":{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"},"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.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"},"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"},"application/vnd.radisys.msml+xml":{source:"iana"},"application/vnd.radisys.msml-audit+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana"},"application/vnd.radisys.msml-conf+xml":{source:"iana"},"application/vnd.radisys.msml-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana"},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{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",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.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.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"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.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.software602.filler.form+xml":{source:"iana"},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",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.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana"},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana"},"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.tmd.mediaflex.api+xml":{source:"iana"},"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",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.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",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.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"},"application/vnd.wv.ssp+xml":{source:"iana"},"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"},"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",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",extensions:["zaz"]},"application/voicexml+xml":{source:"iana",extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana"},"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",extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",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",extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",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-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-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-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:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",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"},"application/xaml+xml":{source:"apache",extensions:["xaml"]},"application/xcap-att+xml":{source:"iana"},"application/xcap-caps+xml":{source:"iana"},"application/xcap-diff+xml":{source:"iana",extensions:["xdf"]},"application/xcap-el+xml":{source:"iana"},"application/xcap-error+xml":{source:"iana"},"application/xcap-ns+xml":{source:"iana"},"application/xcon-conference-info+xml":{source:"iana"},"application/xcon-conference-info-diff+xml":{source:"iana"},"application/xenc+xml":{source:"iana",extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache"},"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"},"application/xmpp+xml":{source:"iana"},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",extensions:["xpl"]},"application/xslt+xml":{source:"iana",extensions:["xslt"]},"application/xspf+xml":{source:"apache",extensions:["xspf"]},"application/xv+xml":{source:"iana",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"},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana"},"application/yin+xml":{source:"iana",extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{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/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"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/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/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"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"]},"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/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{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/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{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.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",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana"},"image/apng":{compressible:!1,extensions:["apng"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana"},"image/emf":{source:"iana"},"image/fits":{source:"iana"},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana"},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"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"},"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"},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/tiff-fx":{source:"iana"},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana"},"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"},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"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.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"},"image/vnd.valve.source.texture":{source:"iana"},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana"},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana"},"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"},"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/vnd.collada+xml":{source:"iana",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"},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.valve.source.compiled-map":{source:"iana"},"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"},"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"},"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",compressible:!1},"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/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/fwdred":{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":{extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"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/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"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",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"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"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.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"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":{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":{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/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{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"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"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/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{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/vp8":{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 require_mime_db=__commonJS({"../../node_modules/.pnpm/mime-db@1.33.0/node_modules/mime-db/index.js"(exports2,module2){module2.exports=require_db()}});var require_mime_types2=__commonJS({"../../node_modules/.pnpm/mime-types@2.1.18/node_modules/mime-types/index.js"(exports2){"use strict";var db=require_mime_db(),extname3=__require("path").extname,EXTRACT_TYPE_REGEXP=/^\s*([^;\s]*)(?:;|\s|$)/,TEXT_TYPE_REGEXP=/^text\//i;exports2.charset=charset;exports2.charsets={lookup:charset};exports2.contentType=contentType2;exports2.extension=extension;exports2.extensions=Object.create(null);exports2.lookup=lookup;exports2.types=Object.create(null);populateMaps(exports2.extensions,exports2.types);function charset(type){if(!type||typeof type!="string")return!1;var match=EXTRACT_TYPE_REGEXP.exec(type),mime=match&&db[match[1].toLowerCase()];return mime&&mime.charset?mime.charset:match&&TEXT_TYPE_REGEXP.test(match[1])?"UTF-8":!1}function contentType2(str){if(!str||typeof str!="string")return!1;var mime=str.indexOf("/")===-1?exports2.lookup(str):str;if(!mime)return!1;if(mime.indexOf("charset")===-1){var charset2=exports2.charset(mime);charset2&&(mime+="; charset="+charset2.toLowerCase())}return mime}function extension(type){if(!type||typeof type!="string")return!1;var match=EXTRACT_TYPE_REGEXP.exec(type),exts=match&&exports2.extensions[match[1].toLowerCase()];return!exts||!exts.length?!1:exts[0]}function lookup(path6){if(!path6||typeof path6!="string")return!1;var extension2=extname3("x."+path6).toLowerCase().substr(1);return extension2&&exports2.types[extension2]||!1}function populateMaps(extensions,types){var preference=["nginx","apache",void 0,"iana"];Object.keys(db).forEach(function(type){var mime=db[type],exts=mime.extensions;if(!(!exts||!exts.length)){extensions[type]=exts;for(var i=0;i<exts.length;i++){var extension2=exts[i];if(types[extension2]){var from=preference.indexOf(db[types[extension2]].source),to=preference.indexOf(mime.source);if(types[extension2]!=="application/octet-stream"&&(from>to||from===to&&types[extension2].substr(0,12)==="application/"))continue}types[extension2]=type}}})}}});var require_content_disposition=__commonJS({"../../node_modules/.pnpm/content-disposition@0.5.2/node_modules/content-disposition/index.js"(exports2,module2){"use strict";module2.exports=contentDisposition;module2.exports.parse=parse2;var basename2=__require("path").basename,ENCODE_URL_ATTR_CHAR_REGEXP=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,HEX_ESCAPE_REGEXP=/%[0-9A-Fa-f]{2}/,HEX_ESCAPE_REPLACE_REGEXP=/%([0-9A-Fa-f]{2})/g,NON_LATIN1_REGEXP=/[^\x20-\x7e\xa0-\xff]/g,QESC_REGEXP=/\\([\u0000-\u007f])/g,QUOTE_REGEXP=/([\\"])/g,PARAM_REGEXP=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,TEXT_REGEXP=/^[\x20-\x7e\x80-\xff]+$/,TOKEN_REGEXP=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,EXT_VALUE_REGEXP=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,DISPOSITION_TYPE_REGEXP=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function contentDisposition(filename,options){var opts=options||{},type=opts.type||"attachment",params=createparams(filename,opts.fallback);return format(new ContentDisposition(type,params))}function createparams(filename,fallback){if(filename!==void 0){var params={};if(typeof filename!="string")throw new TypeError("filename must be a string");if(fallback===void 0&&(fallback=!0),typeof fallback!="string"&&typeof fallback!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof fallback=="string"&&NON_LATIN1_REGEXP.test(fallback))throw new TypeError("fallback must be ISO-8859-1 string");var name=basename2(filename),isQuotedString=TEXT_REGEXP.test(name),fallbackName=typeof fallback!="string"?fallback&&getlatin1(name):basename2(fallback),hasFallback=typeof fallbackName=="string"&&fallbackName!==name;return(hasFallback||!isQuotedString||HEX_ESCAPE_REGEXP.test(name))&&(params["filename*"]=name),(isQuotedString||hasFallback)&&(params.filename=hasFallback?fallbackName:name),params}}function format(obj){var parameters=obj.parameters,type=obj.type;if(!type||typeof type!="string"||!TOKEN_REGEXP.test(type))throw new TypeError("invalid type");var string=String(type).toLowerCase();if(parameters&&typeof parameters=="object")for(var param2,params=Object.keys(parameters).sort(),i=0;i<params.length;i++){param2=params[i];var val=param2.substr(-1)==="*"?ustring(parameters[param2]):qstring(parameters[param2]);string+="; "+param2+"="+val}return string}function decodefield(str){var match=EXT_VALUE_REGEXP.exec(str);if(!match)throw new TypeError("invalid extended field value");var charset=match[1].toLowerCase(),encoded=match[2],value,binary=encoded.replace(HEX_ESCAPE_REPLACE_REGEXP,pdecode);switch(charset){case"iso-8859-1":value=getlatin1(binary);break;case"utf-8":value=new Buffer(binary,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return value}function getlatin1(val){return String(val).replace(NON_LATIN1_REGEXP,"?")}function parse2(string){if(!string||typeof string!="string")throw new TypeError("argument string is required");var match=DISPOSITION_TYPE_REGEXP.exec(string);if(!match)throw new TypeError("invalid type format");var index=match[0].length,type=match[1].toLowerCase(),key,names=[],params={},value;for(index=PARAM_REGEXP.lastIndex=match[0].substr(-1)===";"?index-1:index;match=PARAM_REGEXP.exec(string);){if(match.index!==index)throw new TypeError("invalid parameter format");if(index+=match[0].length,key=match[1].toLowerCase(),value=match[2],names.indexOf(key)!==-1)throw new TypeError("invalid duplicate parameter");if(names.push(key),key.indexOf("*")+1===key.length){key=key.slice(0,-1),value=decodefield(value),params[key]=value;continue}typeof params[key]!="string"&&(value[0]==='"'&&(value=value.substr(1,value.length-2).replace(QESC_REGEXP,"$1")),params[key]=value)}if(index!==-1&&index!==string.length)throw new TypeError("invalid parameter format");return new ContentDisposition(type,params)}function pdecode(str,hex){return String.fromCharCode(parseInt(hex,16))}function pencode(char){var hex=String(char).charCodeAt(0).toString(16).toUpperCase();return hex.length===1?"%0"+hex:"%"+hex}function qstring(val){var str=String(val);return'"'+str.replace(QUOTE_REGEXP,"\\$1")+'"'}function ustring(val){var str=String(val),encoded=encodeURIComponent(str).replace(ENCODE_URL_ATTR_CHAR_REGEXP,pencode);return"UTF-8''"+encoded}function ContentDisposition(type,parameters){this.type=type,this.parameters=parameters}}});var require_path_is_inside=__commonJS({"../../node_modules/.pnpm/path-is-inside@1.0.2/node_modules/path-is-inside/lib/path-is-inside.js"(exports2,module2){"use strict";var path6=__require("path");module2.exports=function(thePath,potentialParent){return thePath=stripTrailingSep(thePath),potentialParent=stripTrailingSep(potentialParent),process.platform==="win32"&&(thePath=thePath.toLowerCase(),potentialParent=potentialParent.toLowerCase()),thePath.lastIndexOf(potentialParent,0)===0&&(thePath[potentialParent.length]===path6.sep||thePath[potentialParent.length]===void 0)};function stripTrailingSep(thePath){return thePath[thePath.length-1]===path6.sep?thePath.slice(0,-1):thePath}}});var require_range_parser=__commonJS({"../../node_modules/.pnpm/range-parser@1.2.0/node_modules/range-parser/index.js"(exports2,module2){"use strict";module2.exports=rangeParser;function rangeParser(size,str,options){var index=str.indexOf("=");if(index===-1)return-2;var arr=str.slice(index+1).split(","),ranges=[];ranges.type=str.slice(0,index);for(var i=0;i<arr.length;i++){var range=arr[i].split("-"),start=parseInt(range[0],10),end=parseInt(range[1],10);isNaN(start)?(start=size-end,end=size-1):isNaN(end)&&(end=size-1),end>size-1&&(end=size-1),!(isNaN(start)||isNaN(end)||start>end||start<0)&&ranges.push({start,end})}return ranges.length<1?-1:options&&options.combine?combineRanges(ranges):ranges}function combineRanges(ranges){for(var ordered=ranges.map(mapWithIndex).sort(sortByRangeStart),j=0,i=1;i<ordered.length;i++){var range=ordered[i],current=ordered[j];range.start>current.end+1?ordered[++j]=range:range.end>current.end&&(current.end=range.end,current.index=Math.min(current.index,range.index))}ordered.length=j+1;var combined=ordered.sort(sortByRangeIndex).map(mapWithoutIndex);return combined.type=ranges.type,combined}function mapWithIndex(range,index){return{start:range.start,end:range.end,index}}function mapWithoutIndex(range){return{start:range.start,end:range.end}}function sortByRangeIndex(a,b){return a.index-b.index}function sortByRangeStart(a,b){return a.start-b.start}}});var require_directory=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/directory.js"(exports2,module2){(function(){function directory(it){var encodeHTML6=typeof _encodeHTML<"u"?_encodeHTML:function(doNotSkipEncoded){var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},matchHTML=doNotSkipEncoded?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(code){return code?code.toString().replace(matchHTML,function(m){return encodeHTMLRules[m]||m}):""}}(),out='<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Files within '+encodeHTML6(it.directory)+`</title> <style>body { margin: 0; padding: 30px; background: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased;}main { max-width: 920px;}header { display: flex; justify-content: space-between; flex-wrap: wrap;}h1 { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}header h1 a { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}h1 i { font-style: normal;}ul { margin: 0 0 0 -2px; padding: 20px 0 0 0;}ul li { list-style: none; font-size: 14px; display: flex; justify-content: space-between;}a { text-decoration: none;}ul a { color: #000; padding: 10px 5px; margin: 0 -5px; white-space: nowrap; overflow: hidden; display: block; width: 100%; text-overflow: ellipsis;}header a { color: #0076FF; font-size: 11px; font-weight: 400; display: inline-block; line-height: 20px;}svg { height: 13px; vertical-align: text-bottom;}ul a::before { display: inline-block; vertical-align: middle; margin-right: 10px; width: 24px; text-align: center; line-height: 12px;}ul a.file::before { content: url("data:image/svg+xml;utf8,<svg width='15' height='19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 8C8.34 8 7 6.66 7 5V1H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V8h-4zM8 5c0 1.1.9 2 2 2h3.59L8 1.41V5zM3 0h5l7 7v9c0 1.66-1.34 3-3 3H3c-1.66 0-3-1.34-3-3V3c0-1.66 1.34-3 3-3z' fill='black'/></svg>");}ul a:hover { text-decoration: underline;}ul a.folder::before { content: url("data:image/svg+xml;utf8,<svg width='20' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M18.784 3.87a1.565 1.565 0 0 0-.565-.356V2.426c0-.648-.523-1.171-1.15-1.171H8.996L7.908.25A.89.89 0 0 0 7.302 0H2.094C1.445 0 .944.523.944 1.171v2.3c-.21.085-.398.21-.565.356a1.348 1.348 0 0 0-.377 1.004l.398 9.83C.42 15.393 1.048 16 1.8 16h15.583c.753 0 1.36-.586 1.4-1.339l.398-9.83c.021-.313-.125-.69-.397-.962zM1.843 3.41V1.191c0-.146.104-.272.25-.272H7.26l1.234 1.088c.083.042.167.104.293.104h8.282c.125 0 .25.126.25.272V3.41H1.844zm15.54 11.712H1.78a.47.47 0 0 1-.481-.46l-.397-9.83c0-.147.041-.252.125-.356a.504.504 0 0 1 .377-.147H17.78c.125 0 .272.063.377.147.083.083.125.209.125.334l-.418 9.83c-.021.272-.23.482-.481.482z' fill='black'/></svg>");}ul a.lambda::before { content: url("data:image/svg+xml; utf8,<svg width='15' height='19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3.5 14.4354H5.31622L7.30541 9.81311H7.43514L8.65315 13.0797C9.05676 14.1643 9.55405 14.5 10.7 14.5C11.0171 14.5 11.291 14.4677 11.5 14.4032V13.1572C11.3847 13.1766 11.2622 13.2024 11.1541 13.2024C10.6351 13.2024 10.3829 13.0281 10.1595 12.4664L8.02613 7.07586C7.21171 5.01646 6.54865 4.5 5.11441 4.5C4.83333 4.5 4.62432 4.53228 4.37207 4.59038V5.83635C4.56667 5.81052 4.66036 5.79761 4.77568 5.79761C5.64775 5.79761 5.9 6.0042 6.4045 7.19852L6.64234 7.77954L3.5 14.4354Z' fill='black'/><rect x='0.5' y='0.5' width='14' height='18' rx='2.5' stroke='black'/></svg>");}ul a.file.gif::before,ul a.file.jpg::before,ul a.file.png::before,ul a.file.svg::before { content: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='6' y='6' width='68' height='68' rx='5' ry='5'/><circle cx='24' cy='24' r='8'/><path d='M73 49L59 34 37 52m16 20L27 42 7 58'/></svg>");}::selection { background-color: #79FFE1; color: #000;}::-moz-selection { background-color: #79FFE1; color: #000;}@media (min-width: 768px) { ul {display: flex;flex-wrap: wrap; } ul li {width: 230px;padding-right: 20px; }}@media (min-width: 992px) { body {padding: 45px; } h1, header h1 a {font-size: 15px; } ul li {font-size: 13px;box-sizing: border-box;justify-content: flex-start; }}</style> </head> <body> <main> <header> <h1> <i>Index of </i> `,arr1=it.paths;if(arr1)for(var value,index=-1,l1=arr1.length-1;index<l1;)value=arr1[index+=1],out+=' <a href="/'+encodeHTML6(value.url)+'">'+encodeHTML6(value.name)+"</a> ";out+=' </h1> </header> <ul id="files"> ';var arr2=it.files;if(arr2)for(var value,index=-1,l2=arr2.length-1;index<l2;)value=arr2[index+=1],out+=' <li> <a href="'+encodeHTML6(value.relative)+'" title="'+encodeHTML6(value.title)+'" class="'+encodeHTML6(value.type)+" "+encodeHTML6(value.ext)+'">'+encodeHTML6(value.base)+"</a> </li> ";return out+=" </ul></main> </body></html>",out}var itself=directory,_encodeHTML=function(doNotSkipEncoded){var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},matchHTML=doNotSkipEncoded?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(code){return code?code.toString().replace(matchHTML,function(m){return encodeHTMLRules[m]||m}):""}}();typeof module2<"u"&&module2.exports?module2.exports=itself:typeof define=="function"?define(function(){return itself}):(window.render=window.render||{},window.render.directory=itself)})()}});var require_error=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/error.js"(exports2,module2){(function(){function error2(it){var out='<!DOCTYPE html><head> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/> <style> body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; } main, aside, section { display: flex; justify-content: center; align-items: center; flex-direction: column; } main { height: 100%; } aside { background: #000; flex-shrink: 1; padding: 30px 20px; } aside p { margin: 0; color: #999999; font-size: 14px; line-height: 24px; } aside a { color: #fff; text-decoration: none; } section span { font-size: 24px; font-weight: 500; display: block; border-bottom: 1px solid #EAEAEA; text-align: center; padding-bottom: 20px; width: 100px; } section p { font-size: 14px; font-weight: 400; } section span + p { margin: 20px 0 0 0; } @media (min-width: 768px) { section { height: 40px; flex-direction: row; } section span, section p { height: 100%; line-height: 40px; } section span { border-bottom: 0; border-right: 1px solid #EAEAEA; padding: 0 20px 0 0; width: auto; } section span + p { margin: 0; padding-left: 20px; } aside { padding: 50px 0; } aside p { max-width: 520px; text-align: center; } } </style></head><body> <main> <section> <span>'+it.statusCode+"</span> <p>"+it.message+"</p> </section> </main></body>";return out}var itself=error2,_encodeHTML=function(doNotSkipEncoded){var encodeHTMLRules={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},matchHTML=doNotSkipEncoded?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(code){return code?code.toString().replace(matchHTML,function(m){return encodeHTMLRules[m]||m}):""}}();typeof module2<"u"&&module2.exports?module2.exports=itself:typeof define=="function"?define(function(){return itself}):(window.render=window.render||{},window.render.error=itself)})()}});var require_src2=__commonJS({"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js"(exports2,module2){var{promisify}=__require("util"),path6=__require("path"),{createHash}=__require("crypto"),{realpath,lstat:lstat2,createReadStream,readdir:readdir2}=__require("fs"),url4=require_urlparser(),slasher=require_glob_slash(),minimatch4=require_minimatch2(),pathToRegExp=require_path_to_regexp(),mime=require_mime_types2(),bytes2=require_bytes(),contentDisposition=require_content_disposition(),isPathInside=require_path_is_inside(),parseRange=require_range_parser(),directoryTemplate2=require_directory(),errorTemplate=require_error(),etags=new Map,calculateSha=(handlers,absolutePath)=>new Promise((resolve3,reject)=>{let hash=createHash("sha1");hash.update(path6.extname(absolutePath)),hash.update("-");let rs=handlers.createReadStream(absolutePath);rs.on("error",reject),rs.on("data",buf=>hash.update(buf)),rs.on("end",()=>{let sha=hash.digest("hex");resolve3(sha)})}),sourceMatches=(source,requestPath,allowSegments)=>{let keys=[],slashed=slasher(source),resolvedPath=path6.posix.resolve(requestPath),results=null;if(allowSegments){let normalized=slashed.replace("*","(.*)");results=pathToRegExp(normalized,keys).exec(resolvedPath),results||(keys.length=0)}return results||minimatch4(resolvedPath,slashed)?{keys,results}:null},toTarget=(source,destination,previousPath)=>{let matches=sourceMatches(source,previousPath,!0);if(!matches)return null;let{keys,results}=matches,props={},{protocol}=url4.parse(destination),normalizedDest=protocol?destination:slasher(destination),toPath=pathToRegExp.compile(normalizedDest);for(let index=0;index<keys.length;index++){let{name}=keys[index];props[name]=results[index+1]}return toPath(props)},applyRewrites=(requestPath,rewrites=[],repetitive)=>{let rewritesCopy=rewrites.slice(),fallback=repetitive?requestPath:null;if(rewritesCopy.length===0)return fallback;for(let index=0;index<rewritesCopy.length;index++){let{source,destination}=rewrites[index],target=toTarget(source,destination,requestPath);if(target)return rewritesCopy.splice(index,1),applyRewrites(slasher(target),rewritesCopy,!0)}return fallback},ensureSlashStart=target=>target.startsWith("/")?target:`/${target}`,shouldRedirect=(decodedPath,{redirects=[],trailingSlash},cleanUrl)=>{let slashing=typeof trailingSlash=="boolean",defaultType=301,matchHTML=/(\.html|\/index)$/g;if(redirects.length===0&&!slashing&&!cleanUrl)return null;let cleanedUrl=!1;if(cleanUrl&&matchHTML.test(decodedPath)&&(decodedPath=decodedPath.replace(matchHTML,""),cleanedUrl=!0),slashing){let{ext,name}=path6.parse(decodedPath),isTrailed=decodedPath.endsWith("/"),isDotfile=name.startsWith("."),target=null;if(!trailingSlash&&isTrailed?target=decodedPath.slice(0,-1):trailingSlash&&!isTrailed&&!ext&&!isDotfile&&(target=`${decodedPath}/`),decodedPath.indexOf("//")>-1&&(target=decodedPath.replace(/\/+/g,"/")),target)return{target:ensureSlashStart(target),statusCode:defaultType}}if(cleanedUrl)return{target:ensureSlashStart(decodedPath),statusCode:defaultType};for(let index=0;index<redirects.length;index++){let{source,destination,type}=redirects[index],target=toTarget(source,destination,decodedPath);if(target)return{target,statusCode:type||defaultType}}return null},appendHeaders=(target,source)=>{for(let index=0;index<source.length;index++){let{key,value}=source[index];target[key]=value}},getHeaders=async(handlers,config,current,absolutePath,stats)=>{let{headers:customHeaders=[],etag=!1}=config,related={},{base}=path6.parse(absolutePath),relativePath=path6.relative(current,absolutePath);if(customHeaders.length>0)for(let index=0;index<customHeaders.length;index++){let{source,headers:headers2}=customHeaders[index];sourceMatches(source,slasher(relativePath))&&appendHeaders(related,headers2)}let defaultHeaders={};if(stats){if(defaultHeaders={"Content-Length":stats.size,"Content-Disposition":contentDisposition(base,{type:"inline"}),"Accept-Ranges":"bytes"},etag){let[mtime,sha]=etags.get(absolutePath)||[];Number(mtime)!==Number(stats.mtime)&&(sha=await calculateSha(handlers,absolutePath),etags.set(absolutePath,[stats.mtime,sha])),defaultHeaders.ETag=`"${sha}"`}else defaultHeaders["Last-Modified"]=stats.mtime.toUTCString();let contentType2=mime.contentType(base);contentType2&&(defaultHeaders["Content-Type"]=contentType2)}let headers=Object.assign(defaultHeaders,related);for(let key in headers)headers.hasOwnProperty(key)&&headers[key]===null&&delete headers[key];return headers},applicable=(decodedPath,configEntry)=>{if(typeof configEntry=="boolean")return configEntry;if(Array.isArray(configEntry)){for(let index=0;index<configEntry.length;index++){let source=configEntry[index];if(sourceMatches(source,decodedPath))return!0}return!1}return!0},getPossiblePaths=(relativePath,extension)=>[path6.join(relativePath,`index${extension}`),relativePath.endsWith("/")?relativePath.replace(/\/$/g,extension):relativePath+extension].filter(item=>path6.basename(item)!==extension),findRelated=async(current,relativePath,rewrittenPath,originalStat)=>{let possible=rewrittenPath?[rewrittenPath]:getPossiblePaths(relativePath,".html"),stats=null;for(let index=0;index<possible.length;index++){let related=possible[index],absolutePath=path6.join(current,related);try{stats=await originalStat(absolutePath)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")throw err}if(stats)return{stats,absolutePath}}return null},canBeListed=(excluded,file)=>{let slashed=slasher(file),whether=!0;for(let mark=0;mark<excluded.length;mark++){let source=excluded[mark];if(sourceMatches(source,slashed)){whether=!1;break}}return whether},renderDirectory=async(current,acceptsJSON,handlers,methods,config,paths)=>{let{directoryListing,trailingSlash,unlisted=[],renderSingle}=config,slashSuffix=typeof trailingSlash=="boolean"?trailingSlash?"/":"":"/",{relativePath,absolutePath}=paths,excluded=[".DS_Store",".git",...unlisted];if(!applicable(relativePath,directoryListing)&&!renderSingle)return{};let files=await handlers.readdir(absolutePath),canRenderSingle=renderSingle&&files.length===1;for(let index=0;index<files.length;index++){let file=files[index],filePath=path6.resolve(absolutePath,file),details=path6.parse(filePath),stats=null;if(methods.lstat?stats=await handlers.lstat(filePath,!0):stats=await handlers.lstat(filePath),details.relative=path6.join(relativePath,details.base),stats.isDirectory())details.base+=slashSuffix,details.relative+=slashSuffix,details.type="folder";else{if(canRenderSingle)return{singleFile:!0,absolutePath:filePath,stats};details.ext=details.ext.split(".")[1]||"txt",details.type="file",details.size=bytes2(stats.size,{unitSeparator:" ",decimalPlaces:0})}details.title=details.base,canBeListed(excluded,file)?files[index]=details:delete files[index]}let toRoot=path6.relative(current,absolutePath),directory=path6.join(path6.basename(current),toRoot,slashSuffix),pathParts=directory.split(path6.sep).filter(Boolean);if(files=files.sort((a,b)=>{let aIsDir=a.type==="directory",bIsDir=b.type==="directory";return aIsDir&&!bIsDir?-1:bIsDir&&!aIsDir||a.base>b.base?1:a.base<b.base?-1:0}).filter(Boolean),toRoot.length>0){let directoryPath=[...pathParts].slice(1),relative4=path6.join("/",...directoryPath,"..",slashSuffix);files.unshift({type:"directory",base:"..",relative:relative4,title:relative4,ext:""})}let subPaths=[];for(let index=0;index<pathParts.length;index++){let parents=[],isLast=index===pathParts.length-1,before=0;for(;before<=index;)parents.push(pathParts[before]),before++;parents.shift(),subPaths.push({name:pathParts[index]+(isLast?slashSuffix:"/"),url:index===0?"":parents.join("/")+slashSuffix})}let spec={files,directory,paths:subPaths};return{directory:acceptsJSON?JSON.stringify(spec):directoryTemplate2(spec)}},sendError=async(absolutePath,response,acceptsJSON,current,handlers,config,spec)=>{let{err:original,message:message2,code,statusCode}=spec;if(original&&process.env.NODE_ENV!=="test"&&console.error(original),response.statusCode=statusCode,acceptsJSON){response.setHeader("Content-Type","application/json; charset=utf-8"),response.end(JSON.stringify({error:{code,message:message2}}));return}let stats=null,errorPage=path6.join(current,`${statusCode}.html`);try{stats=await handlers.lstat(errorPage)}catch(err){err.code!=="ENOENT"&&console.error(err)}if(stats){let stream=null;try{stream=await handlers.createReadStream(errorPage);let headers2=await getHeaders(handlers,config,current,errorPage,stats);response.writeHead(statusCode,headers2),stream.pipe(response);return}catch(err){console.error(err)}}let headers=await getHeaders(handlers,config,current,absolutePath,null);headers["Content-Type"]="text/html; charset=utf-8",response.writeHead(statusCode,headers),response.end(errorTemplate({statusCode,message:message2}))},internalError=async(...args2)=>{let lastIndex=args2.length-1,err=args2[lastIndex];return args2[lastIndex]={statusCode:500,code:"internal_server_error",message:"A server error has occurred",err},sendError(...args2)},getHandlers=methods=>Object.assign({lstat:promisify(lstat2),realpath:promisify(realpath),createReadStream,readdir:promisify(readdir2),sendError},methods);module2.exports=async(request,response,config={},methods={})=>{let cwd=process.cwd(),current=config.public?path6.resolve(cwd,config.public):cwd,handlers=getHandlers(methods),relativePath=null,acceptsJSON=null;request.headers.accept&&(acceptsJSON=request.headers.accept.includes("application/json"));try{relativePath=decodeURIComponent(url4.parse(request.url).pathname)}catch{return sendError("/",response,acceptsJSON,current,handlers,config,{statusCode:400,code:"bad_request",message:"Bad Request"})}let absolutePath=path6.join(current,relativePath);if(!isPathInside(absolutePath,current))return sendError(absolutePath,response,acceptsJSON,current,handlers,config,{statusCode:400,code:"bad_request",message:"Bad Request"});let cleanUrl=applicable(relativePath,config.cleanUrls),redirect2=shouldRedirect(relativePath,config,cleanUrl);if(redirect2){response.writeHead(redirect2.statusCode,{Location:encodeURI(redirect2.target)}),response.end();return}let stats=null;if(path6.extname(relativePath)!=="")try{stats=await handlers.lstat(absolutePath)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}let rewrittenPath=applyRewrites(relativePath,config.rewrites);if(!stats&&(cleanUrl||rewrittenPath))try{let related=await findRelated(current,relativePath,rewrittenPath,handlers.lstat);related&&({stats,absolutePath}=related)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}if(!stats)try{stats=await handlers.lstat(absolutePath)}catch(err){if(err.code!=="ENOENT"&&err.code!=="ENOTDIR")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}if(stats&&stats.isDirectory()){let directory=null,singleFile=null;try{let related=await renderDirectory(current,acceptsJSON,handlers,methods,config,{relativePath,absolutePath});related.singleFile?{stats,absolutePath,singleFile}=related:{directory}=related}catch(err){if(err.code!=="ENOENT")return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}if(directory){let contentType2=acceptsJSON?"application/json; charset=utf-8":"text/html; charset=utf-8";response.statusCode=200,response.setHeader("Content-Type",contentType2),response.end(directory);return}singleFile||(stats=null)}let isSymLink=stats&&stats.isSymbolicLink();if(!stats||!config.symlinks&&isSymLink)return handlers.sendError(absolutePath,response,acceptsJSON,current,handlers,config,{statusCode:404,code:"not_found",message:"The requested path could not be found"});isSymLink&&(absolutePath=await handlers.realpath(absolutePath),stats=await handlers.lstat(absolutePath));let streamOpts={};if(request.headers.range&&stats.size){let range=parseRange(stats.size,request.headers.range);if(typeof range=="object"&&range.type==="bytes"){let{start,end}=range[0];streamOpts.start=start,streamOpts.end=end,response.statusCode=206}else response.statusCode=416,response.setHeader("Content-Range",`bytes */${stats.size}`)}let stream=null;try{stream=await handlers.createReadStream(absolutePath,streamOpts)}catch(err){return internalError(absolutePath,response,acceptsJSON,current,handlers,config,err)}let headers=await getHeaders(handlers,config,current,absolutePath,stats);if(streamOpts.start!==void 0&&streamOpts.end!==void 0&&(headers["Content-Range"]=`bytes ${streamOpts.start}-${streamOpts.end}/${stats.size}`,headers["Content-Length"]=streamOpts.end-streamOpts.start+1),request.headers.range==null&&headers.ETag&&headers.ETag===request.headers["if-none-match"]){response.statusCode=304,response.end();return}response.writeHead(response.statusCode||200,headers),stream.pipe(response)}}});var require_dist6=__commonJS({"../../node_modules/.pnpm/pcre-to-regexp@1.0.0/node_modules/pcre-to-regexp/dist/index.js"(exports2,module2){"use strict";var characterClasses={alnum:"[A-Za-z0-9]",word:"[A-Za-z0-9_]",alpha:"[A-Za-z]",blank:"[ \\t]",cntrl:"[\\x00-\\x1F\\x7F]",digit:"\\d",graph:"[\\x21-\\x7E]",lower:"[a-z]",print:"[\\x20-\\x7E]",punct:"[\\]\\[!\"#$%&'()*+,./:;<=>?@\\\\^_`{|}~-]",space:"\\s",upper:"[A-Z]",xdigit:"[A-Fa-f0-9]"};function createPCRE(pattern,namedCaptures){pattern=String(pattern||"").trim();let originalPattern=pattern,delim,flags="";if(/^[^a-zA-Z\\\s]/.test(pattern)){delim=pattern[0];let lastDelimIndex=pattern.lastIndexOf(delim);flags+=pattern.substring(lastDelimIndex+1),pattern=pattern.substring(1,lastDelimIndex)}let numGroups=0;pattern=replaceCaptureGroups(pattern,group=>{if(/^\(\?[P<']/.test(group)){let match=/^\(\?P?[<']([^>']+)[>']/.exec(group);if(!match)throw new Error(`Failed to extract named captures from ${JSON.stringify(group)}`);let capture=group.substring(match[0].length,group.length-1);return namedCaptures&&(namedCaptures[numGroups]=match[1]),numGroups++,`(${capture})`}return group.substring(0,3)==="(?:"||numGroups++,group}),pattern=pattern.replace(/\[:([^:]+):\]/g,(characterClass,name)=>characterClasses[name]||characterClass);let regexp=new RegExp(pattern,flags);return regexp.delimiter=delim,regexp.pcrePattern=originalPattern,regexp.pcreFlags=flags,regexp}function replaceCaptureGroups(pattern,fn2){let start=0,depth=0,escaped=!1;for(let i=0;i<pattern.length;i++){let cur=pattern[i];if(escaped){escaped=!1;continue}switch(cur){case"(":depth===0&&(start=i),depth++;break;case")":if(depth>0&&(depth--,depth===0)){let end=i+1,l=start===0?"":pattern.substring(0,start),r=pattern.substring(end),v=String(fn2(pattern.substring(start,end)));pattern=l+v+r,i=start}break;case"\\":escaped=!0;break;default:break}}return pattern}createPCRE.characterClasses=characterClasses;module2.exports=createPCRE}});var require_dist7=__commonJS({"../../node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js"(exports2,module2){"use strict";function noop(){}function once2(emitter,name){let o=once2.spread(emitter,name),r=o.then(args2=>args2[0]);return r.cancel=o.cancel,r}(function(once3){function spread(emitter,name){let c=null,p=new Promise((resolve3,reject)=>{function cancel(){emitter.removeListener(name,onEvent),emitter.removeListener("error",onError),p.cancel=noop}function onEvent(...args2){cancel(),resolve3(args2)}function onError(err){cancel(),reject(err)}c=cancel,emitter.on(name,onEvent),emitter.on("error",onError)});if(!c)throw new TypeError("Could not get `cancel()` function");return p.cancel=c,p}once3.spread=spread})(once2||(once2={}));module2.exports=once2}});var require_get_port=__commonJS({"../../node_modules/.pnpm/get-port@5.1.1/node_modules/get-port/index.js"(exports2,module2){"use strict";var net=__require("net"),Locked=class extends Error{constructor(port){super(`${port} is locked`)}},lockedPorts={old:new Set,young:new Set},releaseOldLockedPortsIntervalMs=1e3*15,interval,getAvailablePort=options=>new Promise((resolve3,reject)=>{let server=net.createServer();server.unref(),server.on("error",reject),server.listen(options,()=>{let{port}=server.address();server.close(()=>{resolve3(port)})})}),portCheckSequence=function*(ports){ports&&(yield*ports),yield 0};module2.exports=async options=>{let ports;options&&(ports=typeof options.port=="number"?[options.port]:options.port),interval===void 0&&(interval=setInterval(()=>{lockedPorts.old=lockedPorts.young,lockedPorts.young=new Set},releaseOldLockedPortsIntervalMs),interval.unref&&interval.unref());for(let port of portCheckSequence(ports))try{let availablePort=await getAvailablePort({...options,port});for(;lockedPorts.old.has(availablePort)||lockedPorts.young.has(availablePort);){if(port!==0)throw new Locked(port);availablePort=await getAvailablePort({...options,port})}return lockedPorts.young.add(availablePort),availablePort}catch(error2){if(!["EADDRINUSE","EACCES"].includes(error2.code)&&!(error2 instanceof Locked))throw error2}throw new Error("No available ports found")};module2.exports.makeRange=(from,to)=>{if(!Number.isInteger(from)||!Number.isInteger(to))throw new TypeError("`from` and `to` must be integer numbers");if(from<1024||from>65535)throw new RangeError("`from` must be between 1024 and 65535");if(to<1024||to>65536)throw new RangeError("`to` must be between 1024 and 65536");if(to<from)throw new RangeError("`to` must be greater than or equal to `from`");return function*(from2,to2){for(let port=from2;port<=to2;port++)yield port}(from,to)}}});var require_is_port_reachable=__commonJS({"../../node_modules/.pnpm/is-port-reachable@3.1.0/node_modules/is-port-reachable/index.js"(exports2,module2){"use strict";var net=__require("net");module2.exports=async(port,{timeout=1e3,host}={})=>{let promise=new Promise((resolve3,reject)=>{let socket=new net.Socket,onError=()=>{socket.destroy(),reject()};socket.setTimeout(timeout),socket.once("error",onError),socket.once("timeout",onError),socket.connect(port,host,()=>{socket.end(),resolve3()})});try{return await promise,!0}catch{return!1}}}});var require_dispatch=__commonJS({"../../internals/local-schedules/dist/dispatch.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),dispatch_exports={};__export(dispatch_exports,{createDispatch:()=>createDispatch});module2.exports=__toCommonJS(dispatch_exports);function createDispatch(schedule,payload,scheduledAtMs,occurrenceId,invokeSource,signal){let scheduledAt=new Date(scheduledAtMs).toISOString(),common={schedule,occurrenceId,scheduledAt,invokeSource,signal};return schedule.target.type==="queue"?{...common,delivery:{type:"queue",topic:schedule.target.topic,message:{scheduleId:schedule.scheduleId,executionId:occurrenceId,name:schedule.name,namespace:schedule.namespace,trackId:schedule.trackId,scheduledAt,source:schedule.source,...payload===void 0?{}:{payload:JSON.parse(payload)}}}}:schedule.target.type==="path"?{...common,delivery:{type:"path",path:schedule.target.path}}:{...common,delivery:{type:"function",function:schedule.target.function,headers:{"ce-specversion":"1.0","ce-type":"com.vercel.schedule.v1beta","ce-source":`/schedule/${encodeURIComponent(schedule.namespace)}/${encodeURIComponent(schedule.name)}`,"ce-id":occurrenceId,"ce-vssscheduleid":schedule.scheduleId,"ce-vssscheduledat":scheduledAt,"ce-vssschedulename":schedule.name,"ce-vssnamespace":schedule.namespace,"ce-vssschedulesource":schedule.source}}}}}});var require_node2=__commonJS({"../../node_modules/.pnpm/ulid@3.0.1/node_modules/ulid/dist/node/index.cjs"(exports2){"use strict";var crypto=__require("node:crypto"),B32_CHARACTERS="0123456789ABCDEFGHJKMNPQRSTVWXYZ",ENCODING="0123456789ABCDEFGHJKMNPQRSTVWXYZ",ENCODING_LEN=32,MAX_ULID="7ZZZZZZZZZZZZZZZZZZZZZZZZZ",MIN_ULID="00000000000000000000000000",RANDOM_LEN=16,TIME_LEN=10,TIME_MAX=0xffffffffffff,ULID_REGEX=/^[0-7][0-9a-hjkmnp-tv-zA-HJKMNP-TV-Z]{25}$/,UUID_REGEX=/^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/;exports2.ULIDErrorCode=void 0;(function(ULIDErrorCode){ULIDErrorCode.Base32IncorrectEncoding="B32_ENC_INVALID",ULIDErrorCode.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",ULIDErrorCode.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",ULIDErrorCode.EncodeTimeNegative="ENC_TIME_NEG",ULIDErrorCode.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",ULIDErrorCode.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",ULIDErrorCode.PRNGDetectFailure="PRNG_DETECT",ULIDErrorCode.ULIDInvalid="ULID_INVALID",ULIDErrorCode.Unexpected="UNEXPECTED",ULIDErrorCode.UUIDInvalid="UUID_INVALID"})(exports2.ULIDErrorCode||(exports2.ULIDErrorCode={}));var ULIDError=class extends Error{constructor(errorCode,message2){super(`${message2} (${errorCode})`),this.name="ULIDError",this.code=errorCode}};function randomChar(prng){let randomPosition=Math.floor(prng()*ENCODING_LEN)%ENCODING_LEN;return ENCODING.charAt(randomPosition)}function replaceCharAt(str,index,char){return index>str.length-1?str:str.substr(0,index)+char+str.substr(index+1)}function crockfordEncode(input){let output=[],bitsRead=0,buffer=0,reversedInput=new Uint8Array(input.slice().reverse());for(let byte of reversedInput)for(buffer|=byte<<bitsRead,bitsRead+=8;bitsRead>=5;)output.unshift(buffer&31),buffer>>>=5,bitsRead-=5;return bitsRead>0&&output.unshift(buffer&31),output.map(byte=>B32_CHARACTERS.charAt(byte)).join("")}function crockfordDecode(input){let sanitizedInput=input.toUpperCase().split("").reverse().join(""),output=[],bitsRead=0,buffer=0;for(let character of sanitizedInput){let byte=B32_CHARACTERS.indexOf(character);if(byte===-1)throw new Error(`Invalid base 32 character found in string: ${character}`);for(buffer|=byte<<bitsRead,bitsRead+=5;bitsRead>=8;)output.unshift(buffer&255),buffer>>>=8,bitsRead-=8}return(bitsRead>=5||buffer>0)&&output.unshift(buffer&255),new Uint8Array(output)}function fixULIDBase32(id){return id.replace(/i/gi,"1").replace(/l/gi,"1").replace(/o/gi,"0").replace(/-/g,"")}function incrementBase32(str){let done,index=str.length,char,charIndex,output=str,maxCharIndex=ENCODING_LEN-1;for(;!done&&index-->=0;){if(char=output[index],charIndex=ENCODING.indexOf(char),charIndex===-1)throw new ULIDError(exports2.ULIDErrorCode.Base32IncorrectEncoding,"Incorrectly encoded string");if(charIndex===maxCharIndex){output=replaceCharAt(output,index,ENCODING[0]);continue}done=replaceCharAt(output,index,ENCODING[charIndex+1])}if(typeof done=="string")return done;throw new ULIDError(exports2.ULIDErrorCode.Base32IncorrectEncoding,"Failed incrementing string")}function decodeTime(id){if(id.length!==TIME_LEN+RANDOM_LEN)throw new ULIDError(exports2.ULIDErrorCode.DecodeTimeValueMalformed,"Malformed ULID");let time=id.substr(0,TIME_LEN).toUpperCase().split("").reverse().reduce((carry,char,index)=>{let encodingIndex=ENCODING.indexOf(char);if(encodingIndex===-1)throw new ULIDError(exports2.ULIDErrorCode.DecodeTimeInvalidCharacter,`Time decode error: Invalid character: ${char}`);return carry+=encodingIndex*Math.pow(ENCODING_LEN,index)},0);if(time>TIME_MAX)throw new ULIDError(exports2.ULIDErrorCode.DecodeTimeValueMalformed,`Malformed ULID: timestamp too large: ${time}`);return time}function detectPRNG(root){let rootLookup=detectRoot(),globalCrypto=rootLookup&&(rootLookup.crypto||rootLookup.msCrypto)||(typeof crypto<"u"?crypto:null);if(typeof globalCrypto?.getRandomValues=="function")return()=>{let buffer=new Uint8Array(1);return globalCrypto.getRandomValues(buffer),buffer[0]/255};if(typeof globalCrypto?.randomBytes=="function")return()=>globalCrypto.randomBytes(1).readUInt8()/255;if(crypto?.randomBytes)return()=>crypto.randomBytes(1).readUInt8()/255;throw new ULIDError(exports2.ULIDErrorCode.PRNGDetectFailure,"Failed to find a reliable PRNG")}function detectRoot(){return inWebWorker()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function encodeRandom(len,prng){let str="";for(;len>0;len--)str=randomChar(prng)+str;return str}function encodeTime(now,len=TIME_LEN){if(isNaN(now))throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeValueMalformed,`Time must be a number: ${now}`);if(now>TIME_MAX)throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${TIME_MAX}: ${now}`);if(now<0)throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeNegative,`Time must be positive: ${now}`);if(Number.isInteger(now)===!1)throw new ULIDError(exports2.ULIDErrorCode.EncodeTimeValueMalformed,`Time must be an integer: ${now}`);let mod,str="";for(let currentLen=len;currentLen>0;currentLen--)mod=now%ENCODING_LEN,str=ENCODING.charAt(mod)+str,now=(now-mod)/ENCODING_LEN;return str}function inWebWorker(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function isValid(id){return typeof id=="string"&&id.length===TIME_LEN+RANDOM_LEN&&id.toUpperCase().split("").every(char=>ENCODING.indexOf(char)!==-1)}function monotonicFactory(prng){let currentPRNG=prng||detectPRNG(),lastTime=0,lastRandom;return function(seedTime){let seed=!seedTime||isNaN(seedTime)?Date.now():seedTime;if(seed<=lastTime){let incrementedRandom=lastRandom=incrementBase32(lastRandom);return encodeTime(lastTime,TIME_LEN)+incrementedRandom}lastTime=seed;let newRandom=lastRandom=encodeRandom(RANDOM_LEN,currentPRNG);return encodeTime(seed,TIME_LEN)+newRandom}}function ulid(seedTime,prng){let currentPRNG=prng||detectPRNG(),seed=!seedTime||isNaN(seedTime)?Date.now():seedTime;return encodeTime(seed,TIME_LEN)+encodeRandom(RANDOM_LEN,currentPRNG)}function ulidToUUID(ulid2){if(!ULID_REGEX.test(ulid2))throw new ULIDError(exports2.ULIDErrorCode.ULIDInvalid,`Invalid ULID: ${ulid2}`);let uint8Array=crockfordDecode(ulid2),uuid=Array.from(uint8Array).map(byte=>byte.toString(16).padStart(2,"0")).join("");return uuid=uuid.substring(0,8)+"-"+uuid.substring(8,12)+"-"+uuid.substring(12,16)+"-"+uuid.substring(16,20)+"-"+uuid.substring(20),uuid.toUpperCase()}function uuidToULID(uuid){if(!UUID_REGEX.test(uuid))throw new ULIDError(exports2.ULIDErrorCode.UUIDInvalid,`Invalid UUID: ${uuid}`);let bytes2=uuid.replace(/-/g,"").match(/.{1,2}/g);if(!bytes2)throw new ULIDError(exports2.ULIDErrorCode.Unexpected,`Failed parsing UUID bytes: ${uuid}`);let uint8Array=new Uint8Array(bytes2.map(byte=>parseInt(byte,16)));return crockfordEncode(uint8Array)}exports2.MAX_ULID=MAX_ULID;exports2.MIN_ULID=MIN_ULID;exports2.TIME_LEN=TIME_LEN;exports2.TIME_MAX=TIME_MAX;exports2.ULIDError=ULIDError;exports2.decodeTime=decodeTime;exports2.encodeTime=encodeTime;exports2.fixULIDBase32=fixULIDBase32;exports2.incrementBase32=incrementBase32;exports2.isValid=isValid;exports2.monotonicFactory=monotonicFactory;exports2.ulid=ulid;exports2.ulidToUUID=ulidToUUID;exports2.uuidToULID=uuidToULID}});var require_ids=__commonJS({"../../internals/local-schedules/dist/ids.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),ids_exports={};__export(ids_exports,{generateScheduleId:()=>generateScheduleId,scheduleExecutionId:()=>scheduleExecutionId});module2.exports=__toCommonJS(ids_exports);var import_node_crypto2=__require("node:crypto"),import_ulid=require_node2(),CROCKFORD_BASE32="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function generateScheduleId(){return`sch_${(0,import_ulid.ulid)()}`}function scheduleExecutionId(scheduleId,scheduledAtMs){let hash=(0,import_node_crypto2.createHash)("sha256").update(`${scheduleId}:${scheduledAtMs}`).digest(),value=hash.readBigUInt64BE(0)<<64n|hash.readBigUInt64BE(8),encoded="";for(let i=0;i<26;i++)encoded=CROCKFORD_BASE32[Number(value&31n)]+encoded,value>>=5n;return`schx_${encoded}`}}});var require_types=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/types.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0})}});var require_CronField=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronField.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronField=void 0;var CronField=class _CronField{#hasLastChar=!1;#hasQuestionMarkChar=!1;#wildcard=!1;#values=[];options={rawValue:""};static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(values,options={rawValue:""}){if(!Array.isArray(values))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(values.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...options,rawValue:options.rawValue??""},this.#values=values.sort(_CronField.sorter),this.#wildcard=this.options.wildcard!==void 0?this.options.wildcard:this.#isWildcardValue(),this.#hasLastChar=this.options.rawValue.includes("L")||values.includes("L"),this.#hasQuestionMarkChar=this.options.rawValue.includes("?")||values.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#hasLastChar}get hasQuestionMarkChar(){return this.#hasQuestionMarkChar}get isWildcard(){return this.#wildcard}get values(){return this.#values}static sorter(a,b){let aIsNumber=typeof a=="number",bIsNumber=typeof b=="number";return aIsNumber&&bIsNumber?a-b:!aIsNumber&&!bIsNumber?a.localeCompare(b):aIsNumber?-1:1}serialize(){return{wildcard:this.#wildcard,values:this.#values}}validate(){let badValue,charsString=this.chars.length>0?` or chars ${this.chars.join("")}`:"",charTest=value=>char=>new RegExp(`^\\d{0,2}${char}$`).test(value),rangeTest=value=>(badValue=value,typeof value=="number"?value>=this.min&&value<=this.max:this.chars.some(charTest(value)));if(!this.#values.every(rangeTest))throw new Error(`${this.constructor.name} Validation error, got value ${badValue} expected range ${this.min}-${this.max}${charsString}`);let duplicate=this.#values.find((value,index)=>this.#values.indexOf(value)!==index);if(duplicate)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${duplicate}`)}#isWildcardValue(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(_,i)=>i+this.min).every(value=>this.#values.includes(value))}};exports2.CronField=CronField}});var require_CronDayOfMonth=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronDayOfMonth.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronDayOfMonth=void 0;var CronField_1=require_CronField(),MIN_DAY=1,MAX_DAY=31,DAY_CHARS=Object.freeze(["L"]),CronDayOfMonth=class extends CronField_1.CronField{static get min(){return MIN_DAY}static get max(){return MAX_DAY}static get chars(){return DAY_CHARS}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronDayOfMonth=CronDayOfMonth}});var require_CronDayOfWeek=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronDayOfWeek.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronDayOfWeek=void 0;var CronField_1=require_CronField(),MIN_DAY=0,MAX_DAY=7,DAY_CHARS=Object.freeze(["L"]),CronDayOfWeek=class extends CronField_1.CronField{static get min(){return MIN_DAY}static get max(){return MAX_DAY}static get chars(){return DAY_CHARS}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};exports2.CronDayOfWeek=CronDayOfWeek}});var require_CronHour=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronHour.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronHour=void 0;var CronField_1=require_CronField(),MIN_HOUR=0,MAX_HOUR=23,HOUR_CHARS=Object.freeze([]),CronHour=class extends CronField_1.CronField{static get min(){return MIN_HOUR}static get max(){return MAX_HOUR}static get chars(){return HOUR_CHARS}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronHour=CronHour}});var require_CronMinute=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronMinute.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronMinute=void 0;var CronField_1=require_CronField(),MIN_MINUTE=0,MAX_MINUTE=59,MINUTE_CHARS=Object.freeze([]),CronMinute=class extends CronField_1.CronField{static get min(){return MIN_MINUTE}static get max(){return MAX_MINUTE}static get chars(){return MINUTE_CHARS}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronMinute=CronMinute}});var require_CronDate=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronDate.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronDate=exports2.DAYS_IN_MONTH=exports2.DateMathOp=exports2.TimeUnit=void 0;var luxon_1=__require("luxon"),TimeUnit;(function(TimeUnit2){TimeUnit2.Second="Second",TimeUnit2.Minute="Minute",TimeUnit2.Hour="Hour",TimeUnit2.Day="Day",TimeUnit2.Month="Month",TimeUnit2.Year="Year"})(TimeUnit||(exports2.TimeUnit=TimeUnit={}));var DateMathOp;(function(DateMathOp2){DateMathOp2.Add="Add",DateMathOp2.Subtract="Subtract"})(DateMathOp||(exports2.DateMathOp=DateMathOp={}));exports2.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var CronDate=class _CronDate{#date;#dstStart=null;#dstEnd=null;#verbMap={add:{[TimeUnit.Year]:this.addYear.bind(this),[TimeUnit.Month]:this.addMonth.bind(this),[TimeUnit.Day]:this.addDay.bind(this),[TimeUnit.Hour]:this.addHour.bind(this),[TimeUnit.Minute]:this.addMinute.bind(this),[TimeUnit.Second]:this.addSecond.bind(this)},subtract:{[TimeUnit.Year]:this.subtractYear.bind(this),[TimeUnit.Month]:this.subtractMonth.bind(this),[TimeUnit.Day]:this.subtractDay.bind(this),[TimeUnit.Hour]:this.subtractHour.bind(this),[TimeUnit.Minute]:this.subtractMinute.bind(this),[TimeUnit.Second]:this.subtractSecond.bind(this)}};constructor(timestamp,tz){let dateOpts={zone:tz};if(timestamp?timestamp instanceof _CronDate?(this.#date=timestamp.#date,this.#dstStart=timestamp.#dstStart,this.#dstEnd=timestamp.#dstEnd):timestamp instanceof Date?this.#date=luxon_1.DateTime.fromJSDate(timestamp,dateOpts):typeof timestamp=="number"?this.#date=luxon_1.DateTime.fromMillis(timestamp,dateOpts):(this.#date=luxon_1.DateTime.fromISO(timestamp,dateOpts),this.#date.isValid||(this.#date=luxon_1.DateTime.fromRFC2822(timestamp,dateOpts)),this.#date.isValid||(this.#date=luxon_1.DateTime.fromSQL(timestamp,dateOpts)),this.#date.isValid||(this.#date=luxon_1.DateTime.fromFormat(timestamp,"EEE, d MMM yyyy HH:mm:ss",dateOpts))):this.#date=luxon_1.DateTime.local(),!this.#date.isValid)throw new Error(`CronDate: unhandled timestamp: ${timestamp}`);tz&&tz!==this.#date.zoneName&&(this.#date=this.#date.setZone(tz))}static#isLeapYear(year){return year%4===0&&year%100!==0||year%400===0}get dstStart(){return this.#dstStart}set dstStart(value){this.#dstStart=value}get dstEnd(){return this.#dstEnd}set dstEnd(value){this.#dstEnd=value}addYear(){this.#date=this.#date.plus({years:1})}addMonth(){this.#date=this.#date.plus({months:1}).startOf("month")}addDay(){this.#date=this.#date.plus({days:1}).startOf("day")}addHour(){this.#date=this.#date.plus({hours:1}).startOf("hour")}addMinute(){this.#date=this.#date.plus({minutes:1}).startOf("minute")}addSecond(){this.#date=this.#date.plus({seconds:1})}subtractYear(){this.#date=this.#date.minus({years:1})}subtractMonth(){this.#date=this.#date.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#date=this.#date.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#date=this.#date.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#date=this.#date.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#date=this.#date.minus({seconds:1})}addUnit(unit){this.#verbMap.add[unit]()}subtractUnit(unit){this.#verbMap.subtract[unit]()}invokeDateOperation(verb,unit){if(verb===DateMathOp.Add){this.addUnit(unit);return}if(verb===DateMathOp.Subtract){this.subtractUnit(unit);return}throw new Error(`Invalid verb: ${verb}`)}getDate(){return this.#date.day}getFullYear(){return this.#date.year}getDay(){let weekday=this.#date.weekday;return weekday===7?0:weekday}getMonth(){return this.#date.month-1}getHours(){return this.#date.hour}getMinutes(){return this.#date.minute}getSeconds(){return this.#date.second}getMilliseconds(){return this.#date.millisecond}getTime(){return this.#date.valueOf()}getUTCDate(){return this.#getUTC().day}getUTCFullYear(){return this.#getUTC().year}getUTCDay(){let weekday=this.#getUTC().weekday;return weekday===7?0:weekday}getUTCMonth(){return this.#getUTC().month-1}getUTCHours(){return this.#getUTC().hour}getUTCMinutes(){return this.#getUTC().minute}getUTCSeconds(){return this.#getUTC().second}toISOString(){return this.#date.toUTC().toISO()}toJSON(){return this.#date.toJSON()}setDate(d){this.#date=this.#date.set({day:d})}setFullYear(y){this.#date=this.#date.set({year:y})}setDay(d){this.#date=this.#date.set({weekday:d})}setMonth(m){this.#date=this.#date.set({month:m+1})}setHours(h){this.#date=this.#date.set({hour:h})}setMinutes(m){this.#date=this.#date.set({minute:m})}setSeconds(s){this.#date=this.#date.set({second:s})}setMilliseconds(s){this.#date=this.#date.set({millisecond:s})}toString(){return this.toDate().toString()}toDate(){return this.#date.toJSDate()}isLastDayOfMonth(){let{day,month}=this.#date;if(month===2){let isLeap=_CronDate.#isLeapYear(this.#date.year);return day===exports2.DAYS_IN_MONTH[month-1]-(isLeap?0:1)}return day===exports2.DAYS_IN_MONTH[month-1]}isLastWeekdayOfMonth(){let{day,month}=this.#date,lastDay;return month===2?lastDay=exports2.DAYS_IN_MONTH[month-1]-(_CronDate.#isLeapYear(this.#date.year)?0:1):lastDay=exports2.DAYS_IN_MONTH[month-1],day>lastDay-7}applyDateOperation(op,unit,hoursLength){if(unit===TimeUnit.Month||unit===TimeUnit.Day){this.invokeDateOperation(op,unit);return}let previousHour=this.getHours();this.invokeDateOperation(op,unit);let currentHour=this.getHours(),diff=currentHour-previousHour;diff===2?hoursLength!==24&&(this.dstStart=currentHour):diff===0&&this.getMinutes()===0&&this.getSeconds()===0&&hoursLength!==24&&(this.dstEnd=currentHour)}#getUTC(){return this.#date.toUTC()}};exports2.CronDate=CronDate;exports2.default=CronDate}});var require_CronMonth=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronMonth.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronMonth=void 0;var CronDate_1=require_CronDate(),CronField_1=require_CronField(),MIN_MONTH=1,MAX_MONTH=12,MONTH_CHARS=Object.freeze([]),CronMonth=class extends CronField_1.CronField{static get min(){return MIN_MONTH}static get max(){return MAX_MONTH}static get chars(){return MONTH_CHARS}static get daysInMonth(){return CronDate_1.DAYS_IN_MONTH}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronMonth=CronMonth}});var require_CronSecond=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/CronSecond.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronSecond=void 0;var CronField_1=require_CronField(),MIN_SECOND=0,MAX_SECOND=59,SECOND_CHARS=Object.freeze([]),CronSecond=class extends CronField_1.CronField{static get min(){return MIN_SECOND}static get max(){return MAX_SECOND}static get chars(){return SECOND_CHARS}constructor(values,options){super(values,options),this.validate()}get values(){return super.values}};exports2.CronSecond=CronSecond}});var require_fields=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/fields/index.js"(exports2){"use strict";var __createBinding=exports2&&exports2.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=exports2&&exports2.__exportStar||function(m,exports3){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports3,p)&&__createBinding(exports3,m,p)};Object.defineProperty(exports2,"__esModule",{value:!0});__exportStar(require_types(),exports2);__exportStar(require_CronDayOfMonth(),exports2);__exportStar(require_CronDayOfWeek(),exports2);__exportStar(require_CronField(),exports2);__exportStar(require_CronHour(),exports2);__exportStar(require_CronMinute(),exports2);__exportStar(require_CronMonth(),exports2);__exportStar(require_CronSecond(),exports2)}});var require_CronFieldCollection=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronFieldCollection.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronFieldCollection=void 0;var fields_1=require_fields(),CronFieldCollection=class _CronFieldCollection{#second;#minute;#hour;#dayOfMonth;#month;#dayOfWeek;static from(base,fields){return new _CronFieldCollection({second:this.resolveField(fields_1.CronSecond,base.second,fields.second),minute:this.resolveField(fields_1.CronMinute,base.minute,fields.minute),hour:this.resolveField(fields_1.CronHour,base.hour,fields.hour),dayOfMonth:this.resolveField(fields_1.CronDayOfMonth,base.dayOfMonth,fields.dayOfMonth),month:this.resolveField(fields_1.CronMonth,base.month,fields.month),dayOfWeek:this.resolveField(fields_1.CronDayOfWeek,base.dayOfWeek,fields.dayOfWeek)})}static resolveField(constructor,baseField,fieldValue){return fieldValue?fieldValue instanceof fields_1.CronField?fieldValue:new constructor(fieldValue):baseField}constructor({second,minute,hour,dayOfMonth,month,dayOfWeek}){if(!second)throw new Error("Validation error, Field second is missing");if(!minute)throw new Error("Validation error, Field minute is missing");if(!hour)throw new Error("Validation error, Field hour is missing");if(!dayOfMonth)throw new Error("Validation error, Field dayOfMonth is missing");if(!month)throw new Error("Validation error, Field month is missing");if(!dayOfWeek)throw new Error("Validation error, Field dayOfWeek is missing");if(month.values.length===1&&!dayOfMonth.hasLastChar&&!(parseInt(dayOfMonth.values[0],10)<=fields_1.CronMonth.daysInMonth[month.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#second=second,this.#minute=minute,this.#hour=hour,this.#month=month,this.#dayOfWeek=dayOfWeek,this.#dayOfMonth=dayOfMonth}get second(){return this.#second}get minute(){return this.#minute}get hour(){return this.#hour}get dayOfMonth(){return this.#dayOfMonth}get month(){return this.#month}get dayOfWeek(){return this.#dayOfWeek}static compactField(input){if(input.length===0)return[];let output=[],current;return input.forEach((item,i,arr)=>{if(current===void 0){current={start:item,count:1};return}let prevItem=arr[i-1]||current.start,nextItem=arr[i+1];if(item==="L"||item==="W"){output.push(current),output.push({start:item,count:1}),current=void 0;return}if(current.step===void 0&&nextItem!==void 0){let step=item-prevItem,nextStep=nextItem-item;if(step<=nextStep){current={...current,count:2,end:item,step};return}current.step=1}item-(current.end??0)===current.step?(current.count++,current.end=item):(current.count===1?output.push({start:current.start,count:1}):current.count===2?(output.push({start:current.start,count:1}),output.push({start:current.end??prevItem,count:1})):output.push(current),current={start:item,count:1})}),current&&output.push(current),output}static#handleSingleRange(field,range,max){let step=range.step;return step?step===1&&range.start===field.min&&range.end&&range.end>=max?field.hasQuestionMarkChar?"?":"*":step!==1&&range.start===field.min&&range.end&&range.end>=max-step+1?`*/${step}`:null:null}static#handleMultipleRanges(range,max){let step=range.step;if(step===1)return`${range.start}-${range.end}`;let multiplier=range.start===0?range.count-1:range.count;if(!step)throw new Error("Unexpected range step");if(!range.end)throw new Error("Unexpected range end");if(step*multiplier>range.end){let mapFn=(_,index)=>{if(typeof range.start!="number")throw new Error("Unexpected range start");return index%step===0?range.start+index:null};if(typeof range.start!="number")throw new Error("Unexpected range start");let seed={length:range.end-range.start+1};return Array.from(seed,mapFn).filter(value=>value!==null).join(",")}return range.end===max-step+1?`${range.start}/${step}`:`${range.start}-${range.end}/${step}`}stringifyField(field){let max=field.max,values=field.values;if(field instanceof fields_1.CronDayOfWeek){max=6;let dayOfWeek=this.#dayOfWeek.values;values=dayOfWeek[dayOfWeek.length-1]===7?dayOfWeek.slice(0,-1):dayOfWeek}field instanceof fields_1.CronDayOfMonth&&(max=this.#month.values.length===1?fields_1.CronMonth.daysInMonth[this.#month.values[0]-1]:field.max);let ranges=_CronFieldCollection.compactField(values);if(ranges.length===1){let singleRangeResult=_CronFieldCollection.#handleSingleRange(field,ranges[0],max);if(singleRangeResult)return singleRangeResult}return ranges.map(range=>{let value=range.count===1?range.start.toString():_CronFieldCollection.#handleMultipleRanges(range,max);return field instanceof fields_1.CronDayOfWeek&&field.nthDay>0?`${value}#${field.nthDay}`:value}).join(",")}stringify(includeSeconds=!1){let arr=[];return includeSeconds&&arr.push(this.stringifyField(this.#second)),arr.push(this.stringifyField(this.#minute),this.stringifyField(this.#hour),this.stringifyField(this.#dayOfMonth),this.stringifyField(this.#month),this.stringifyField(this.#dayOfWeek)),arr.join(" ")}serialize(){return{second:this.#second.serialize(),minute:this.#minute.serialize(),hour:this.#hour.serialize(),dayOfMonth:this.#dayOfMonth.serialize(),month:this.#month.serialize(),dayOfWeek:this.#dayOfWeek.serialize()}}};exports2.CronFieldCollection=CronFieldCollection}});var require_CronExpression=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronExpression.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronExpression=exports2.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var CronDate_1=require_CronDate();exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";exports2.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var LOOP_LIMIT=1e4,CronExpression=class _CronExpression{#options;#tz;#currentDate;#startDate;#endDate;#fields;constructor(fields,options){this.#options=options,this.#tz=options.tz,this.#startDate=options.startDate?new CronDate_1.CronDate(options.startDate,this.#tz):null,this.#endDate=options.endDate?new CronDate_1.CronDate(options.endDate,this.#tz):null;let currentDateValue=options.currentDate??options.startDate;if(currentDateValue){let tempCurrentDate=new CronDate_1.CronDate(currentDateValue,this.#tz);this.#startDate&&tempCurrentDate.getTime()<this.#startDate.getTime()?currentDateValue=this.#startDate:this.#endDate&&tempCurrentDate.getTime()>this.#endDate.getTime()&&(currentDateValue=this.#endDate)}this.#currentDate=new CronDate_1.CronDate(currentDateValue,this.#tz),this.#fields=fields}get fields(){return this.#fields}static fieldsToExpression(fields,options){return new _CronExpression(fields,options||{})}static#matchSchedule(value,sequence){return sequence.some(element=>element===value)}static#isLastWeekdayOfMonthMatch(expressions,currentDate){let isLastWeekdayOfMonth=currentDate.isLastWeekdayOfMonth();return expressions.some(expression=>{let weekday=parseInt(expression.toString().charAt(0),10)%7;if(Number.isNaN(weekday))throw new Error(`Invalid last weekday of the month expression: ${expression}`);return currentDate.getDay()===weekday&&isLastWeekdayOfMonth})}next(){return this.#findSchedule()}prev(){return this.#findSchedule(!0)}hasNext(){let current=this.#currentDate;try{return this.#findSchedule(),!0}catch{return!1}finally{this.#currentDate=current}}hasPrev(){let current=this.#currentDate;try{return this.#findSchedule(!0),!0}catch{return!1}finally{this.#currentDate=current}}take(limit){let items=[];if(limit>=0)for(let i=0;i<limit;i++)try{items.push(this.next())}catch{return items}else for(let i=0;i>limit;i--)try{items.push(this.prev())}catch{return items}return items}reset(newDate){this.#currentDate=new CronDate_1.CronDate(newDate||this.#options.currentDate)}stringify(includeSeconds=!1){return this.#fields.stringify(includeSeconds)}includesDate(date){let{second,minute,hour,month}=this.#fields,dt=new CronDate_1.CronDate(date,this.#tz);return!(!second.values.includes(dt.getSeconds())||!minute.values.includes(dt.getMinutes())||!hour.values.includes(dt.getHours())||!month.values.includes(dt.getMonth()+1)||!this.#matchDayOfMonth(dt)||this.#fields.dayOfWeek.nthDay>0&&Math.ceil(dt.getDate()/7)!==this.#fields.dayOfWeek.nthDay)}toString(){return this.#options.expression||this.stringify(!0)}#matchDayOfMonth(currentDate){let isDayOfMonthWildcardMatch=this.#fields.dayOfMonth.isWildcard,isRestrictedDayOfMonth=!isDayOfMonthWildcardMatch,isDayOfWeekWildcardMatch=this.#fields.dayOfWeek.isWildcard,isRestrictedDayOfWeek=!isDayOfWeekWildcardMatch,matchedDOM=_CronExpression.#matchSchedule(currentDate.getDate(),this.#fields.dayOfMonth.values)||this.#fields.dayOfMonth.hasLastChar&¤tDate.isLastDayOfMonth(),matchedDOW=_CronExpression.#matchSchedule(currentDate.getDay(),this.#fields.dayOfWeek.values)||this.#fields.dayOfWeek.hasLastChar&&_CronExpression.#isLastWeekdayOfMonthMatch(this.#fields.dayOfWeek.values,currentDate);return!!(isRestrictedDayOfMonth&&isRestrictedDayOfWeek&&(matchedDOM||matchedDOW)||matchedDOM&&!isRestrictedDayOfWeek||isDayOfMonthWildcardMatch&&!isDayOfWeekWildcardMatch&&matchedDOW)}#matchHour(currentDate,dateMathVerb,reverse){let currentHour=currentDate.getHours(),isMatch=_CronExpression.#matchSchedule(currentHour,this.#fields.hour.values),isDstStart=currentDate.dstStart===currentHour,isDstEnd=currentDate.dstEnd===currentHour;return!isMatch&&!isDstStart?(currentDate.dstStart=null,currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Hour,this.#fields.hour.values.length),!1):isDstStart&&!_CronExpression.#matchSchedule(currentHour-1,this.#fields.hour.values)?(currentDate.invokeDateOperation(dateMathVerb,CronDate_1.TimeUnit.Hour),!1):isDstEnd&&!reverse?(currentDate.dstEnd=null,currentDate.applyDateOperation(CronDate_1.DateMathOp.Add,CronDate_1.TimeUnit.Hour,this.#fields.hour.values.length),!1):!0}#validateTimeSpan(currentDate){if(!this.#startDate&&!this.#endDate)return;let currentTime=currentDate.getTime();if(this.#startDate&¤tTime<this.#startDate.getTime())throw new Error(exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#endDate&¤tTime>this.#endDate.getTime())throw new Error(exports2.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#findSchedule(reverse=!1){let dateMathVerb=reverse?CronDate_1.DateMathOp.Subtract:CronDate_1.DateMathOp.Add,currentDate=new CronDate_1.CronDate(this.#currentDate),startTimestamp=currentDate.getTime(),stepCount=0;for(;++stepCount<LOOP_LIMIT;){if(this.#validateTimeSpan(currentDate),!this.#matchDayOfMonth(currentDate)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Day,this.#fields.hour.values.length);continue}if(!(this.#fields.dayOfWeek.nthDay<=0||Math.ceil(currentDate.getDate()/7)===this.#fields.dayOfWeek.nthDay)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Day,this.#fields.hour.values.length);continue}if(!_CronExpression.#matchSchedule(currentDate.getMonth()+1,this.#fields.month.values)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Month,this.#fields.hour.values.length);continue}if(this.#matchHour(currentDate,dateMathVerb,reverse)){if(!_CronExpression.#matchSchedule(currentDate.getMinutes(),this.#fields.minute.values)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Minute,this.#fields.hour.values.length);continue}if(!_CronExpression.#matchSchedule(currentDate.getSeconds(),this.#fields.second.values)){currentDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Second,this.#fields.hour.values.length);continue}if(startTimestamp===currentDate.getTime()){(dateMathVerb==="Add"||currentDate.getMilliseconds()===0)&¤tDate.applyDateOperation(dateMathVerb,CronDate_1.TimeUnit.Second,this.#fields.hour.values.length);continue}break}}if(stepCount>LOOP_LIMIT)throw new Error(exports2.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return currentDate.getMilliseconds()!==0&¤tDate.setMilliseconds(0),this.#currentDate=currentDate,currentDate}[Symbol.iterator](){return{next:()=>({value:this.#findSchedule(),done:!this.hasNext()})}}};exports2.CronExpression=CronExpression;exports2.default=CronExpression}});var require_random=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/utils/random.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.seededRandom=seededRandom;function xfnv1a(str){let h=2166136261;for(let i=0;i<str.length;i++)h^=str.charCodeAt(i),h=Math.imul(h,16777619);return()=>h>>>0}function mulberry32(seed){return()=>{let t=seed+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function seededRandom(str){let seed=str?xfnv1a(str)():Math.floor(Math.random()*1e10);return mulberry32(seed)}}});var require_CronExpressionParser=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronExpressionParser.js"(exports2){"use strict";Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronExpressionParser=exports2.DayOfWeek=exports2.Months=exports2.CronUnit=exports2.PredefinedExpressions=void 0;var CronFieldCollection_1=require_CronFieldCollection(),CronExpression_1=require_CronExpression(),random_1=require_random(),fields_1=require_fields(),PredefinedExpressions;(function(PredefinedExpressions2){PredefinedExpressions2["@yearly"]="0 0 0 1 1 *",PredefinedExpressions2["@annually"]="0 0 0 1 1 *",PredefinedExpressions2["@monthly"]="0 0 0 1 * *",PredefinedExpressions2["@weekly"]="0 0 0 * * 0",PredefinedExpressions2["@daily"]="0 0 0 * * *",PredefinedExpressions2["@hourly"]="0 0 * * * *",PredefinedExpressions2["@minutely"]="0 * * * * *",PredefinedExpressions2["@secondly"]="* * * * * *",PredefinedExpressions2["@weekdays"]="0 0 0 * * 1-5",PredefinedExpressions2["@weekends"]="0 0 0 * * 0,6"})(PredefinedExpressions||(exports2.PredefinedExpressions=PredefinedExpressions={}));var CronUnit;(function(CronUnit2){CronUnit2.Second="Second",CronUnit2.Minute="Minute",CronUnit2.Hour="Hour",CronUnit2.DayOfMonth="DayOfMonth",CronUnit2.Month="Month",CronUnit2.DayOfWeek="DayOfWeek"})(CronUnit||(exports2.CronUnit=CronUnit={}));var Months;(function(Months2){Months2[Months2.jan=1]="jan",Months2[Months2.feb=2]="feb",Months2[Months2.mar=3]="mar",Months2[Months2.apr=4]="apr",Months2[Months2.may=5]="may",Months2[Months2.jun=6]="jun",Months2[Months2.jul=7]="jul",Months2[Months2.aug=8]="aug",Months2[Months2.sep=9]="sep",Months2[Months2.oct=10]="oct",Months2[Months2.nov=11]="nov",Months2[Months2.dec=12]="dec"})(Months||(exports2.Months=Months={}));var DayOfWeek;(function(DayOfWeek2){DayOfWeek2[DayOfWeek2.sun=0]="sun",DayOfWeek2[DayOfWeek2.mon=1]="mon",DayOfWeek2[DayOfWeek2.tue=2]="tue",DayOfWeek2[DayOfWeek2.wed=3]="wed",DayOfWeek2[DayOfWeek2.thu=4]="thu",DayOfWeek2[DayOfWeek2.fri=5]="fri",DayOfWeek2[DayOfWeek2.sat=6]="sat"})(DayOfWeek||(exports2.DayOfWeek=DayOfWeek={}));var CronExpressionParser=class _CronExpressionParser{static parse(expression,options={}){let{strict=!1,hashSeed}=options,rand=(0,random_1.seededRandom)(hashSeed);expression=PredefinedExpressions[expression]||expression;let rawFields=_CronExpressionParser.#getRawFields(expression,strict);if(!(rawFields.dayOfMonth==="*"||rawFields.dayOfWeek==="*"||!strict))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let second=_CronExpressionParser.#parseField(CronUnit.Second,rawFields.second,fields_1.CronSecond.constraints,rand),minute=_CronExpressionParser.#parseField(CronUnit.Minute,rawFields.minute,fields_1.CronMinute.constraints,rand),hour=_CronExpressionParser.#parseField(CronUnit.Hour,rawFields.hour,fields_1.CronHour.constraints,rand),month=_CronExpressionParser.#parseField(CronUnit.Month,rawFields.month,fields_1.CronMonth.constraints,rand),dayOfMonth=_CronExpressionParser.#parseField(CronUnit.DayOfMonth,rawFields.dayOfMonth,fields_1.CronDayOfMonth.constraints,rand),{dayOfWeek:_dayOfWeek,nthDayOfWeek}=_CronExpressionParser.#parseNthDay(rawFields.dayOfWeek),dayOfWeek=_CronExpressionParser.#parseField(CronUnit.DayOfWeek,_dayOfWeek,fields_1.CronDayOfWeek.constraints,rand),fields=new CronFieldCollection_1.CronFieldCollection({second:new fields_1.CronSecond(second,{rawValue:rawFields.second}),minute:new fields_1.CronMinute(minute,{rawValue:rawFields.minute}),hour:new fields_1.CronHour(hour,{rawValue:rawFields.hour}),dayOfMonth:new fields_1.CronDayOfMonth(dayOfMonth,{rawValue:rawFields.dayOfMonth}),month:new fields_1.CronMonth(month,{rawValue:rawFields.month}),dayOfWeek:new fields_1.CronDayOfWeek(dayOfWeek,{rawValue:rawFields.dayOfWeek,nthDayOfWeek})});return new CronExpression_1.CronExpression(fields,{...options,expression})}static#getRawFields(expression,strict){if(strict&&!expression.length)throw new Error("Invalid cron expression");expression=expression||"0 * * * * *";let atoms=expression.trim().split(/\s+/);if(strict&&atoms.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(atoms.length>6)throw new Error("Invalid cron expression, too many fields");let defaults=["*","*","*","*","*","0"];atoms.length<defaults.length&&atoms.unshift(...defaults.slice(atoms.length));let[second,minute,hour,dayOfMonth,month,dayOfWeek]=atoms;return{second,minute,hour,dayOfMonth,month,dayOfWeek}}static#parseField(field,value,constraints,rand){if((field===CronUnit.Month||field===CronUnit.DayOfWeek)&&(value=value.replace(/[a-z]{3}/gi,match=>{match=match.toLowerCase();let replacer=Months[match]||DayOfWeek[match];if(replacer===void 0)throw new Error(`Validation error, cannot resolve alias "${match}"`);return replacer.toString()})),!constraints.validChars.test(value))throw new Error(`Invalid characters, got value: ${value}`);return value=this.#parseWildcard(value,constraints),value=this.#parseHashed(value,constraints,rand),this.#parseSequence(field,value,constraints)}static#parseWildcard(value,constraints){return value.replace(/[*?]/g,constraints.min+"-"+constraints.max)}static#parseHashed(value,constraints,rand){let randomValue=rand();return value.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(_,min,max,step)=>{if(min&&max&&step){let minNum=parseInt(min,10),maxNum=parseInt(max,10),stepNum=parseInt(step,10);if(minNum>maxNum)throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);if(stepNum<=0)throw new Error(`Invalid step: ${stepNum}, must be positive`);let minStart=Math.max(minNum,constraints.min),offset=Math.floor(randomValue*stepNum),values=[];for(let i=Math.floor(minStart/stepNum)*stepNum+offset;i<=maxNum;i+=stepNum)i>=minStart&&values.push(i);return values.join(",")}else if(min&&max){let minNum=parseInt(min,10),maxNum=parseInt(max,10);if(minNum>maxNum)throw new Error(`Invalid range: ${minNum}-${maxNum}, min > max`);return String(Math.floor(randomValue*(maxNum-minNum+1))+minNum)}else if(step){let stepNum=parseInt(step,10);if(stepNum<=0)throw new Error(`Invalid step: ${stepNum}, must be positive`);let offset=Math.floor(randomValue*stepNum),values=[];for(let i=Math.floor(constraints.min/stepNum)*stepNum+offset;i<=constraints.max;i+=stepNum)i>=constraints.min&&values.push(i);return values.join(",")}else return String(Math.floor(randomValue*(constraints.max-constraints.min+1)+constraints.min))})}static#parseSequence(field,val,constraints){let stack2=[];function handleResult(result,constraints2){if(Array.isArray(result))stack2.push(...result);else if(_CronExpressionParser.#isValidConstraintChar(constraints2,result))stack2.push(result);else{let v=parseInt(result.toString(),10);if(!(v>=constraints2.min&&v<=constraints2.max))throw new Error(`Constraint error, got value ${result} expected range ${constraints2.min}-${constraints2.max}`);stack2.push(field===CronUnit.DayOfWeek?v%7:result)}}return val.split(",").forEach(atom=>{if(!(atom.length>0))throw new Error("Invalid list value format");handleResult(_CronExpressionParser.#parseRepeat(field,atom,constraints),constraints)}),stack2}static#parseRepeat(field,val,constraints){let atoms=val.split("/");if(atoms.length>2)throw new Error(`Invalid repeat: ${val}`);return atoms.length===2?(isNaN(parseInt(atoms[0],10))||(atoms[0]=`${atoms[0]}-${constraints.max}`),_CronExpressionParser.#parseRange(field,atoms[0],parseInt(atoms[1],10),constraints)):_CronExpressionParser.#parseRange(field,val,1,constraints)}static#validateRange(min,max,constraints){if(!(!isNaN(min)&&!isNaN(max)&&min>=constraints.min&&max<=constraints.max))throw new Error(`Constraint error, got range ${min}-${max} expected range ${constraints.min}-${constraints.max}`);if(min>max)throw new Error(`Invalid range: ${min}-${max}, min(${min}) > max(${max})`)}static#validateRepeatInterval(repeatInterval){if(!(!isNaN(repeatInterval)&&repeatInterval>0))throw new Error(`Constraint error, cannot repeat at every ${repeatInterval} time.`)}static#createRange(field,min,max,repeatInterval){let stack2=[];field===CronUnit.DayOfWeek&&max%7===0&&stack2.push(0);for(let index=min;index<=max;index+=repeatInterval)stack2.indexOf(index)===-1&&stack2.push(index);return stack2}static#parseRange(field,val,repeatInterval,constraints){let atoms=val.split("-");if(atoms.length<=1)return isNaN(+val)?val:+val;let[min,max]=atoms.map(num=>parseInt(num,10));return this.#validateRange(min,max,constraints),this.#validateRepeatInterval(repeatInterval),this.#createRange(field,min,max,repeatInterval)}static#parseNthDay(val){let atoms=val.split("#");if(atoms.length<=1)return{dayOfWeek:atoms[0]};let nthValue=+atoms[atoms.length-1],matches=val.match(/([,-/])/);if(matches!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${matches?.[0]}\` special characters are incompatible`);if(!(atoms.length<=2&&!isNaN(nthValue)&&nthValue>=1&&nthValue<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:atoms[0],nthDayOfWeek:nthValue}}static#isValidConstraintChar(constraints,value){return constraints.chars.some(char=>value.toString().includes(char))}};exports2.CronExpressionParser=CronExpressionParser}});var require_CronFileParser=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/CronFileParser.js"(exports2){"use strict";var __createBinding=exports2&&exports2.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__setModuleDefault=exports2&&exports2.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=exports2&&exports2.__importStar||function(){var ownKeys=function(o){return ownKeys=Object.getOwnPropertyNames||function(o2){var ar=[];for(var k in o2)Object.prototype.hasOwnProperty.call(o2,k)&&(ar[ar.length]=k);return ar},ownKeys(o)};return function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k=ownKeys(mod),i=0;i<k.length;i++)k[i]!=="default"&&__createBinding(result,mod,k[i]);return __setModuleDefault(result,mod),result}}();Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronFileParser=void 0;var CronExpressionParser_1=require_CronExpressionParser(),CronFileParser=class _CronFileParser{static async parseFile(filePath){let{readFile:readFile3}=await Promise.resolve().then(()=>__importStar(__require("fs/promises"))),data=await readFile3(filePath,"utf8");return _CronFileParser.#parseContent(data)}static parseFileSync(filePath){let{readFileSync:readFileSync3}=__require("fs"),data=readFileSync3(filePath,"utf8");return _CronFileParser.#parseContent(data)}static#parseContent(data){let blocks=data.split(`
|
|
33
|
+
`),result={variables:{},expressions:[],errors:{}};for(let block of blocks){let entry=block.trim();if(entry.length===0||entry.startsWith("#"))continue;let variableMatch=entry.match(/^(.*)=(.*)$/);if(variableMatch){let[,key,value]=variableMatch;result.variables[key]=value.replace(/["']/g,"");continue}try{let parsedEntry=_CronFileParser.#parseEntry(entry);result.expressions.push(parsedEntry.interval)}catch(err){result.errors[entry]=err}}return result}static#parseEntry(entry){let atoms=entry.split(" ");return{interval:CronExpressionParser_1.CronExpressionParser.parse(atoms.slice(0,5).join(" ")),command:atoms.slice(5,atoms.length)}}};exports2.CronFileParser=CronFileParser}});var require_dist8=__commonJS({"../../node_modules/.pnpm/cron-parser@5.4.0/node_modules/cron-parser/dist/index.js"(exports2){"use strict";var __createBinding=exports2&&exports2.__createBinding||(Object.create?function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]}),__exportStar=exports2&&exports2.__exportStar||function(m,exports3){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports3,p)&&__createBinding(exports3,m,p)};Object.defineProperty(exports2,"__esModule",{value:!0});exports2.CronFileParser=exports2.CronExpressionParser=exports2.CronExpression=exports2.CronFieldCollection=exports2.CronDate=void 0;var CronExpressionParser_1=require_CronExpressionParser(),CronDate_1=require_CronDate();Object.defineProperty(exports2,"CronDate",{enumerable:!0,get:function(){return CronDate_1.CronDate}});var CronFieldCollection_1=require_CronFieldCollection();Object.defineProperty(exports2,"CronFieldCollection",{enumerable:!0,get:function(){return CronFieldCollection_1.CronFieldCollection}});var CronExpression_1=require_CronExpression();Object.defineProperty(exports2,"CronExpression",{enumerable:!0,get:function(){return CronExpression_1.CronExpression}});var CronExpressionParser_2=require_CronExpressionParser();Object.defineProperty(exports2,"CronExpressionParser",{enumerable:!0,get:function(){return CronExpressionParser_2.CronExpressionParser}});var CronFileParser_1=require_CronFileParser();Object.defineProperty(exports2,"CronFileParser",{enumerable:!0,get:function(){return CronFileParser_1.CronFileParser}});__exportStar(require_fields(),exports2);exports2.default=CronExpressionParser_1.CronExpressionParser}});var require_types2=__commonJS({"../../internals/local-schedules/dist/types.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),types_exports={};__export(types_exports,{ScheduleBrokerError:()=>ScheduleBrokerError2});module2.exports=__toCommonJS(types_exports);var ScheduleBrokerError2=class extends Error{constructor(code,message2){super(message2),this.code=code,this.name="ScheduleBrokerError"}}}});var require_timing=__commonJS({"../../internals/local-schedules/dist/timing.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),timing_exports={};__export(timing_exports,{nextCronOccurrence:()=>nextCronOccurrence,nextOccurrence:()=>nextOccurrence,singleOccurrence:()=>singleOccurrence,validateCronJitter:()=>validateCronJitter,validateTimezone:()=>validateTimezone});module2.exports=__toCommonJS(timing_exports);var import_cron_parser=require_dist8(),import_luxon=__require("luxon"),import_types=require_types2();function invalid(message2){throw new import_types.ScheduleBrokerError("invalid_request",message2)}function validateTimezone(timezone){(timezone.length>50||!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(timezone))&&invalid("Expected a valid IANA timezone");try{new Intl.DateTimeFormat("en-US",{timeZone:timezone})}catch{invalid("Expected a valid IANA timezone")}}function parseCron(cron,timezone,after){let fields=cron.split(" ");(fields.length!==5||fields.some(field=>!/^[\d*,/-]+$/.test(field))||fields[2]!=="*"&&fields[4]!=="*"||fields[4].split(/\D+/).some(value=>Number(value)>6))&&invalid("Expected a numeric five-field cron; one of day-of-month/day-of-week must be *, Sunday is 0");try{return import_cron_parser.CronExpressionParser.parse(`0 ${cron}`,{currentDate:after,tz:timezone,strict:!0})}catch(error2){invalid(`Invalid cron: ${error2 instanceof Error?error2.message:String(error2)}`)}}function validateCronJitter(cron,timezone,jitter){let{fields}=parseCron(cron,timezone,0),times=fields.hour.values.flatMap(hour=>fields.minute.values.map(minute=>hour*60+minute)),dayCycle=1440,[,,dayOfMonth,month,dayOfWeek]=cron.split(" ");if(dayOfMonth==="*"&&month==="*"&&dayOfWeek!=="*"){let days=fields.dayOfWeek.values.map(Number),gap=7-days[days.length-1]+days[0];for(let i=1;i<days.length;i++)gap=Math.min(gap,days[i]-days[i-1]);dayCycle*=gap}let cadence=dayCycle-times[times.length-1]+times[0];for(let i=1;i<times.length;i++)cadence=Math.min(cadence,times[i]-times[i-1]);jitter>cadence&&invalid("Jitter exceeds the cron cadence")}function nextCronOccurrence(cron,timezone,after){let iterator=parseCron(cron,timezone,after);for(let attempt=0;attempt<1500;attempt++){let timestamp;try{timestamp=iterator.next().getTime()}catch{invalid("Cron has no calculable next occurrence")}let local=import_luxon.DateTime.fromMillis(timestamp,{zone:timezone}),fields=iterator.fields;if(!fields.hour.values.some(hour=>hour===local.hour)||!fields.minute.values.some(minute=>minute===local.minute))continue;let first=Math.min(...local.getPossibleOffsets().map(date=>date.toMillis()));if(timestamp===first)return timestamp}invalid("Could not resolve cron across timezone transitions")}function singleOccurrence(at,timezone){/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/.test(at)||invalid("Expected YYYY-MM-DDTHH:mm:ss without a timezone suffix");let local=import_luxon.DateTime.fromISO(at,{zone:timezone});return(!local.isValid||local.toFormat("yyyy-MM-dd'T'HH:mm:ss")!==at)&&invalid("One-shot time is invalid or nonexistent in its timezone"),local.getPossibleOffsets().length!==1&&invalid("Ambiguous one-shot time in its timezone"),local.toMillis()}function nextOccurrence(expression,timezone,after){if(expression.type==="cron")return nextCronOccurrence(expression.cron,timezone,after);expression.type!=="single"&&invalid("Unknown schedule expression type");let at=singleOccurrence(expression.at,timezone);return at>=after?at:void 0}}});var require_schedule_broker=__commonJS({"../../internals/local-schedules/dist/schedule-broker.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),schedule_broker_exports={};__export(schedule_broker_exports,{ScheduleBroker:()=>ScheduleBroker3});module2.exports=__toCommonJS(schedule_broker_exports);var import_node_crypto2=__require("node:crypto"),import_node_util=__require("node:util"),import_dispatch=require_dispatch(),import_ids=require_ids(),import_timing=require_timing(),import_types=require_types2(),MAX_TIMER_DELAY=6e4;function invalid(message2){throw new import_types.ScheduleBrokerError("invalid_request",message2)}function identifier2(value){return(typeof value!="string"||!/^[0-9A-Za-z._-]{1,256}$/.test(value))&&invalid("Invalid schedule name or namespace"),value}function keyOf(input){return`${identifier2(input.namespace??"default")}/${identifier2(input.name)}`}function serializePayload(payload){if(payload!==void 0)try{let result=JSON.stringify(payload);return result===void 0&&invalid("Payload must be JSON serializable"),result}catch{invalid("Payload must be JSON serializable")}}function prepare(input,now){let timezone=input.timezone??"UTC";(0,import_timing.validateTimezone)(timezone),input.jitter!==void 0&&(!Number.isInteger(input.jitter)||input.jitter<1||input.jitter>15)&&invalid("Jitter must be an integer from 1 to 15 minutes");let target=input.target,targetRef=target?.type==="queue"?target.topic:target?.type==="function"?target.function:target?.type==="path"?target.path:void 0;(!target||target.type!=="queue"&&target.type!=="function"&&target.type!=="path"||typeof targetRef!="string"||!targetRef)&&invalid("Expected a queue topic, function, or path target");let next=(0,import_timing.nextOccurrence)(input.expression,timezone,now);return input.expression.type==="cron"&&input.jitter!==void 0&&(0,import_timing.validateCronJitter)(input.expression.cron,timezone,input.jitter),{expression:{...input.expression},timezone,...input.jitter===void 0?{}:{jitter:input.jitter},target:{...target},payload:serializePayload(input.payload),next}}var ScheduleBroker3=class{constructor(options){this.options=options,this.entries=new Map,this.inFlight=new Set,this.running=!1,this.closed=!1,this.scope={ownerId:options.ownerId,projectId:options.projectId,trackId:options.trackId},Object.values(this.scope).some(value=>typeof value!="string"||!value)&&invalid("An owner, project, and track are required"),this.now=options.now??Date.now,this.random=options.random??Math.random}start(){this.assertOpen(),this.running=!0,this.arm()}create(input){this.assertOpen(),input.target.type!=="queue"&&invalid("Dynamic schedules require a queue target");let name=input.name??`dyn.${(0,import_node_crypto2.randomBytes)(12).toString("hex")}`,key=keyOf({...input,name});if(this.entries.has(key))throw new import_types.ScheduleBrokerError("conflict",`Schedule ${key} already exists`);let entry=this.insert({...input,name},prepare(input,this.now()),"dynamic");return this.arm(),structuredClone(entry.schedule)}get(input){return structuredClone(this.require(input).schedule)}list(input={}){let namespace=identifier2(input.namespace??"default"),limit=input.limit??20;(!Number.isInteger(limit)||limit<1||limit>100)&&invalid("Limit must be between 1 and 100");let after="",scope=[this.scope.ownerId,this.scope.projectId,this.scope.trackId,namespace];if(input.cursor!==void 0)try{let cursor=JSON.parse(Buffer.from(input.cursor,"base64url").toString());(!Array.isArray(cursor)||cursor.length!==5||!scope.every((value,i)=>value===cursor[i]))&&invalid("Invalid list cursor"),after=identifier2(cursor[4])}catch{invalid("Invalid list cursor")}let records=[...this.entries.values()].map(entry=>entry.schedule).filter(schedule=>schedule.namespace===namespace&&schedule.name>after).sort((a,b)=>a.name<b.name?-1:a.name>b.name?1:0),data=records.slice(0,limit);return{data:structuredClone(data),cursor:records.length>limit?Buffer.from(JSON.stringify([...scope,data[data.length-1].name])).toString("base64url"):null}}update(input,changes){this.assertOpen();let entry=this.require(input);changes.target&&changes.target.type!=="queue"&&invalid("Management updates require a queue target");let prepared=prepare({...entry.schedule,...changes,expression:changes.expression??entry.schedule.expression,timezone:changes.timezone??entry.schedule.timezone,target:changes.target??entry.schedule.target,jitter:changes.jitter===null?void 0:changes.jitter??entry.schedule.jitter,payload:changes.payload===void 0?entry.payload===void 0?void 0:JSON.parse(entry.payload):changes.payload===null?void 0:changes.payload},this.schedulingBoundary(entry));return this.replace(entry,prepared),this.arm(),structuredClone(entry.schedule)}delete(input){this.assertOpen();let entry=this.require(input);return this.cancel(entry),this.entries.delete(keyOf(input)),this.arm(),{scheduleId:entry.schedule.scheduleId}}enable(input){return this.setState(input,"active")}disable(input){return this.setState(input,"inactive")}validateStatic(inputs){this.prepareStatic(inputs)}prepareStatic(inputs){this.assertOpen();let prepared=new Map;for(let input of inputs){"payload"in input&&invalid("Static schedule definitions cannot include a payload");let key=keyOf(input),existing=this.entries.get(key);if(prepared.has(key)||existing?.schedule.source==="dynamic")throw new import_types.ScheduleBrokerError("conflict",`Static schedule ${key} conflicts with an existing definition`);prepared.set(key,{input,value:{...prepare(input,this.schedulingBoundary(existing)),payload:existing?.payload}})}return prepared}reconcileStatic(inputs){let prepared=this.prepareStatic(inputs);for(let[key,entry]of this.entries)entry.schedule.source==="static"&&!prepared.has(key)&&(this.cancel(entry),this.entries.delete(key));let result=[];for(let[key,{input,value}]of prepared){let existing=this.entries.get(key),entry=existing??this.insert(input,value,"static");existing&&!this.matches(existing,value)&&this.replace(existing,value),result.push(structuredClone(entry.schedule))}return this.arm(),result}async invoke(input){this.assertOpen();let entry=this.require(input),at=this.now();await this.dispatch(entry,at,"manual")}async close(){this.closed=!0,this.running=!1,this.timer&&clearTimeout(this.timer),this.timer=void 0;for(let entry of this.entries.values())this.cancel(entry);await Promise.allSettled([...this.inFlight])}assertOpen(){if(this.closed)throw new import_types.ScheduleBrokerError("closed","Schedule broker is closed")}require(input){let key=keyOf(input),entry=this.entries.get(key);if(!entry)throw new import_types.ScheduleBrokerError("not_found",`Schedule ${key} not found`);return entry}insert(input,value,source){let{payload,next,...definition2}=value,now=this.now(),entry={schedule:{...this.scope,...definition2,scheduleId:(0,import_ids.generateScheduleId)(),name:input.name,namespace:input.namespace??"default",state:"active",source,createdAt:now,updatedAt:now},payload,next,consumed:!1,pending:new Map,controllers:new Set};return this.entries.set(keyOf(input),entry),entry}matches(entry,value){return(0,import_node_util.isDeepStrictEqual)(entry.schedule.expression,value.expression)&&(0,import_node_util.isDeepStrictEqual)(entry.schedule.target,value.target)&&entry.schedule.timezone===value.timezone&&entry.schedule.jitter===value.jitter&&entry.payload===value.payload}replace(entry,value){this.cancel(entry),(!(0,import_node_util.isDeepStrictEqual)(entry.schedule.expression,value.expression)||entry.schedule.timezone!==value.timezone)&&(entry.consumed=!1);let{payload,next,...definition2}=value;entry.schedule={...entry.schedule,...definition2,jitter:value.jitter,updatedAt:this.now()},entry.payload=payload,entry.next=entry.consumed||entry.schedule.state!=="active"?void 0:next}setState(input,state){this.assertOpen();let entry=this.require(input);if(entry.schedule.state!==state){let next=state==="active"&&!entry.consumed?(0,import_timing.nextOccurrence)(entry.schedule.expression,entry.schedule.timezone,this.schedulingBoundary(entry)):void 0;this.cancel(entry),entry.schedule={...entry.schedule,state,updatedAt:this.now()},entry.next=next,this.arm()}return structuredClone(entry.schedule)}schedulingBoundary(entry){return Math.max(this.now(),(entry?.lastScheduledAt??-1/0)+1)}cancel(entry){entry.next=void 0,entry.pending.clear();for(let controller of entry.controllers)controller.abort();entry.controllers.clear()}arm(){if(this.timer&&clearTimeout(this.timer),this.timer=void 0,!this.running)return;let deadline=1/0;for(let entry of this.entries.values()){entry.next!==void 0&&(deadline=Math.min(deadline,entry.next));for(let due of entry.pending.values())deadline=Math.min(deadline,due)}Number.isFinite(deadline)&&(this.timer=setTimeout(()=>this.tick(),Math.max(0,Math.min(MAX_TIMER_DELAY,deadline-this.now()))),this.timer.unref())}tick(){if(this.timer=void 0,!this.running)return;let now=this.now();for(let entry of this.entries.values()){if(entry.next!==void 0&&entry.next<=now){let at=entry.next;entry.lastScheduledAt=at;let offset=entry.schedule.jitter===void 0?0:Math.floor(this.random()*(entry.schedule.jitter*60+1))*1e3;entry.pending.set(at,at+offset),entry.next=entry.schedule.expression.type==="cron"?(0,import_timing.nextOccurrence)(entry.schedule.expression,entry.schedule.timezone,now):void 0}for(let[at,due]of entry.pending)due>now||(entry.pending.delete(at),this.dispatch(entry,at,"scheduled"))}this.arm()}dispatch(entry,at,source){let controller=new AbortController;entry.controllers.add(controller);let invocation=(0,import_dispatch.createDispatch)(structuredClone(entry.schedule),entry.payload,at,(0,import_ids.scheduleExecutionId)(entry.schedule.scheduleId,at),source,controller.signal),promise=Promise.resolve().then(async()=>{if(!(this.closed||controller.signal.aborted)){source==="scheduled"&&entry.schedule.expression.type==="single"&&(entry.consumed=!0);try{await this.options.dispatch(invocation)}catch(error2){if(controller.signal.aborted)return;if(source==="manual")throw error2;try{this.options.onError(error2,invocation)}catch{}}}}).finally(()=>{entry.controllers.delete(controller),this.inFlight.delete(promise)});return this.inFlight.add(promise),promise}}}});var require_dist9=__commonJS({"../../internals/local-schedules/dist/index.js"(exports2,module2){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{ScheduleBroker:()=>import_schedule_broker.ScheduleBroker});module2.exports=__toCommonJS(src_exports);var import_schedule_broker=require_schedule_broker();__reExport(src_exports,require_types2(),module2.exports)}});var require_tree_kill=__commonJS({"../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js"(exports2,module2){"use strict";var childProcess=__require("child_process"),spawn=childProcess.spawn,exec=childProcess.exec;module2.exports=function(pid,signal,callback){if(typeof signal=="function"&&callback===void 0&&(callback=signal,signal=void 0),pid=parseInt(pid),Number.isNaN(pid)){if(callback)return callback(new Error("pid must be a number"));throw new Error("pid must be a number")}var tree={},pidsToProcess={};switch(tree[pid]=[],pidsToProcess[pid]=1,process.platform){case"win32":exec("taskkill /pid "+pid+" /T /F",callback);break;case"darwin":buildProcessTree(pid,tree,pidsToProcess,function(parentPid){return spawn("pgrep",["-P",parentPid])},function(){killAll(tree,signal,callback)});break;default:buildProcessTree(pid,tree,pidsToProcess,function(parentPid){return spawn("ps",["-o","pid","--no-headers","--ppid",parentPid])},function(){killAll(tree,signal,callback)});break}};function killAll(tree,signal,callback){var killed={};try{Object.keys(tree).forEach(function(pid){tree[pid].forEach(function(pidpid){killed[pidpid]||(killPid(pidpid,signal),killed[pidpid]=1)}),killed[pid]||(killPid(pid,signal),killed[pid]=1)})}catch(err){if(callback)return callback(err);throw err}if(callback)return callback()}function killPid(pid,signal){try{process.kill(parseInt(pid,10),signal)}catch(err){if(err.code!=="ESRCH")throw err}}function buildProcessTree(parentPid,tree,pidsToProcess,spawnChildProcessesList,cb){var ps=spawnChildProcessesList(parentPid),allData="";ps.stdout.on("data",function(data){var data=data.toString("ascii");allData+=data});var onClose=function(code){if(delete pidsToProcess[parentPid],code!=0){Object.keys(pidsToProcess).length==0&&cb();return}allData.match(/\d+/g).forEach(function(pid){pid=parseInt(pid,10),tree[parentPid].push(pid),tree[pid]=[],pidsToProcess[pid]=1,buildProcessTree(pid,tree,pidsToProcess,spawnChildProcessesList,cb)})};ps.on("close",onClose)}}});var require_escape_html=__commonJS({"../../node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js"(exports2,module2){"use strict";var matchHtmlRegExp=/["'&<>]/;module2.exports=escapeHtml;function escapeHtml(string){var str=""+string,match=matchHtmlRegExp.exec(str);if(!match)return str;var escape2,html="",index=0,lastIndex=0;for(index=match.index;index<str.length;index++){switch(str.charCodeAt(index)){case 34:escape2=""";break;case 38:escape2="&";break;case 39:escape2="'";break;case 60:escape2="<";break;case 62:escape2=">";break;default:continue}lastIndex!==index&&(html+=str.substring(lastIndex,index)),lastIndex=index+1,html+=escape2}return lastIndex!==index?html+str.substring(lastIndex,index):html}}});var import_chalk4=__toESM(require_source(),1);import path5 from"path";var import_chalk3=__toESM(require_source(),1),import_ms8=__toESM(require_ms(),1),import_fs_extra2=__toESM(require_lib(),1),import_fs_detectors3=__toESM(require_dist4(),1),import_frameworks4=__toESM(require_frameworks(),1);import{resolve as resolve2,join as join6}from"path";var import_fs_extra=__toESM(require_lib(),1),import_ms6=__toESM(require_ms(),1),import_chalk2=__toESM(require_source(),1);import url3,{URL as URL2}from"url";import http from"http";import{Socket}from"net";var import_pluralize2=__toESM(require_pluralize(),1),import_raw_body2=__toESM(require_raw_body(),1),import_async_listen=__toESM(require_dist2(),1),import_minimatch3=__toESM(require_minimatch(),1),import_http_proxy_node16=__toESM(require_http_proxy_node16(),1),import_serve_handler=__toESM(require_src2(),1),import_pcre_to_regexp2=__toESM(require_dist6(),1),import_dotenv=__toESM(require_main(),1),import_once=__toESM(require_dist7(),1),import_directory=__toESM(require_directory(),1),import_get_port2=__toESM(require_get_port(),1),import_fast_deep_equal=__toESM(require_fast_deep_equal(),1);import{randomBytes as randomBytes2,timingSafeEqual}from"crypto";import{watch}from"chokidar";import path4,{isAbsolute as isAbsolute3,basename,dirname as dirname3,extname as extname2,join as join4,sep as sep2}from"path";var import_is_port_reachable=__toESM(require_is_port_reachable(),1);var import_build_utils=__toESM(require_build_utils(),1),import_ms=__toESM(require_ms(),1),REPORT_A_BUG="This is likely a bug in the Vercel CLI. Please report it at https://vercel.com/help.",REPORT_A_BUILDER_BUG="This is likely a bug in the Builder that produced this function. Report it to the Builder's author, or at https://vercel.com/help for an official `@vercel/*` Builder.",dev=defineDiagnostics({codes:{DEV_RECURSIVE_INVOCATION:{why:"`vercel dev` must not recursively invoke itself",fix:"Check the Development Command in your Project Settings and the `dev` script in `package.json` \u2014 neither should call `vercel dev`.",docs:"https://vercel.link/recursive-invocation-of-commands"},DEV_LOCK_HELD:{why:"Another `vercel dev` process is already running for this project",fix:p=>p.detail},DEV_INVALID_WINDOWS_PIPE:{why:p=>`Invalid Windows named pipe endpoint: ${p.endpoint}`,fix:"Use a pipe path beginning with `\\\\.\\`, e.g. `pipe:\\\\.\\pipe\\my-app`."},DEV_INVALID_UNIX_SOCKET:{why:p=>`Invalid UNIX domain socket endpoint: ${p.endpoint}`,fix:"Provide a socket path, e.g. `unix:/tmp/my-app.sock`."},DEV_INVALID_LISTEN_SCHEME:{why:p=>`Unknown \`--listen\` scheme (protocol): ${p.protocol}`,fix:"Use a port (e.g. `3000`), or a `tcp:`, `unix:`, or `pipe:` endpoint."},DEV_PORT_DETECTION_TIMED_OUT:{why:p=>`Detecting port ${p.port} timed out after ${(0,import_ms.default)(p.timeout)}`,fix:"Ensure your Development Command starts a server that listens on the expected port."},DEV_BUILDER_LOAD_FAILED:{why:p=>`Failed to load Builder "${p.use}"`,fix:"Check that the Builder is installed and spelled correctly in your `vercel.json` `builds` configuration."},DEV_SIDECAR_UNSUPPORTED_TYPE:{why:p=>`Development sidecar "${p.name}" has unsupported type "${p.type}"`,fix:REPORT_A_BUILDER_BUG},DEV_SIDECAR_DUPLICATE_NAME:{why:p=>`Multiple builders contributed a development sidecar named "${p.name}"`,fix:REPORT_A_BUILDER_BUG},DEV_QUEUE_CONSUMER_DUPLICATE:{why:p=>`Queue consumer "${p.consumerGroup}" is configured more than once for topic "${p.topic}"`,fix:"Remove the duplicate consumer configuration so each consumer subscribes to a topic only once."},DEV_QUEUE_FUNCTION_UNSUPPORTED:{why:p=>`Can't register the queue trigger for "${p.sourceFile}": ${p.reason}.`,fix:"Use an endpoint supported by the builder for local queue delivery, or test this trigger in a deployment."},DEV_FUNCTION_MANIFEST_INVALID:{why:p=>`Builder "${p.use}" returned an invalid development function manifest.`,fix:"Check getDevManifest output identities, invocation paths, and normalized trigger metadata. Paths must not contain an origin, query, fragment, or traversal."},DEV_FUNCTION_OUTPUT_DUPLICATE:{why:p=>`Development function output "${p.outputPath}" is configured more than once.`,fix:"Each deployment function output must have one owner."},DEV_SCHEDULE_FUNCTION_MISSING:{why:p=>`Schedule "${p.name}" targets missing development function "${p.outputPath}".`,fix:"Use the exact build output ID, not a source path or URL. The builder must expose it through getDevManifest or a supported per-entrypoint function build; service-hosted targets are not supported locally yet."},DEV_SCHEDULE_FUNCTION_TRIGGER:{why:p=>`Schedule "${p.name}" targets function "${p.outputPath}" without a sole schedule/v1beta trigger.`,fix:'Declare experimentalTriggers: [{ "type": "schedule/v1beta" }] on the target function, or have its builder return that trigger in getDevManifest.'},DEV_QUEUE_FUNCTION_UNMATCHED:{why:p=>`No local queue endpoint matches functions["${p.pattern}"]. Its queue trigger will not receive messages.`,fix:"Check the source path and earlier functions entries. The builder must support getDevManifest or a conventional per-entrypoint function build."},DEV_SERVICE_NO_DEV_SERVER:{why:p=>`No dev server available for service "${p.name}" (framework: ${p.framework})`,fix:"Add a Development Command for this service, or set its framework so one can be detected."},DEV_SERVICE_NO_PID:{why:p=>`Failed to start service "${p.name}": no PID returned`,fix:"Verify the service Development Command is executable and starts successfully."},DEV_SERVICE_NO_STDIO:{why:p=>`Failed to start service "${p.name}": expected child process to have stdout and stderr`,fix:REPORT_A_BUG},DEV_BUILDER_RESULT_NOT_LAMBDA:{why:'The result of "builder.build()" must be a `Lambda`',fix:REPORT_A_BUILDER_BUG},DEV_BUILDER_RESULT_HAS_MAXDURATION:{why:'The result of "builder.build()" must not contain `maxDuration`',fix:REPORT_A_BUILDER_BUG},DEV_BUILDER_RESULT_HAS_MEMORY:{why:'The result of "builder.build()" must not contain `memory`',fix:REPORT_A_BUILDER_BUG},DEV_UNSUPPORTED_BUILDER_VERSION:{why:p=>`${p.titleName} CLI does not support builder version ${p.version}`,fix:p=>p.updateMessage},DEV_INVALID_ROUTES:{why:p=>p.message,fix:REPORT_A_BUILDER_BUG},DEV_LISTEN_ADDRESS_IN_USE:{why:p=>`Requested socket ${p.address} is already in use`,fix:"Stop the process using that socket, or pass a different `--listen` address."},DEV_UNSUPPORTED_CONFIG_VERSION:{why:"Cannot run `version: 1` projects",fix:'Upgrade the project to the current configuration \u2014 remove `"version": 1` from your `vercel.json`.'},DEV_CWD_NOT_FOUND:{why:p=>`Directory \`${p.cwd}\` does not exist`,fix:"Run the command from an existing directory, or pass a valid path."},DEV_CWD_NOT_DIRECTORY:{why:p=>`Path \`${p.cwd}\` is not a directory`,fix:"Point the command at a directory rather than a file."},DEV_INTERNAL_ADDRESS_UNAVAILABLE:{why:"Invalid access to `address` because `start` has not yet populated `this.address`",fix:REPORT_A_BUG},DEV_INTERNAL_NO_ROUTE_RESULT:{why:"Expected Route Result but none was found",fix:REPORT_A_BUG},DEV_INTERNAL_MISSING_CHILD_STDIO:{why:"Expected child process to have stdout and stderr",fix:REPORT_A_BUG},DEV_SYSCALL_ERROR:{why:p=>p.message,fix:"This is an operating-system error. Check the file path, permissions, and ports referenced above, then retry."}}}),FIX_BY_CODE={missing_build_script:"Add a `build` script to your `package.json`, or set a Build Command in your Project Settings.",MISSING_DOTENV_VARS:"Define the missing variables in your `.env` file, or pull them with `vercel env pull`.",MAX_LAMBDA_SIZE_EXCEEDED:"Reduce the function bundle \u2014 trim dependencies or included files, or split the function.",NODE_DEPENDENCY_SYNC_FAILED:"Install your dependencies (e.g. `npm install`) and confirm they resolve, then retry.",INSTALL_COMMAND_FAILED:"Fix the dependency error logged above, then retry.",CONFLICTING_CONFIG_FILES:"Keep a single configuration file \u2014 remove the extra `vercel.json`/`now.json`.",CANT_PARSE_JSON_FILE:"Fix the JSON syntax error at the location shown above, then retry."};function toDiagnostic(err){if(err instanceof Diagnostic)return err;let source=err,why=err instanceof Error?err.message:typeof source.message=="string"?source.message:String(err);if(typeof source.errno=="number"||typeof source.syscall=="string")return dev.DEV_SYSCALL_ERROR({message:why,cause:err});let code=typeof source.code=="string"?source.code:void 0,docs=typeof source.link=="string"?source.link:void 0,action=typeof source.action=="string"?source.action:void 0,fix=code?FIX_BY_CODE[code]:void 0,diagnostic=new Diagnostic({why,fix,docs,cause:err});return code&&(diagnostic.name=code),action&&(diagnostic.action=action),diagnostic}var DevCommandExitError=class extends Diagnostic{constructor(message2,exitCode){super({why:message2,fix:"Your Development Command exited before the dev server was ready. Fix the error logged above, then confirm the command runs on its own (e.g. `npm run dev`)."});this.name="DEV_COMMAND_EXITED",this.exitCode=exitCode}},ServiceStartError=class extends Diagnostic{constructor(failures){let dedupeErrorCodes=new Set(["PYTHON_EXTERNAL_VENV_DETECTED"]),seenCodes=new Set,uniqueMessages=[],childFixes=[],childCodes=[];for(let err of failures){let message2=err instanceof Error?err.message:String(err),rawCode=err?.code,code=err instanceof import_build_utils.NowBuildError?err.code:typeof rawCode=="string"?rawCode:void 0;code&&dedupeErrorCodes.has(code)?seenCodes.has(code)||(uniqueMessages.push(message2),seenCodes.add(code)):uniqueMessages.push(message2),code&&!childCodes.includes(code)&&childCodes.push(code);let childFix=code?FIX_BY_CODE[code]:void 0;childFix&&!childFixes.includes(childFix)&&childFixes.push(childFix)}super({why:uniqueMessages.join(`
|
|
34
34
|
`),fix:childFixes.length?childFixes.join(`
|
|
35
35
|
`):"Review the per-service errors above and fix each failing service before retrying."});this.name="DEV_SERVICE_START_FAILED",this.childCodes=childCodes}};function telemetryCodes(diagnostic){return diagnostic instanceof ServiceStartError&&diagnostic.childCodes.length?diagnostic.childCodes:[diagnostic.name]}function sleep(ms9){return new Promise(resolve3=>setTimeout(resolve3,ms9))}async function getReachableHostOnPort(port){let optsIpv4={host:"127.0.0.1"},optsIpv6={host:"::1"};return(await Promise.all([(0,import_is_port_reachable.default)(port,optsIpv6).then(r=>r&&`[${optsIpv6.host}]`),(0,import_is_port_reachable.default)(port,optsIpv4).then(r=>r&&optsIpv4.host)])).find(Boolean)||!1}async function checkForPort(port,timeout){let host,start=Date.now();for(;!(host=await getReachableHostOnPort(port))&&!(Date.now()-start>timeout);)await sleep(100);if(!host)throw dev.DEV_PORT_DETECTION_TIMED_OUT({port,timeout});return host}var import_npm_package_arg=__toESM(require_npa(),1),import_json_parse_better_errors=__toESM(require_json_parse_better_errors(),1),import_client=__toESM(require_dist5(),1),import_routing_utils3=__toESM(require_dist3(),1),import_build_utils9=__toESM(require_build_utils(),1),import_fs_detectors2=__toESM(require_dist4(),1),import_detect_builders_with_services=__toESM(require_detect_builders_with_services(),1),import_frameworks3=__toESM(require_frameworks(),1),import_local_schedules2=__toESM(require_dist9(),1);var import_build_utils2=__toESM(require_build_utils(),1);import{relative as nativeRelative}from"path";function relative2(a,b){return(0,import_build_utils2.normalizePath)(nativeRelative(a,b))}var import_get_files=__toESM(require_get_files(),1);function staticFiles(path6,options){return(0,import_get_files.staticFiles)(path6,options,output_manager_default)}var import_pcre_to_regexp=__toESM(require_dist6(),1);import url2 from"url";function isURL(str){return typeof str=="string"&&/^https?:\/\//.test(str)}var import_routing_utils=__toESM(require_dist3(),1);function parseQueryString(querystring){let query=Object.create(null);if(!querystring||!querystring.startsWith("?")||querystring==="?")return query;let params=querystring.slice(1).split("&");for(let param2 of params){let[key,value]=param2.split("=");key!==void 0&&(key=decodeURIComponent(key)),value!==void 0&&(value=decodeURIComponent(value));let existing=query[key];existing||(existing=[],query[key]=existing),existing.push(value)}return query}function formatQueryString(query){if(!query)return null;let s="",prefix="?";for(let[key,values]of Object.entries(query))for(let value of values)s+=prefix,s+=encodeURIComponent(key),value!==void 0&&(s+="=",s+=encodeURIComponent(value)),prefix="&";return s||null}import url from"url";function resolveTransforms(transforms,ctx){return!transforms||transforms.length===0?[]:transforms.map(transform=>transform.type==="request.path"?{...transform,args:resolveString(transform.args,transform,ctx)}:{...transform,target:{key:resolveKey(transform.target.key,transform,ctx)},args:resolveArgs(transform.args,transform,ctx)})}function applyResponseTransforms(headers,transforms){for(let transform of transforms)transform.type==="response.headers"&&"target"in transform&&applyTransform(headers,transform,!0)}function applyRequestTransforms(req,transforms){if(transforms.length===0)return;applyRequestHeaderTransforms(req.headers,transforms);let parsed=url.parse(req.url||"/"),query=parseQueryString(parsed.search);applyQueryTransforms(query,transforms);let newPath=getRequestPath(transforms);newPath!==void 0&&(parsed.pathname=newPath),parsed.search=formatQueryString(query),req.url=url.format(parsed)}function hasResponseTransforms(transforms){return transforms.some(t=>t.type==="response.headers")}function resolveKey(key,_transform,ctx){return typeof key=="string"?expandCaptureGroups(key,ctx.match,ctx.keys):key}function resolveArgs(args2,transform,ctx){return typeof args2=="string"?resolveString(args2,transform,ctx):Array.isArray(args2)?args2.map(a=>typeof a=="string"?resolveString(a,transform,ctx):a):args2}function resolveString(value,transform,ctx){let resolved=expandCaptureGroups(value,ctx.match,ctx.keys);return transform.env&&transform.env.length>0&&ctx.env&&(resolved=expandEnvVars(resolved,transform.env,ctx.env)),resolved}function expandCaptureGroups(str,match,keys){return str.replace(/\$([0-9A-Za-z_]+)/g,(whole,name)=>{let namedIdx=keys.indexOf(name);if(namedIdx!==-1)return match[namedIdx+1]??"";if(/^[0-9]+$/.test(name)){let n=parseInt(name,10);if(n<match.length)return match[n]??""}return whole})}function expandEnvVars(str,allowlist,env){let allowed=new Set(allowlist);return str.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)/g,(match,braced,bare)=>{let name=braced??bare;return!allowed.has(name)||env[name]===void 0?match:env[name]})}function applyRequestHeaderTransforms(headers,transforms){for(let transform of transforms)transform.type==="request.headers"&&"target"in transform&&applyTransform(headers,transform,!0)}function applyQueryTransforms(query,transforms){for(let transform of transforms)transform.type==="request.query"&&"target"in transform&&applyTransform(query,transform,!1);for(let key of Object.keys(query)){let value=query[key];value===void 0?delete query[key]:typeof value=="string"&&(query[key]=[value])}}var HEADER_NAME_RE=/^[-\w]+$/,HEADER_VALUE_RE=/^[-\w:;.,/\\"'?!(){}[\]@<>=+*#$&`|~%^ ]+$/;function isValidHeaderName(name){return name.length>0&&HEADER_NAME_RE.test(name)}function isValidHeaderValue(value){return value.length>0&&HEADER_VALUE_RE.test(value)}function hasValidHeaderArgs(args2){return typeof args2=="string"?isValidHeaderValue(args2):Array.isArray(args2)?args2.every(isValidHeaderValue):!1}function applyTransform(data,transform,isHeader){let keySelector=transform.target?.key;if(keySelector==null||isHeader&&(transform.op==="set"||transform.op==="append")&&(typeof keySelector=="string"&&!isValidHeaderName(keySelector)||!hasValidHeaderArgs(transform.args)))return;let matchedKeys=findMatchingKeys(data,keySelector);switch(transform.op){case"set":opSet(data,matchedKeys,keySelector,transform.args);break;case"append":opAppend(data,matchedKeys,keySelector,transform.args,isHeader);break;case"delete":opDelete(data,matchedKeys,transform.args,isHeader);break;default:break}}function isValidRequestPath(path6){if(path6===""||path6.length>2048||path6[0]!=="/"||path6.startsWith("//")||/[?#]/.test(path6))return!1;for(let i=0;i<path6.length;i++){let code=path6.charCodeAt(i);if(code<=32||code===127)return!1}return!0}function getRequestPath(transforms){let path6;for(let transform of transforms)transform.type==="request.path"&&transform.op==="set"&&typeof transform.args=="string"&&isValidRequestPath(transform.args)&&(path6=transform.args);return path6}function findMatchingKeys(data,keyPattern){let matched=[];for(let key of Object.keys(data))matchesRule(key,keyPattern)&&matched.push(key);return matched}function matchesRule(candidate,rule){if(candidate=candidate.toLowerCase(),rule==null)return!0;if(typeof rule=="string")return candidate===rule.toLowerCase();let r=rule;for(let[op,val]of Object.entries(r))if(val!==void 0)switch(op){case"eq":if(candidate!==String(val).toLowerCase())return!1;break;case"neq":if(candidate===val.toLowerCase())return!1;break;case"inc":if(!val.some(v=>candidate===v.toLowerCase()))return!1;break;case"ninc":if(val.some(v=>candidate===v.toLowerCase()))return!1;break;case"pre":if(!candidate.startsWith(String(val).toLowerCase()))return!1;break;case"suf":if(!candidate.endsWith(String(val).toLowerCase()))return!1;break;case"sub":if(!candidate.includes(String(val).toLowerCase()))return!1;break;case"gt":if(!(Number(candidate)>val))return!1;break;case"gte":if(!(Number(candidate)>=val))return!1;break;case"lt":if(!(Number(candidate)<val))return!1;break;case"lte":if(!(Number(candidate)<=val))return!1;break;default:break}return!0}function opSet(data,matchedKeys,keySelector,args2){for(let key of matchedKeys)data[key]=args2;matchedKeys.length===0&&typeof keySelector=="string"&&data[keySelector]===void 0&&!isEmptyArgs(args2)&&(data[keySelector]=args2)}function opAppend(data,matchedKeys,keySelector,args2,isHeader){if(isEmptyArgs(args2))return;let toAppend=typeof args2=="string"?[args2]:args2??[];for(let key of matchedKeys){let next=[...toValueList(data[key],isHeader),...toAppend];setTransformValue(data,key,fromValueList(next))}matchedKeys.length===0&&typeof keySelector=="string"&&setTransformValue(data,keySelector,fromValueList(toAppend))}function opDelete(data,matchedKeys,args2,isHeader){if(args2==null){for(let key of matchedKeys)delete data[key];return}let patterns=typeof args2=="string"?[args2]:args2;for(let key of matchedKeys){let kept=toValueList(data[key],isHeader).filter(value=>!patterns.some(pattern=>matchesRule(value,pattern)));setTransformValue(data,key,fromValueList(kept))}}function toValueList(value,isHeader){if(value===void 0)return[];if(Array.isArray(value))return value;let str=String(value);return isHeader&&str.includes(",")?str.split(",").map(v=>v.trim()).filter(v=>v!==""):[str]}function fromValueList(values){if(values.length!==0)return values.length===1?values[0]:values}function setTransformValue(data,key,value){value===void 0?delete data[key]:data[key]=value}function isEmptyArgs(args2){return args2==null?!0:typeof args2=="string"?args2==="":args2.length===0}function resolveRouteParameters(str,match,keys){return str.replace(/\$([1-9a-zA-Z]+)/g,(_,param2)=>{let matchIndex=keys.indexOf(param2);return matchIndex===-1?matchIndex=parseInt(param2,10):matchIndex++,match[matchIndex]||""})}function getRoutesTypes(routes=[]){let handleMap=new Map,prevHandle=null;return routes.forEach(route=>{if((0,import_routing_utils.isHandler)(route))prevHandle=route.handle;else{let routes2=handleMap.get(prevHandle);routes2?routes2.push(route):handleMap.set(prevHandle,[route])}}),handleMap}async function devRouter(reqUrl="/",reqMethod,routes,devServer,vercelConfig,previousHeaders,missRoutes,phase){let result,{pathname:reqPathname,search:reqSearch}=url2.parse(reqUrl);reqPathname=reqPathname||"/";let reqQuery=parseQueryString(reqSearch),combinedHeaders={...previousHeaders},status,isContinue=!1,requestTransforms=[],responseTransforms;if(routes){let idx=-1;for(let routeConfig of routes){if(idx++,isContinue=!1,(0,import_routing_utils.isHandler)(routeConfig))continue;let{src,headers,methods}=routeConfig;if(Array.isArray(methods)&&reqMethod&&!methods.includes(reqMethod))continue;let keys=[],flags=devServer&&devServer.isCaseSensitive()?"":"i",matcher=(0,import_pcre_to_regexp.default)(`%${src}%${flags}`,keys),match=matcher.exec(reqPathname)||matcher.exec(reqPathname.substring(1));if(match){let routeTransforms=routeConfig.transforms?resolveTransforms(routeConfig.transforms,{match,keys,env:devServer?.envConfigs.runEnv}):[],isServiceMarker=typeof routeConfig.destination=="object"&&routeConfig.destination!==null&&routeConfig.destination.type==="service";!isServiceMarker&&routeTransforms.length>0&&requestTransforms.push(...routeTransforms);let destPath=reqPathname;if(routeConfig.dest&&(destPath=resolveRouteParameters(routeConfig.dest,match,keys)),headers)for(let originalKey of Object.keys(headers)){let lowerKey=originalKey.toLowerCase();if(!(previousHeaders&&Object.prototype.hasOwnProperty.call(previousHeaders,lowerKey)&&(phase==="hit"||phase==="miss"))){let originalValue=headers[originalKey],value=resolveRouteParameters(originalValue,match,keys);combinedHeaders[lowerKey]=value}}if(routeConfig.continue){routeConfig.status&&(status=routeConfig.status),routeTransforms.length>0&&(responseTransforms=routeTransforms),reqPathname=destPath,isContinue=!0;continue}let isDestUrl=isURL(destPath);if(routeConfig.check&&devServer&&vercelConfig&&phase!=="hit"&&!isDestUrl){let{pathname}=url2.parse(destPath);if(pathname=pathname||"/",!await devServer.hasFilesystem(pathname,vercelConfig)&&!(routeConfig.status&&phase!=="miss"))if(missRoutes&&missRoutes.length>0){routeTransforms.length>0&&(responseTransforms=routeTransforms);let missResult=await devRouter(destPath,reqMethod,missRoutes,devServer,vercelConfig,combinedHeaders,[],"miss");if(missResult.found)return requestTransforms.length>0&&(missResult.requestTransforms=[...requestTransforms,...missResult.requestTransforms??[]]),!missResult.responseTransforms&&responseTransforms&&(missResult.responseTransforms=responseTransforms),missResult;reqPathname=destPath;continue}else{routeConfig.status&&phase==="miss"&&(status=routeConfig.status),routeTransforms.length>0&&(responseTransforms=routeTransforms),reqPathname=destPath;continue}}let effectiveStatus=routeConfig.status||status,isRedirectExit=typeof effectiveStatus=="number"&&effectiveStatus>=300&&effectiveStatus<400;if(!isServiceMarker&&!isRedirectExit&&routeTransforms.length>0&&(responseTransforms=routeTransforms),isDestUrl){result={found:!0,dest:destPath,continue:isContinue,userDest:!1,isDestUrl,status:routeConfig.status||status,headers:combinedHeaders,query:reqQuery,matched_route:routeConfig,matched_route_idx:idx,phase,requestTransforms,responseTransforms};break}else{destPath.startsWith("/")||(destPath=`/${destPath}`);let{pathname:destPathname,search:destSearch}=url2.parse(destPath);destPathname=destPathname||"/";let destQuery=parseQueryString(destSearch);Object.assign(destQuery,reqQuery),result={found:!0,dest:destPathname,continue:isContinue,userDest:!!routeConfig.dest,isDestUrl,status:routeConfig.status||status,headers:combinedHeaders,query:destQuery,matched_route:routeConfig,matched_route_idx:idx,phase,requestTransforms,responseTransforms};break}}}}return result||(result={found:!1,dest:reqPathname,continue:isContinue,status,isDestUrl:!1,query:reqQuery,headers:combinedHeaders,phase,requestTransforms,responseTransforms}),result}var import_mime_types=__toESM(require_mime_types(),1);import path from"path";function getMimeType(fileName){let extension=path.extname(fileName);return(0,import_mime_types.contentType)(extension)||"application/octet-stream"}var import_ms2=__toESM(require_ms(),1),import_bytes=__toESM(require_bytes(),1),import_build_utils3=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist4(),1),import_pluralize=__toESM(require_pluralize(),1),import_minimatch=__toESM(require_minimatch(),1);import{readFileSync,unlinkSync}from"fs";import{delimiter,dirname,join}from"path";import{fork}from"child_process";import{createFunction}from"@vercel/fun";var import_tree_kill=__toESM(require_tree_kill(),1);function treeKill(pid,signal="SIGTERM"){return new Promise((resolve3,reject)=>{(0,import_tree_kill.default)(pid,signal,err=>{err?reject(err):resolve3()})})}var import_routing_utils2=__toESM(require_dist3(),1);async function getUnsupportedBuilderVersionError(version){let updateMessage;try{updateMessage=`Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`}catch(error2){updateMessage=error2 instanceof Error?error2.message:"Update the CLI with the package manager that installed it."}return dev.DEV_UNSUPPORTED_BUILDER_VERSION({titleName:getTitleName(),version,updateMessage})}async function deserializeOutput(obj){switch(obj.type){case"FileFsRef":return Object.assign(Object.create(import_build_utils3.FileFsRef.prototype),obj);case"FileBlob":{let fileBlob=Object.assign(Object.create(import_build_utils3.FileBlob.prototype),obj);return fileBlob.data=Buffer.from(obj.data.data),fileBlob}case"Lambda":{let lambda=Object.assign(Object.create(import_build_utils3.Lambda.prototype),obj);if(obj.zipBufferPath){lambda.zipBuffer=readFileSync(obj.zipBufferPath);try{unlinkSync(obj.zipBufferPath)}catch{}}else obj.zipBuffer&&(lambda.zipBuffer=Buffer.from(obj.zipBuffer.data));return lambda}}}async function deserializeBuildOutputs(serialized){let result={};for(let[name,obj]of Object.entries(serialized))result[name]=await deserializeOutput(obj);return result}async function createBuildProcess(match,envConfigs,workPath){output_manager_default.debug(`Creating build process for "${match.entrypoint}"`);let builderWorkerPath=join(__dirname,"builder-worker.cjs"),nodeExecPath=(0,import_build_utils3.getNodeExecPath)(),PATH=`${dirname(nodeExecPath)}${delimiter}${process.env.PATH}`,env={...process.env,PATH,...envConfigs.allEnv},buildProcess=fork(builderWorkerPath,[],{cwd:workPath,execArgv:[],execPath:isNativeBinaryInstall()?process.execPath:nodeExecPath,env});return match.buildProcess=buildProcess,buildProcess.on("close",(code,signal)=>{output_manager_default.debug(`Build process for "${match.entrypoint}" exited with ${signal||code}`),match.buildProcess=void 0}),new Promise((resolve3,reject)=>{buildProcess.once("message",data=>{data!==null&&typeof data=="object"&&data.type!=="ready"?reject(new Error('Did not get "ready" event from builder')):resolve3(buildProcess)})})}async function executeBuild(vercelConfig,devServer,files,match,requestPath,isInitialBuild,filesChanged,filesRemoved){let{builderWithPkg:{path:requirePath,builder,pkg}}=match,{entrypoint,use}=match,isStatic=(0,import_fs_detectors.isStaticRuntime)(use),{envConfigs,cwd:workPath,devCacheDir}=devServer,debug=output_manager_default.isDebugEnabled(),startTime=Date.now(),showBuildTimestamp=!isStatic&&(!isInitialBuild||debug);showBuildTimestamp&&(output_manager_default.log(`Building ${use}:${entrypoint}`),output_manager_default.debug(`Using \`${pkg.name}${pkg.version?`@${pkg.version}`:""}\``));let config=match.config||{},result,{buildProcess}=match;!isStatic&&!buildProcess&&(buildProcess=await createBuildProcess(match,envConfigs,workPath));let serviceRoutePrefix=config.routePrefix,serviceWorkspace=config.workspace,buildOptions={files,entrypoint,workPath,repoRootPath:workPath,config,meta:{isDev:!0,requestPath,devCacheDir,filesChanged,filesRemoved,env:{...envConfigs.runEnv},buildEnv:{...envConfigs.buildEnv}},...typeof serviceRoutePrefix=="string"||typeof serviceWorkspace=="string"?{service:{routePrefix:typeof serviceRoutePrefix=="string"?serviceRoutePrefix:void 0,workspace:typeof serviceWorkspace=="string"?serviceWorkspace:void 0}}:void 0},buildResultOrOutputs;buildProcess?(buildProcess.send({type:"build",requirePath,buildOptions}),buildResultOrOutputs=await new Promise((resolve3,reject)=>{function onMessage({type,result:result2,error:error2}){cleanup(),type==="buildResult"?result2?resolve3(result2):error2&&reject(Object.assign(new Error,error2)):reject(new Error(`Got unexpected message type: ${type}`))}function onExit(code,signal){cleanup();let err=new Error(`Builder exited with ${signal||code} before sending build result`);reject(err)}function cleanup(){buildProcess.removeListener("close",onExit),buildProcess.removeListener("message",onMessage)}buildProcess.on("close",onExit),buildProcess.on("message",onMessage)})):buildResultOrOutputs=await builder.build(buildOptions);let effectiveVersion=builder.version;if(effectiveVersion===-1)if("resultVersion"in buildResultOrOutputs){let vx=buildResultOrOutputs;effectiveVersion=vx.resultVersion,buildResultOrOutputs=vx.result}else effectiveVersion=buildResultOrOutputs.output?.type==="Lambda"?3:2;if(!effectiveVersion||effectiveVersion===1)result={output:buildResultOrOutputs,routes:[],watch:[]};else if(effectiveVersion===2)result=buildResultOrOutputs;else if(effectiveVersion===3){let{output,...rest}=buildResultOrOutputs;if(!output||output.type!=="Lambda")throw dev.DEV_BUILDER_RESULT_NOT_LAMBDA();if(output.maxDuration)throw dev.DEV_BUILDER_RESULT_HAS_MAXDURATION();if(output.affinity)throw new Error('The result of "builder.build()" must not contain `affinity`');if(output.maxConcurrency)throw new Error('The result of "builder.build()" must not contain `maxConcurrency`');if(output.memory)throw dev.DEV_BUILDER_RESULT_HAS_MEMORY();for(let[src,func]of Object.entries(config.functions||{}))if(src===entrypoint||(0,import_minimatch.default)(entrypoint,src)){func.maxDuration&&(output.maxDuration=func.maxDuration),func.affinity&&(output.affinity=func.affinity),func.maxConcurrency&&(output.maxConcurrency=func.maxConcurrency),func.memory&&(output.memory=func.memory);break}result={...rest,output:{[entrypoint]:output}}}else throw await getUnsupportedBuilderVersionError(builder.version);let normalized=(0,import_routing_utils2.normalizeRoutes)(result.routes);if(normalized.error)throw dev.DEV_INVALID_ROUTES({message:normalized.error.message});result.routes=normalized.routes||[];let{output:buildOutput}=result,{cleanUrls}=vercelConfig;for(let[originalPath,value]of Object.entries(buildOutput)){let path6=(0,import_build_utils3.normalizePath)(originalPath);cleanUrls&&path6.endsWith(".html")&&(path6=path6.slice(0,-5),(value.type==="FileBlob"||value.type==="FileFsRef")&&(value.contentType=value.contentType||"text/html; charset=utf-8"));let extensionless=devServer.getExtensionlessFile(path6);extensionless&&(path6=extensionless),buildOutput[path6]=value}let deserializedOutput=await deserializeBuildOutputs(buildOutput);for(let[name,output]of Object.entries(deserializedOutput))buildOutput[name]=output;result.watch=(result.watch||[]).map(w=>w.startsWith("./")?w.substring(2):w),result.watch.includes(entrypoint)||result.watch.push(entrypoint);let maxLambdaBytes=(0,import_bytes.default)("50mb");for(let asset of Object.values(result.output))if(asset.type==="Lambda"&&!(typeof asset.runtime=="string"&&asset.runtime.startsWith("python"))&&asset.runtime!=="container"){let size=asset.zipBuffer.length;if(size>maxLambdaBytes)throw new LambdaSizeExceededError(size,maxLambdaBytes)}if(await Promise.all(Object.entries(result.output).map(async entry=>{let path6=entry[0],asset=entry[1];if(asset.type==="Lambda"&&asset.runtime!=="container"){let oldAsset=match.buildOutput&&match.buildOutput[path6];oldAsset&&oldAsset.type==="Lambda"&&oldAsset.fn&&await oldAsset.fn.destroy();let ZipFile=asset.zipBuffer||await asset.createZip();asset.fn=await createFunction({Code:{ZipFile},Handler:asset.handler,Runtime:asset.runtime,MemorySize:asset.memory||3009,Environment:{Variables:{...vercelConfig.env,...asset.environment,...envConfigs.runEnv}}})}match.buildTimestamp=Date.now()})),match.buildResultVersion=effectiveVersion,match.buildResults.set(requestPath,result),Object.assign(match.buildOutput,result.output),showBuildTimestamp){let endTime=Date.now();output_manager_default.log(`Built ${use}:${entrypoint} [${(0,import_ms2.default)(endTime-startTime)}]`)}}async function getBuildMatches(vercelConfig,cwd,devServer,fileList){let matches=[];if(fileList.length===0)return matches;let noMatches=[],builds=vercelConfig.builds||[{src:"**",use:"@vercel/static"}],builderSpecs=new Set(builds.map(b=>b.use).filter(Boolean)),buildersWithPkgs=await importBuilders(builderSpecs,cwd);for(let buildConfig of builds){let{src="**",use,config={}}=buildConfig;if(!use)continue;src[0]==="/"&&(src=src.substring(1)),(0,import_build_utils3.isBackendFramework)(buildConfig.config?.framework)&&(src="package.json");let mapToEntrypoint=new Map;if(buildConfig.config?.framework&&(0,import_build_utils3.isPythonFramework)(buildConfig.config?.framework)){let originalSrc=src,existing=["pyproject.toml","requirements.txt","Pipfile"].filter(p=>fileList.includes(p));existing.length>0&&(src=existing[0],mapToEntrypoint.set(src,originalSrc))}if(buildConfig.config?.framework==="node"&&!fileList.includes(src)){let originalSrc=src,existing=fileList.find(path6=>/^(?:src\/)?server\.[cm]?[jt]s$/.test(path6));existing&&(src=existing,mapToEntrypoint.set(src,originalSrc))}if(buildConfig.config?.framework==="go"&&!fileList.includes(src)){let originalSrc=src,existing=["main.go","cmd/api/main.go","cmd/server/main.go"].filter(p=>fileList.includes(p));existing.length>0&&(src=existing[0],mapToEntrypoint.set(src,originalSrc))}if(buildConfig.config?.framework==="rust"&&src==="src/main.rs"&&!fileList.includes(src)){let originalSrc=src;fileList.includes("Cargo.toml")&&(src="Cargo.toml",mapToEntrypoint.set(src,originalSrc))}if(buildConfig.config?.framework==="container"&&!fileList.includes(src)){let originalSrc=src,existing=["Dockerfile.vercel","Containerfile.vercel","Dockerfile","Containerfile"].find(p=>fileList.includes(p));existing&&(src=existing,mapToEntrypoint.set(src,originalSrc))}let extensionless=devServer.getExtensionlessFile(src);extensionless&&(mapToEntrypoint.set(extensionless,src),src=extensionless);let files=fileList.filter(name=>name===src||(0,import_minimatch.default)(name,src,{dot:!0})).map(name=>join(cwd,name));files.length===0&&(config.zeroConfig&&use==="@vercel/static"||noMatches.push(buildConfig));for(let file of files){src=relative2(cwd,file);let entrypoint=mapToEntrypoint.get(src)||src;if(config.zeroConfig&&config.outputDirectory){let outputMatch=config.outputDirectory+"/";src.startsWith(outputMatch)&&(src=src.slice(outputMatch.length))}let builderWithPkg=buildersWithPkgs.get(use);if(!builderWithPkg)throw dev.DEV_BUILDER_LOAD_FAILED({use});matches.push({...buildConfig,src,entrypoint,builderWithPkg,buildOutput:{},buildResults:new Map,buildTimestamp:0})}}if(noMatches.length>0){output_manager_default.warn(`You defined ${(0,import_pluralize.default)("build",noMatches.length,!0)} that did not match any source files (please ensure they are NOT defined in ${highlight(".vercelignore")}):`);for(let buildConfig of noMatches)output_manager_default.print(`- ${JSON.stringify(buildConfig)}
|
|
36
36
|
`)}return matches}async function shutdownBuilder(match){let ops=[];if(match.buildProcess){let{pid}=match.buildProcess;output_manager_default.debug(`Killing builder sub-process with PID ${pid}`);let killPromise=treeKill(pid).then(()=>{output_manager_default.debug(`Killed builder with PID ${pid}`)}).catch(err=>{output_manager_default.debug(`Failed to kill builder with PID ${pid}: ${err}`)});ops.push(killPromise),delete match.buildProcess}if(match.buildOutput)for(let asset of Object.values(match.buildOutput))asset.type==="Lambda"&&asset.fn&&(output_manager_default.debug("Shutting down Lambda function"),ops.push(asset.fn.destroy()));await Promise.all(ops)}var import_build_utils4=__toESM(require_build_utils(),1),import_frameworks=__toESM(require_frameworks(),1);var BUILDPACK_DEV_UNSUPPORTED="BUILDPACK_DEV_UNSUPPORTED";function getBuildpackRuntime(builder){let buildpack=builder?.config?.buildpack;return typeof buildpack=="string"&&buildpack.length>0?buildpack:void 0}function runtimeDisplayName(runtime){return import_frameworks.frameworkList.find(f=>f.slug===runtime)?.name??runtime}function buildpackDevUnsupportedError(runtime){return new import_build_utils4.NowBuildError({code:BUILDPACK_DEV_UNSUPPORTED,message:`${getCommandName("dev")} doesn't support ${runtimeDisplayName(runtime)} projects yet.`})}function buildpackServicesDevUnsupportedError(services){let names=services.map(s=>`"${s.name}"`),list=names.length===1?names[0]:`${names.slice(0,-1).join(", ")} and ${names[names.length-1]}`,label=`${[...new Set(services.map(s=>runtimeDisplayName(s.runtime)))].join(" and ")} ${names.length===1?"service":"services"}`;return new import_build_utils4.NowBuildError({code:BUILDPACK_DEV_UNSUPPORTED,message:`${getCommandName("dev")} doesn't support the ${label} ${list} yet.`})}function assertNoBuildpackServices(services){let blocked=[];for(let service of services){let runtime=getBuildpackRuntime(service.builder);runtime&&blocked.push({name:service.name,runtime})}if(blocked.length>0)throw buildpackServicesDevUnsupportedError(blocked)}var httpStatusDescriptionMap=new Map([[400,"BAD_REQUEST"],[402,"PAYMENT_REQUIRED"],[403,"FORBIDDEN"],[404,"NOT_FOUND"],[405,"NOT_ALLOWED"],[410,"GONE"],[413,"PAYLOAD_TOO_LARGE"],[429,"RATE_LIMITED"],[500,"INTERNAL_SERVER_ERROR"],[501,"NOT_IMPLEMENTED"],[502,"BAD_GATEWAY"],[503,"SERVICE_UNAVAILABLE"],[504,"GATEWAY_TIMEOUT"],[508,"INFINITE_LOOP"]]),errorMessageMap=new Map([[400,"Bad request"],[402,"Payment required"],[403,"You don't have the required permissions"],[404,"The page could not be found"],[405,"Method not allowed"],[410,"The deployment has been removed"],[413,"Request Entity Too Large"],[429,"Rate limited"],[500,"A server error has occurred"],[501,"Not implemented"],[503,"The deployment is currently unavailable"],[504,"An error occurred with your deployment"],[508,"Infinite loop detected"]]),appError={title:"An error occurred with this application.",subtitle:"This is an error with the application itself, not the platform.",app_error:!0},pageNotFoundError={title:"The page could not be found.",subtitle:"The page could not be found in the application.",app_error:!0};function generateErrorMessage(statusCode,errorCode){return statusCode===404?pageNotFoundError:statusCode===502?appError:{title:errorMessageMap.get(statusCode)||"Error occurred",app_error:!1}}function generateHttpStatusDescription(statusCode){return httpStatusDescriptionMap.get(statusCode)||"UNKNOWN_ERROR"}function createErrorReporter(recordCode){return err=>{let diagnostic=toDiagnostic(err);for(let code of telemetryCodes(diagnostic))recordCode(code);return output_manager_default.prettyError(diagnostic),diagnostic}}var import_escape_html=__toESM(require_escape_html(),1);function error(it){let out="<main> ";return it.error_code=="EDGE_FUNCTION_INVOCATION_FAILED"&&(out+=' <p class="error-title error-title-guilty"> <strong>This Edge Function</strong><span> has crashed.</span> </p> '),out+=" ",it.error_code=="FUNCTION_INVOCATION_FAILED"&&(out+=' <p class="error-title error-title-guilty"> <strong>This Serverless Function</strong><span> has crashed.</span> </p> '),out+=' <p class="devinfo-container"> <span class="error-code"><strong>'+it.http_status_code+"</strong>: "+(0,import_escape_html.default)(it.http_status_description)+"</span> ",it.error_code&&(out+=' <span class="devinfo-line">Code: <code>'+(0,import_escape_html.default)(it.error_code)+"</code></span> "),out+=' <span class="devinfo-line">ID: <code>'+(0,import_escape_html.default)(it.request_id)+"</code> </p> <p> <ul> <li> Check the logs in your terminal window to see the application error. </li> </ul> </p></main>",out}var import_escape_html2=__toESM(require_escape_html(),1);function error_base(it){return'<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#000"> <title>'+it.http_status_code+": "+(0,import_escape_html2.default)(it.http_status_description)+`</title> <style> html { font-size: 62.5%; box-sizing: border-box; height: -webkit-fill-available } *, ::after, ::before { box-sizing: inherit } body { font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif; font-size: 1.6rem; line-height: 1.65; word-break: break-word; font-kerning: auto; font-variant: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; hyphens: auto; height: 100vh; height: -webkit-fill-available; max-height: 100vh; max-height: -webkit-fill-available; margin: 0 } ::selection { background: #79FFE1; } ::-moz-selection { background: #79FFE1; } a { cursor: pointer; color: #0070f3; text-decoration: none; transition: all .2s ease; border-bottom: 1px solid transparent } a:hover { border-bottom: 1px solid #0070f3 } ul { padding: 0; margin-left: 1.5em; list-style-type: none } li { margin-bottom: 10px } ul li:before { content: '\\02013' } li:before { display: inline-block; color: #ccc; position: absolute; margin-left: -18px; transition: color .2s ease } code { font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; font-size: .92em } code:after, code:before { content: '\`' } .container { display: flex; justify-content: center; flex-direction: column; min-height: 100% } main { max-width: 80rem; padding: 4rem 6rem; margin: auto } ul { margin-bottom: 32px } .error-title { font-size: 2rem; padding-left: 22px; line-height: 1.5; margin-bottom: 24px; } .error-title-guilty { border-left: 2px solid #ED367F; } .error-title-innocent { border-left: 2px solid #59B89C; } main p { color: #333 } .devinfo-container { border: 1px solid #ddd; border-radius: 4px; padding: 2rem; display: flex; flex-direction: column; margin-bottom: 32px } .error-code { margin: 0; font-size: 1.6rem; color: #000; margin-bottom: 1.6rem } .devinfo-line { color: #333 } .devinfo-line code, code, li { color: #000 } .devinfo-line:not(:last-child) { margin-bottom: 8px } .docs-link, .contact-link { font-weight: 500 } header, footer, footer a { display: flex; justify-content: center; align-items: center } header, footer { min-height: 100px; height: 100px; } header { border-bottom: 1px solid #eaeaea; } header h1 { font-size: 1.8rem; margin: 0; font-weight: 500; } header p { font-size: 1.3rem; margin: 0; font-weight: 500; } .header-item { display: flex; padding: 0 2rem; margin: 2rem 0; text-decoration: line-through; color: #999; } .header-item.active { color: #ff0080; text-decoration: none; } .header-item.first { border-right: 1px solid #eaeaea; } .header-item-content { display: flex; flex-direction: column; } .header-item-icon { margin-right: 1rem; margin-top: 0.6rem; } footer { border-top: 1px solid #eaeaea; } footer a { color: #000 } footer a:hover { border-bottom-color: transparent } footer svg { margin-left: .8rem } .note { padding: 8pt 16pt; border-radius: 5px; border: 1px solid #0070f3; font-size: 14px; line-height: 1.8; color: #0070f3; } @media (max-width:500px) { .devinfo-container .devinfo-line code { margin-top: .4rem } .devinfo-container .devinfo-line:not(:last-child) { margin-bottom: 1.6rem } .devinfo-container { margin-bottom: 0; } header { flex-direction: column; height: auto; min-height: auto; align-items: flex-start; } .header-item.first { border-right: none; margin-bottom: 0; } main { padding: 1rem 2rem; } body { font-size: 1.4rem; line-height: 1.55; } footer { display: none; } .note { margin-top: 16px; } } </style> </head> <body> <div class="container"> `+it.view+" </div> </body></html>"}var import_escape_html3=__toESM(require_escape_html(),1);function error_404(it){let out='<main> <p class="devinfo-container"> <span class="error-code"><strong>'+it.http_status_code+"</strong>: "+(0,import_escape_html3.default)(it.http_status_description)+"</span> ";return it.error_code&&(out+=' <span class="devinfo-line">Code: <code>'+(0,import_escape_html3.default)(it.error_code)+"</code></span> "),out+=' <span class="devinfo-line">ID: <code>'+(0,import_escape_html3.default)(it.request_id)+"</code> </p></main>",out}var import_escape_html4=__toESM(require_escape_html(),1);function error_502(it){let out='<main> <p class="devinfo-container"> <span class="error-code"><strong>'+it.http_status_code+"</strong>: "+(0,import_escape_html4.default)(it.http_status_description)+"</span> ";return it.error_code&&(out+=' <span class="devinfo-line">Code: <code>'+(0,import_escape_html4.default)(it.error_code)+"</code></span> "),out+=' <span class="devinfo-line">ID: <code>'+(0,import_escape_html4.default)(it.request_id)+"</code> </p> <p> <ul> <li> Check the logs in your terminal window to see the application error. </li> </ul> </p></main>",out}var import_escape_html5=__toESM(require_escape_html(),1);function redirect(it){return"<!doctype html><!-- https://now.sh --><h1>Redirecting ("+it.statusCode+")</h1><a>"+(0,import_escape_html5.default)(it.location)+"</a>"}var import_ms4=__toESM(require_ms(),1),import_get_port=__toESM(require_get_port(),1),import_chalk=__toESM(require_source(),1),import_frameworks2=__toESM(require_frameworks(),1);import path2 from"path";import{Transform,Writable}from"stream";function parseCronFields(expression){let parts=expression.trim().split(/\s+/);if(parts.length!==5)return null;let[minute,hour,dayOfMonth,month,dayOfWeek]=parts;return{minute,hour,dayOfMonth,month,dayOfWeek}}function expandCronField(field,min,max){let values=new Set;for(let part of field.split(",")){let stepMatch=part.match(/^(.+)\/(\d+)$/),range=stepMatch?stepMatch[1]:part,step=stepMatch?parseInt(stepMatch[2],10):1,start,end;if(range==="*")start=min,end=max;else if(range.includes("-")){let[lo,hi]=range.split("-").map(Number);start=lo,end=hi}else{let val=parseInt(range,10);start=val,end=val}for(let i=start;i<=end;i+=step)values.add(i)}return values}function nextOrWrap(sorted,current){for(let v of sorted)if(v>=current)return v;return null}function dayMatches(date,daysOfMonth,daysOfWeek,orDays){return orDays?daysOfMonth.has(date.getDate())||daysOfWeek.has(date.getDay()):daysOfMonth.has(date.getDate())&&daysOfWeek.has(date.getDay())}function getNextCronDelay(expression,now=new Date){let parsed=parseCronFields(expression);if(!parsed)return null;let minuteSet=expandCronField(parsed.minute,0,59),hourSet=expandCronField(parsed.hour,0,23),domSet=expandCronField(parsed.dayOfMonth,1,31),monthSet=expandCronField(parsed.month,1,12),dowSet=expandCronField(parsed.dayOfWeek,0,6),sortedMinutes=[...minuteSet].sort((a,b)=>a-b),sortedHours=[...hourSet].sort((a,b)=>a-b),sortedMonths=[...monthSet].sort((a,b)=>a-b),orDays=parsed.dayOfMonth!=="*"&&parsed.dayOfWeek!=="*",t=new Date(now);t.setSeconds(0,0),t.setMinutes(t.getMinutes()+1);let maxYear=t.getFullYear()+4;for(;t.getFullYear()<=maxYear;){let month=t.getMonth()+1,nextMonth=nextOrWrap(sortedMonths,month);if(nextMonth===null||nextMonth>month){let targetMonth=nextMonth??sortedMonths[0];nextMonth===null&&t.setFullYear(t.getFullYear()+1),t.setMonth(targetMonth-1,1),t.setHours(sortedHours[0],sortedMinutes[0]);continue}if(!dayMatches(t,domSet,dowSet,orDays)){t.setDate(t.getDate()+1),t.setHours(sortedHours[0],sortedMinutes[0]);continue}let hour=t.getHours(),nextHour=nextOrWrap(sortedHours,hour);if(nextHour===null||nextHour>hour){nextHour===null?(t.setDate(t.getDate()+1),t.setHours(sortedHours[0],sortedMinutes[0])):t.setHours(nextHour,sortedMinutes[0]);continue}let minute=t.getMinutes(),nextMinute=nextOrWrap(sortedMinutes,minute);if(nextMinute===null||nextMinute>minute){nextMinute===null?t.setHours(t.getHours()+1,sortedMinutes[0]):t.setMinutes(nextMinute);continue}return t.getTime()-now.getTime()}return null}var import_build_utils5=__toESM(require_build_utils(),1);var import_service_schedules=__toESM(require_service_schedules(),1);import{chmodSync,mkdirSync,readFileSync as readFileSync2,renameSync,rmSync,writeFileSync}from"node:fs";import{randomUUID}from"node:crypto";import{dirname as dirname2,isAbsolute,join as join2,normalize,sep}from"node:path";var manifest_default={nextDevWebSocketPreload:{source:"node-preloads/next-dev-websocket.cjs",destination:"node-preloads/next-dev-websocket.cjs"}};var runtimeAssets=manifest_default;function getRuntimeAssetsDir(version=pkg_default.version,globalRoot=getGlobalPathConfig()){return join2(globalRoot,"runtime-assets",version)}function materializeRuntimeAsset(id,options={}){let definition2=runtimeAssets[id];if(!definition2)throw new Error(`Unknown runtime asset: ${String(id)}`);let source=validateRelativePath(id,"source",definition2.source),destination=validateRelativePath(id,"destination",definition2.destination),data=readRuntimeAsset(source),destinationPath=join2(getRuntimeAssetsDir(options.version??pkg_default.version,options.globalRoot??getGlobalPathConfig()),destination),destinationDir=dirname2(destinationPath),temporaryPath=`${destinationPath}.${process.pid}.${randomUUID()}.tmp`;mkdirSync(destinationDir,{recursive:!0});try{writeFileSync(temporaryPath,new Uint8Array(data.buffer,data.byteOffset,data.byteLength)),definition2.executable&&chmodSync(temporaryPath,493);try{renameSync(temporaryPath,destinationPath)}catch(error2){let code=error2.code;if(code!=="EEXIST"&&code!=="EPERM")throw error2;rmSync(destinationPath,{force:!0}),renameSync(temporaryPath,destinationPath)}}finally{rmSync(temporaryPath,{force:!0})}return destinationPath}function readRuntimeAsset(source,moduleDir=__dirname){let candidates=[join2(moduleDir,"runtime-assets",source),join2(moduleDir,"..","runtime-assets",source),join2(moduleDir,"..","..","runtime-assets",source)],lastError;for(let candidate of candidates)try{return readFileSync2(candidate)}catch(error2){if(error2.code!=="ENOENT")throw error2;lastError=error2}throw lastError}function validateRelativePath(id,field,value){let normalized=normalize(value);if(!value||isAbsolute(value)||normalized===".."||normalized.startsWith(`..${sep}`))throw new Error(`Runtime asset "${id}" has an invalid ${field} path: ${JSON.stringify(value)}`);return normalized}function injectNextDevWebSocketShimIfNeeded(env,command,projectSettings,runtimeOptions){if(!shouldInjectNextDevWebSocketShim(command,projectSettings))return;let shimPath=materializeRuntimeAsset("nextDevWebSocketPreload",runtimeOptions);return env.NODE_OPTIONS=prependNodeRequireOption(env.NODE_OPTIONS,shimPath),shimPath}function shouldInjectNextDevWebSocketShim(command,projectSettings){return projectSettings?.framework==="nextjs"||/(?:^|\s)(?:next|next\.js)(?:\s+dev)?(?:\s+-|\s*$|$)/.test(command)}function prependNodeRequireOption(nodeOptions,requirePath){let requireOption=`--require ${JSON.stringify(requirePath)}`;return nodeOptions?`${requireOption} ${nodeOptions}`:requireOption}function replaceDevCommandPort(command,port){return command.replace(/\$PORT/g,`${port}`).replace(/%PORT%/g,`${port}`)}var import_ms3=__toESM(require_ms(),1);var DEV_RUNTIME_CACHE_PREFIX="/_svc/_cache/",DEV_RUNTIME_CACHE_API_PREFIX="/v1/suspense-cache/",DEV_RUNTIME_CACHE_ITEM_PREFIX=`${DEV_RUNTIME_CACHE_PREFIX}v1/suspense-cache/`,HEADER_CACHE_STATE="x-vercel-cache-state",HEADER_CACHE_TAGS="x-vercel-cache-tags",HEADER_REVALIDATE="x-vercel-revalidate",HEADER_CACHE_ITEM_NAME="x-vercel-cache-item-name",TICK_INTERVAL=(0,import_ms3.default)("1m");function getDevRuntimeCacheEnv(origin,itemPrefix=DEV_RUNTIME_CACHE_ITEM_PREFIX){return{RUNTIME_CACHE_ENDPOINT:`${origin}${itemPrefix}`,RUNTIME_CACHE_HEADERS:JSON.stringify({authorization:`Bearer ${DEV_RESOURCE_TOKEN}`})}}var RuntimeCacheStore=class{constructor(){this.entries=new Map;this.tagExpirations=new Map;this.sequence=0;this.tickTimer=setInterval(()=>this.tick(),TICK_INTERVAL),this.tickTimer.unref()}get(key){let entry=this.entries.get(key);return entry?this.isStale(entry)?(this.entries.delete(key),null):{value:entry.value,tags:entry.tags,ageSeconds:Math.floor((Date.now()-entry.lastModified)/1e3)}:null}set(key,value,options={}){let ttlSeconds=options.ttlSeconds;this.entries.set(key,{value,tags:options.tags??[],ttlMs:ttlSeconds&&ttlSeconds>0?ttlSeconds*1e3:null,lastModified:Date.now(),sequence:++this.sequence})}delete(key){this.entries.delete(key)}expireTags(tags){let sequence=++this.sequence;for(let tag of tags)this.tagExpirations.set(tag,sequence)}size(){return this.entries.size}stop(){clearInterval(this.tickTimer)}isStale(entry){if(entry.ttlMs!==null&&entry.lastModified+entry.ttlMs<=Date.now())return!0;for(let tag of entry.tags){let expiredAt=this.tagExpirations.get(tag);if(expiredAt!==void 0&&expiredAt>entry.sequence)return!0}return!1}tick(){for(let[key,entry]of this.entries)this.isStale(entry)&&this.entries.delete(key)}};var STARTUP_TIMEOUT=(0,import_ms4.default)("5m"),SERVICE_COLORS=[import_chalk.default.cyan,import_chalk.default.magenta,import_chalk.default.yellow,import_chalk.default.green,import_chalk.default.blue];function createServiceLogger(serviceName,colorIndex,maxNameLength){let color=SERVICE_COLORS[colorIndex%SERVICE_COLORS.length],padding=" ".repeat(maxNameLength-serviceName.length),prefix=color(`[${serviceName}]`)+padding,createTransform=streamLabel=>{let buffer="",labelPrefix=output_manager_default.debugEnabled?`${prefix} ${import_chalk.default.gray(`(${streamLabel})`)}`:prefix;return new Transform({transform(chunk,_encoding,callback){buffer+=chunk.toString();let lines=buffer.split(`
|
|
@@ -38,7 +38,7 @@ globstar while`,file,fr,pattern,pr,swallowee),this.matchOne(file.slice(fr),patte
|
|
|
38
38
|
`);callback(null,prefixed+`
|
|
39
39
|
`)}else callback(null,"")},flush(callback){buffer?callback(null,`${labelPrefix} ${buffer}
|
|
40
40
|
`):callback(null,"")}})},stdout=createTransform("stdout"),stderr=createTransform("stderr");return stdout.pipe(process.stdout),stderr.pipe(process.stderr),{stdout,stderr,cleanup:()=>{stdout.unpipe(process.stdout),stderr.unpipe(process.stderr),stdout.destroy(),stderr.destroy()}}}function getServiceRoutePrefixes(service){return(0,import_build_utils5.isQueueTriggeredService)(service)||(0,import_build_utils5.isWorkflowTriggeredService)(service)?[(0,import_build_utils5.getInternalServiceWorkerPathPrefix)(service.name)]:(0,import_build_utils5.isScheduleTriggeredService)(service)?[(0,import_build_utils5.getInternalServiceCronPathPrefix)(service.name)]:service.type==="web"?[service.routePrefix||"/"]:[]}function getEntrypointForService(builderSrc,entrypoint,dir){let resolved=builderSrc||entrypoint||"";if(dir&&dir!=="."){let prefix=dir.endsWith("/")?dir:`${dir}/`;resolved.startsWith(prefix)&&(resolved=resolved.slice(prefix.length))}return resolved}var FORCE_KILL_GRACE_MS=2e3,STOP_ALL_TIMEOUT_MS=8e3;function killGroup(pid,signal){try{return process.kill(-pid,signal),!0}catch(err){let code=err.code;if(code==="ESRCH"||code==="EPERM")return!1;throw err}}function isProcessAlive(pid){try{return process.kill(pid,0),!0}catch(err){return err.code==="EPERM"}}function waitForExit(pid,proc,timeoutMs){return proc&&(proc.exitCode!==null||proc.signalCode!==null)||!isProcessAlive(pid)?Promise.resolve(!0):new Promise(resolve3=>{let settled=!1,finish=died=>{settled||(settled=!0,clearInterval(poll),clearTimeout(deadline),proc&&proc.removeListener("exit",onExit),resolve3(died))},onExit=()=>finish(!0);proc&&proc.once("exit",onExit);let poll=setInterval(()=>{isProcessAlive(pid)||finish(!0)},100),deadline=setTimeout(()=>finish(!1),timeoutMs)})}var ServicesOrchestrator=class{constructor(options){this.managedServices=new Map;this.managedProcesses=new Map;this.servicePorts=new Map;this.installMeta={};this.cronTimers=[];this.stopping=!1;this.services=options.services,this.cwd=options.cwd,this.repoRoot=options.repoRoot,this.maxNameLength=Math.max(...options.services.map(s=>s.name.length)),this.proxyOrigin=options.proxyOrigin,this.resourceEndpoints=options.resourceEndpoints,this.envFilesValues=options.env,this.useImplicitEnvInjection=options.useImplicitEnvInjection,this.preferServiceBuilder=options.preferServiceBuilder??!1,this.onQueueSubscriptions=options.onQueueSubscriptions;let pythonWorkspaces=options.services.filter(service=>service.runtime==="python").map(service=>path2.resolve(this.cwd,(0,import_build_utils5.isExperimentalServiceV2)(service)?service.root||".":service.workspace||"."));this.pythonServiceCount=new Set(pythonWorkspaces).size,this.hasQueueServices=options.services.filter(import_build_utils5.isExperimentalService).some(import_build_utils5.isQueueBackedService)}forceKillAllSync(){let killOne=pid=>{if(pid)try{killGroup(pid,"SIGKILL")}catch{}};for(let[,proc]of this.managedProcesses)killOne(proc.pid);for(let[,service]of this.managedServices)killOne(service.pid)}registerExitBackstop(){if(this.exitBackstop)return;let backstop=()=>this.forceKillAllSync();this.exitBackstop=backstop,process.on("exit",backstop)}unregisterExitBackstop(){this.exitBackstop&&(process.removeListener("exit",this.exitBackstop),this.exitBackstop=void 0)}async startAll(){output_manager_default.debug(`Starting ${this.services.length} services`),this.registerExitBackstop(),await this.allocateServicePorts();let startPromises=this.services.map((service,index)=>this.startService(service,index).then(result=>(this.managedServices.set(result.name,result),result))),failures=(await Promise.allSettled(startPromises)).filter(r=>r.status==="rejected");if(failures.length>0)throw await this.stopAll(),new ServiceStartError(failures.map(f=>f.reason));output_manager_default.debug(`All ${this.managedServices.size} services started successfully`),this.startCronSchedulers()}async stopAll(){if(this.stopping)return;this.stopping=!0;let totalCount=this.managedServices.size+this.managedProcesses.size;output_manager_default.debug(`Stopping ${totalCount} services/processes`);let stopPromises=[];for(let[name,service]of this.managedServices){output_manager_default.debug(`Stopping service "${name}" (PID: ${service.pid})`);let stopService=async()=>{service.shutdown&&await service.shutdown().catch(err=>{output_manager_default.debug(`Failed to shutdown service "${name}": ${err}`)}),service.pid&&await this.terminateProcessGroup(name,service.pid,service.process).catch(err=>{output_manager_default.debug(`Failed to kill service "${name}": ${err}`)})};stopPromises.push(stopService()),service.logger.cleanup()}for(let[name,proc]of this.managedProcesses)proc.pid&&!this.managedServices.has(name)&&(output_manager_default.debug(`Stopping process "${name}" (PID: ${proc.pid})`),stopPromises.push(this.terminateProcessGroup(name,proc.pid,proc).catch(err=>{output_manager_default.debug(`Failed to stop process "${name}": ${err}`)})));for(let timer of this.cronTimers)clearTimeout(timer);this.cronTimers=[];let timedOut=!1,timeoutHandle,timeout=new Promise(resolve3=>{timeoutHandle=setTimeout(()=>{timedOut=!0,output_manager_default.debug(`stopAll timed out after ${STOP_ALL_TIMEOUT_MS}ms; remaining processes will be SIGKILLed on exit`),resolve3()},STOP_ALL_TIMEOUT_MS)});try{await Promise.race([Promise.all(stopPromises),timeout])}finally{timeoutHandle&&clearTimeout(timeoutHandle)}timedOut||(this.managedServices.clear(),this.managedProcesses.clear(),this.unregisterExitBackstop(),output_manager_default.debug("All services stopped"))}async terminateProcessGroup(name,pid,proc){try{killGroup(pid,"SIGTERM")}catch(err){output_manager_default.debug(`SIGTERM group kill for "${name}" failed: ${err}`)}if(await treeKill(pid,"SIGTERM").catch(err=>{output_manager_default.debug(`tree-kill (SIGTERM) for "${name}" failed: ${err}`)}),!await waitForExit(pid,proc,FORCE_KILL_GRACE_MS)){output_manager_default.debug(`Escalating to SIGKILL for "${name}" (PID: ${pid})`);try{killGroup(pid,"SIGKILL")}catch(err){output_manager_default.debug(`SIGKILL group kill for "${name}" failed: ${err}`)}await treeKill(pid,"SIGKILL").catch(()=>{})}}getServiceForRoute(pathname){let bestMatch=null,bestMatchLength=-1;for(let service of this.managedServices.values())for(let routePrefix of service.routePrefixes){if(routePrefix==="/"){bestMatchLength===-1&&(bestMatch=service,bestMatchLength=0);continue}let normalizedPrefix=routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`;(pathname===normalizedPrefix||pathname.startsWith(`${normalizedPrefix}/`))&&normalizedPrefix.length>bestMatchLength&&(bestMatch=service,bestMatchLength=normalizedPrefix.length)}return bestMatch}getServiceOrigin(serviceName){let service=this.managedServices.get(serviceName);return service?`http://${service.host}:${service.port}`:null}hasServices(){return this.managedServices.size>0}getServices(){return this.managedServices}async allocateServicePorts(){let used=new Set;for(let service of this.services){let port=await(0,import_get_port.default)();for(;used.has(port);)port=await(0,import_get_port.default)();used.add(port),this.servicePorts.set(service.name,port)}}async startService(service,colorIndex){let logger=createServiceLogger(service.name,colorIndex,this.maxNameLength),spec=(0,import_build_utils5.isExperimentalServiceV2)(service)?this.getV2StartSpec(service):this.getV1StartSpec(service),port=this.servicePorts.get(service.name);port!==void 0&&(spec.env.VERCEL_DEV_PORT=String(port));let buildpackRuntime=getBuildpackRuntime(service.builder);if(buildpackRuntime)throw buildpackServicesDevUnsupportedError([{name:service.name,runtime:buildpackRuntime}]);if(spec.builderSpec){let result=await this.tryStartWithBuilder(service.name,spec,logger,port);if(result)return result}let devCommand2=spec.explicitDevCommand||spec.framework?.settings?.devCommand?.value;if(!devCommand2)throw dev.DEV_SERVICE_NO_DEV_SERVER({name:service.name,framework:service.framework??"none"});return this.spawnDevCommandProcess({name:service.name,devCommand:devCommand2,framework:spec.framework,workspacePath:spec.rootPath,env:spec.env,logger,builderConfig:spec.builderConfig,routePrefixes:spec.routePrefixes,workspaceLabel:spec.rootLabel,port})}applyRuntimeCacheEnv(env){env.RUNTIME_CACHE_ENDPOINT||Object.assign(env,getDevRuntimeCacheEnv(this.resourceEndpoints.runtimeCache.direct,""))}applyContainerResourceProxyEnv(env){let endpoints=this.resourceEndpoints;Object.assign(env,getDevSchedulesEnv(endpoints.schedules?.proxy,!0)),env.VERCEL_QUEUE_BASE_URL===endpoints.queues.direct&&Object.assign(env,getDevQueueEnv(endpoints.queues.proxy,env.VERCEL_HAS_WORKER_SERVICES!==void 0)),env.RUNTIME_CACHE_ENDPOINT===endpoints.runtimeCache.direct&&Object.assign(env,getDevRuntimeCacheEnv(endpoints.runtimeCache.proxy,""))}getV1StartSpec(service){let framework=import_frameworks2.frameworkList.find(f=>f.slug===service.framework),effectiveProcessEnv=(0,import_build_utils5.cloneEnv)(this.envFilesValues,process.env),perServiceEnv={};this.useImplicitEnvInjection?perServiceEnv=(0,import_build_utils5.getExperimentalServiceUrlEnvVars)({services:this.services,frameworkList:framework?[framework]:[],origin:this.proxyOrigin,currentEnv:effectiveProcessEnv}):service.env&&(perServiceEnv=(0,import_build_utils5.getServiceUrlEnvVars)({requestedEnv:service.env,consumerService:service,services:this.services,frameworkList:import_frameworks2.frameworkList,origin:this.proxyOrigin,currentEnv:effectiveProcessEnv}));let env=(0,import_build_utils5.cloneEnv)({FORCE_COLOR:process.stdout.isTTY?"1":"0",BROWSER:"none"},perServiceEnv,effectiveProcessEnv);env.VERCEL_SERVICE_TYPE=service.type,service.trigger&&(env.VERCEL_SERVICE_TRIGGER=service.trigger),this.hasQueueServices&&service.runtime==="python"&&env.VERCEL_HAS_WORKER_SERVICES===void 0&&(env.VERCEL_HAS_WORKER_SERVICES="1"),Object.assign(env,getDevQueueEnv(this.resourceEndpoints.queues.direct,this.hasQueueServices)),this.applyRuntimeCacheEnv(env),Object.assign(env,getDevSchedulesEnv(this.resourceEndpoints.schedules?.direct)),service.routePrefix&&service.routePrefix!=="/"&&(env.VERCEL_SERVICE_ROUTE_PREFIX=service.routePrefix,env.VERCEL_SERVICE_ROUTE_PREFIX_STRIP="1");let workspace=service.workspace||".";return{rootPath:path2.join(this.cwd,workspace),rootLabel:workspace,framework,builderSpec:this.preferServiceBuilder?service.builder?.use||framework?.useRuntime?.use:framework?.useRuntime?.use||service.builder?.use,entrypoint:getEntrypointForService(service.builder?.src,service.entrypoint,workspace),builderConfig:service.builder?.config,frameworkForDev:service.framework||"services",servicePayload:{name:service.name,type:service.type,trigger:service.trigger,routePrefix:service.routePrefix,subdomain:service.subdomain,workspace:service.workspace,schedule:service.schedule},routePrefixes:getServiceRoutePrefixes(service),env}}getV2StartSpec(service){let framework=import_frameworks2.frameworkList.find(f=>f.slug===service.framework),effectiveProcessEnv=(0,import_build_utils5.cloneEnv)(this.envFilesValues,process.env),perServiceEnv={};for(let binding of service.bindings??[]){if(binding.type!==void 0&&binding.type!=="service"||binding.format!=="url"||binding.env in effectiveProcessEnv)continue;let targetPort=this.servicePorts.get(binding.service);targetPort!==void 0&&(perServiceEnv[binding.env]=`http://127.0.0.1:${targetPort}`)}let env=(0,import_build_utils5.cloneEnv)({FORCE_COLOR:process.stdout.isTTY?"1":"0",BROWSER:"none"},effectiveProcessEnv,perServiceEnv);this.hasQueueServices&&service.runtime==="python"&&env.VERCEL_HAS_WORKER_SERVICES===void 0&&(env.VERCEL_HAS_WORKER_SERVICES="1"),Object.assign(env,getDevQueueEnv(this.resourceEndpoints.queues.direct,this.hasQueueServices)),this.applyRuntimeCacheEnv(env),Object.assign(env,getDevSchedulesEnv(this.resourceEndpoints.schedules?.direct));let root=service.root||".";return{rootPath:path2.join(this.cwd,root),rootLabel:root,framework,builderSpec:framework?.useRuntime?.use||service.builder?.use,entrypoint:getEntrypointForService(service.builder?.src,service.entrypoint,root),builderConfig:service.builder?.config,frameworkForDev:service.framework||"services",servicePayload:{name:service.name,workspace:root},routePrefixes:[],env,explicitDevCommand:service.devCommand}}async tryStartWithBuilder(name,spec,logger,port){if(!spec.builderSpec)return null;try{let builderWithPkg=(await importBuilders(new Set([spec.builderSpec]),this.cwd)).get(spec.builderSpec),builder=builderWithPkg?.builder;if(!builder?.startDevServer)return null;builderWithPkg?.pkg.name==="@vercel/container"&&this.applyContainerResourceProxyEnv(spec.env),output_manager_default.debug(`Starting ${import_chalk.default.bold(name)} using ${import_chalk.default.cyan.bold(spec.builderSpec)}`),injectNextDevWebSocketShimIfNeeded(spec.env,spec.framework?.settings.devCommand?.value||"",{framework:spec.framework?.slug});let result=await builder.startDevServer({entrypoint:spec.entrypoint,workPath:spec.rootPath,repoRootPath:this.repoRoot,config:{...spec.builderConfig||{},framework:spec.frameworkForDev},meta:{isDev:!0,env:spec.env,port,serviceCount:this.services.length,pythonServiceCount:this.pythonServiceCount,syncDependencies:!0,serviceName:name,devResourceEndpoints:this.resourceEndpoints},service:spec.servicePayload,files:{},onStdout:data=>logger.stdout.write(data),onStderr:data=>logger.stderr.write(data)});if(!result)return null;let host=await checkForPort(result.port,STARTUP_TIMEOUT);return output_manager_default.debug(`Service ${name} started on ${host}:${result.port}`),result.queueSubscriptions?.length&&this.onQueueSubscriptions?.(name,result.queueSubscriptions),{name,host,port:result.port,pid:result.pid,shutdown:result.shutdown,routePrefixes:spec.routePrefixes,workspace:spec.rootLabel,logger,crons:result.crons,queueSubscriptions:result.queueSubscriptions}}catch(err){if(output_manager_default.debug(`Failed to use startDevServer for ${name}: ${err}`),err instanceof import_build_utils5.NowBuildError)throw err;return null}}async spawnDevCommandProcess(params){let{name,devCommand:devCommand2,framework,workspacePath,env,logger,builderConfig,routePrefixes,workspaceLabel}=params;await this.syncDependencies(builderConfig,workspacePath,logger);let port=params.port??await(0,import_get_port.default)();env.PORT=`${port}`,env.VERCEL_CLI_VERSION=pkg_default.version;let command=replaceDevCommandPort(devCommand2,port),nodeBinPath=(0,import_build_utils5.getNodeBinPaths)({base:this.repoRoot,start:workspacePath}).join(path2.delimiter);env.PATH=`${nodeBinPath}${path2.delimiter}${env.PATH}`,output_manager_default.debug(`Starting ${import_chalk.default.bold(name)} with ${import_chalk.default.cyan.bold(`"${command}"`)}`),process.stdout.columns&&(env.COLUMNS=`${process.stdout.columns}`),injectNextDevWebSocketShimIfNeeded(env,command,{framework:framework?.slug});let child=(0,import_build_utils5.spawnCommand)(command,{cwd:workspacePath,env,stdio:["ignore","pipe","pipe"],detached:!0});if(child.pid){if(!child.stdout||!child.stderr)throw dev.DEV_SERVICE_NO_STDIO({name})}else throw dev.DEV_SERVICE_NO_PID({name});this.managedProcesses.set(name,child),child.stdout?.on("data",chunk=>{logger.stdout.write(chunk)}),child.stderr?.on("data",chunk=>{logger.stderr.write(chunk)});let host;try{host=await this.waitForPort(child,name,port)}catch(error2){throw this.managedProcesses.delete(name),error2}return output_manager_default.debug(`Service ${name} listening on ${host}:${port}`),{name,host,port,pid:child.pid,process:child,routePrefixes,workspace:workspaceLabel,logger}}async waitForPort(child,serviceName,port){let processError=new Promise((_,reject)=>{child.on("error",reject),child.on("exit",code=>{reject(new Error(`Service "${serviceName}" exited with code ${code} before port was available`))})});return Promise.race([checkForPort(port,STARTUP_TIMEOUT),processError])}async syncDependencies(config,workspacePath,logger){logger.stdout.write(`${import_chalk.default.gray("Synchronizing dependencies...")}
|
|
41
|
-
`);let installCommand=typeof config?.installCommand=="string"?config.installCommand.trim():"";installCommand?await this.runInstallCommand(installCommand,workspacePath,logger):await this.maybeInstallJSDependencies(workspacePath,logger)}async runBuffered(logger,task){let captured=[],bufStdout=new Writable({write(chunk,_enc,cb){let b=Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk);captured.push(["stdout",b]),output_manager_default.debugEnabled&&logger.stdout.write(b),cb()}}),bufStderr=new Writable({write(chunk,_enc,cb){let b=Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk);captured.push(["stderr",b]),output_manager_default.debugEnabled&&logger.stderr.write(b),cb()}});try{await task(bufStdout,bufStderr)}catch(err){for(let[channel,chunk]of captured)logger[channel].write(chunk);throw err}}async runInstallCommand(command,workspacePath,logger){await this.runBuffered(logger,(stdout,stderr)=>new Promise((resolve3,reject)=>{output_manager_default.debug(`Running install command: "${command}" in ${workspacePath}`);let child=(0,import_build_utils5.spawnCommand)(command,{cwd:workspacePath,stdio:["inherit","pipe","pipe"]});child.stdout?.on("data",chunk=>stdout.write(chunk)),child.stderr?.on("data",chunk=>stderr.write(chunk)),child.on("error",reject),child.on("exit",(code,signal)=>{code===0?resolve3():reject(new import_build_utils5.NowBuildError({code:"INSTALL_COMMAND_FAILED",message:`Install command "${command}" failed with code ${code}, signal ${signal}`}))})}))}async maybeInstallJSDependencies(workspacePath,logger){await this.runBuffered(logger,async(stdout,stderr)=>{try{await(0,import_build_utils5.runNpmInstall)(workspacePath,[],void 0,this.installMeta,void 0,{stdout,stderr})}catch(err){throw new import_build_utils5.NowBuildError({code:"NODE_DEPENDENCY_SYNC_FAILED",message:`Failed to install Node.JS dependencies: ${err instanceof Error?err.message:String(err)}`})}})}startCronSchedulers(){for(let[name,managed]of this.managedServices){let service=this.services.find(candidate=>candidate.name===name),crons=managed.crons&&managed.crons.length>0?managed.crons:service&&(0,import_build_utils5.isExperimentalService)(service)&&(0,import_build_utils5.isScheduleTriggeredService)(service)&&service.schedule?(0,import_service_schedules.getStaticServiceSchedules)(service.schedule).map(schedule=>({path:(0,import_build_utils5.getInternalServiceCronPath)(name,service.entrypoint||service.builder.src||"index",service.handlerFunction||"cron"),schedule})):[];if(crons.length!==0)for(let cron of crons)output_manager_default.debug(`Scheduling job service ${import_chalk.default.bold(name)} (${import_chalk.default.cyan(cron.schedule)})`),this.scheduleCronTrigger(name,cron.path,cron.schedule,managed)}}scheduleCronTrigger(serviceName,cronPath,schedule,managed){let delayMs=getNextCronDelay(schedule);if(delayMs===null){output_manager_default.warn(`Could not parse cron schedule "${schedule}" for service "${serviceName}", skipping auto-trigger`);return}let timer=setTimeout(async()=>{if(!this.stopping){output_manager_default.debug(`Triggering scheduled job ${import_chalk.default.bold(serviceName)} (schedule: ${import_chalk.default.cyan(schedule)})`);try{let url4=`http://${managed.host}:${managed.port}${cronPath}`,res=await fetch(url4,{method:"POST"});output_manager_default.debug(`Cron trigger for "${serviceName}" responded with status ${res.status}`)}catch(err){output_manager_default.error(`Cron trigger for "${serviceName}" failed: ${err instanceof Error?err.message:String(err)}`)}this.scheduleCronTrigger(serviceName,cronPath,schedule,managed)}},delayMs);this.cronTimers.push(timer)}};var import_ms5=__toESM(require_ms(),1);import{randomBytes}from"crypto";var import_build_utils6=__toESM(require_build_utils(),1);var DEFAULT_RETRY_AFTER=(0,import_ms5.default)("1m"),DEFAULT_MAX_DELIVERIES=32,DEFAULT_INITIAL_DELAY=0,DEFAULT_VISIBILITY_TIMEOUT=(0,import_ms5.default)("1m"),DEFAULT_RETENTION=(0,import_ms5.default)("1h"),TICK_INTERVAL2=(0,import_ms5.default)("1s");function topicPatternToRegex(pattern){let parts=pattern.split("*").map(s=>s.replace(/-/g,"\\-"));return new RegExp(`^${parts.join("[A-Za-z0-9_\\-]*")}$`)}var QueueBroker=class{constructor(services,getServiceOrigin){this.getServiceOrigin=getServiceOrigin;this.messages=new Map;this.idempotencyRecords=new Map;this.duplicateMessages=new Map;this.consumerGroups=[];this.deliveryState=new Map;this.registerServices(services),this.tickTimer=setInterval(()=>this.tick(),TICK_INTERVAL2),this.tickTimer.unref()}registerServices(services){let ids=new Set;for(let service of services.filter(import_build_utils6.isQueueBackedService))for(let{topic}of(0,import_build_utils6.getServiceQueueTopicConfigs)(service)){let consumerGroup=service.consumer??service.name,id=`${consumerGroup}::${topic}`,existing=this.consumerGroups.find(group=>group.id===id);if(ids.has(id)||existing?.serviceOriginFn||existing?.resolveFunction)throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup,topic});ids.add(id)}for(let service of services){if(!(0,import_build_utils6.isQueueBackedService)(service))continue;let topicConfigs=(0,import_build_utils6.getServiceQueueTopicConfigs)(service),consumerGroup=service.consumer??service.name;for(let topicConfig of topicConfigs){let topicPattern=topicConfig.topic,id=`${consumerGroup}::${topicPattern}`,existingGroup=this.consumerGroups.find(group2=>group2.id===id);if(existingGroup&&!existingGroup.serviceOriginFn&&!existingGroup.resolveFunction){existingGroup.serviceName=service.name,existingGroup.serviceOriginFn=()=>this.getServiceOrigin(service.name),existingGroup.retryAfterMs=topicConfig.retryAfterSeconds!==void 0?topicConfig.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,existingGroup.initialDelayMs=topicConfig.initialDelaySeconds!==void 0?topicConfig.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY,this.activatePushGroup(existingGroup);continue}if(existingGroup)throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup,topic:topicPattern});let group={id,name:consumerGroup,serviceName:service.name,topicPattern,topicRegex:topicPatternToRegex(topicPattern),serviceOriginFn:()=>this.getServiceOrigin(service.name),retryAfterMs:topicConfig.retryAfterSeconds!==void 0?topicConfig.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,maxDeliveries:DEFAULT_MAX_DELIVERIES,initialDelayMs:topicConfig.initialDelaySeconds!==void 0?topicConfig.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY};this.consumerGroups.push(group),this.deliveryState.set(group.id,this.createRetainedDeliveries(group)),this.activatePushGroup(group)}}}updateServiceSubscriptions(serviceName,subscriptions){if(subscriptions.length===0)return;let kept=[];for(let group of this.consumerGroups)group.serviceName===serviceName?this.deliveryState.delete(group.id):kept.push(group);this.consumerGroups=kept;for(let subscription of subscriptions){let id=`${subscription.consumer}::${subscription.topic}`,existingGroup=this.consumerGroups.find(group2=>group2.id===id);if(existingGroup&&!existingGroup.serviceOriginFn&&!existingGroup.resolveFunction){existingGroup.serviceName=serviceName,existingGroup.serviceOriginFn=()=>this.getServiceOrigin(serviceName),existingGroup.retryAfterMs=subscription.retryAfterSeconds!==void 0?subscription.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,existingGroup.maxDeliveries=subscription.maxDeliveries??DEFAULT_MAX_DELIVERIES,existingGroup.initialDelayMs=subscription.initialDelaySeconds!==void 0?subscription.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY,this.activatePushGroup(existingGroup);continue}if(existingGroup){output_manager_default.debug(`Queue consumer "${subscription.consumer}" is already registered for topic "${subscription.topic}"; keeping the first registration`);continue}let group={id,name:subscription.consumer,serviceName,topicPattern:subscription.topic,topicRegex:topicPatternToRegex(subscription.topic),serviceOriginFn:()=>this.getServiceOrigin(serviceName),retryAfterMs:subscription.retryAfterSeconds!==void 0?subscription.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,maxDeliveries:subscription.maxDeliveries??DEFAULT_MAX_DELIVERIES,initialDelayMs:subscription.initialDelaySeconds!==void 0?subscription.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY};this.consumerGroups.push(group),this.deliveryState.set(group.id,this.createRetainedDeliveries(group)),this.activatePushGroup(group)}output_manager_default.debug(`Queue consumer groups for service "${serviceName}" updated from ${subscriptions.length} introspected subscription(s)`)}validateFunctionSubscriptions(subscriptions){let ids=new Set;for(let subscription of subscriptions){let id=`${subscription.consumer}::${subscription.topic}`,existing=this.consumerGroups.find(group=>group.id===id);if(ids.has(id)||existing?.serviceOriginFn&&!existing.configOwned)throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup:subscription.consumer,topic:subscription.topic});ids.add(id)}}setFunctionSubscriptions(subscriptions,resolve3){this.validateFunctionSubscriptions(subscriptions);let ids=new Set(subscriptions.map(subscription=>`${subscription.consumer}::${subscription.topic}`));for(let group of this.consumerGroups)group.configOwned&&!ids.has(group.id)&&(delete group.configOwned,delete group.resolveFunction);for(let subscription of subscriptions){let id=`${subscription.consumer}::${subscription.topic}`,group=this.consumerGroups.find(group2=>group2.id===id);group||(group={id,name:subscription.consumer,topicPattern:subscription.topic,topicRegex:topicPatternToRegex(subscription.topic),retryAfterMs:DEFAULT_RETRY_AFTER,maxDeliveries:DEFAULT_MAX_DELIVERIES,initialDelayMs:DEFAULT_INITIAL_DELAY},this.consumerGroups.push(group),this.deliveryState.set(id,this.createRetainedDeliveries(group))),group.configOwned=!0,group.resolveFunction=()=>resolve3(subscription.outputPath),group.retryAfterMs=subscription.retryAfterSeconds===void 0?DEFAULT_RETRY_AFTER:subscription.retryAfterSeconds*1e3,group.maxDeliveries=subscription.maxDeliveries??DEFAULT_MAX_DELIVERIES,group.initialDelayMs=(subscription.initialDelaySeconds??0)*1e3,this.activatePushGroup(group)}}enqueue(queueName,payload,contentType2,options){let now=Date.now(),messageId=randomBytes(16).toString("hex"),retentionMs=(options?.retentionSeconds??0)>0?options.retentionSeconds*1e3:DEFAULT_RETENTION,idempotencyRecordKey=options?.idempotencyKey?`${queueName}:${options.idempotencyKey}`:void 0;if(idempotencyRecordKey){let record=this.idempotencyRecords.get(idempotencyRecordKey);if(record&&record.expiresAt>Date.now())return this.duplicateMessages.set(messageId,{queueName,originalMessageId:record.messageId,expiresAt:Date.now()+retentionMs}),output_manager_default.debug(`queues: skipped duplicate message for queue "${queueName}"`),{messageId};record&&this.idempotencyRecords.delete(idempotencyRecordKey)}idempotencyRecordKey&&this.idempotencyRecords.set(idempotencyRecordKey,{messageId,expiresAt:Date.now()+retentionMs});let message2={messageId,payload,contentType:contentType2,queueName,createdAt:new Date(now).toISOString(),retentionMs,visibleAt:(options?.delaySeconds??0)>0?now+options.delaySeconds*1e3:0};this.messages.set(messageId,message2),output_manager_default.debug(`queues: stored message ${messageId} for queue "${queueName}"`);let matchingGroups=this.consumerGroups.filter(g=>g.topicRegex.test(queueName));matchingGroups.length===0&&output_manager_default.debug(`queues: no consumer group matches topic "${queueName}", message stored but not dispatched`);for(let group of matchingGroups){let groupDeliveries=this.deliveryState.get(group.id),initialVisibleAt=group.initialDelayMs>0?now+group.initialDelayMs:0,visibleAt=Math.max(message2.visibleAt,initialVisibleAt);groupDeliveries.set(messageId,{status:"pending",deliveryCount:0,receiptHandle:"",visibleAt,leaseExpiresAt:0}),visibleAt<=now&&(group.serviceOriginFn||group.resolveFunction)&&this.dispatchToConsumer(message2,group).catch(err=>{output_manager_default.debug(`queues: unexpected dispatch error: ${err}`)})}return{messageId}}getOriginalMessageIdForDuplicate(queueName,messageId){let duplicate=this.duplicateMessages.get(messageId);return!duplicate||duplicate.queueName!==queueName?null:duplicate.expiresAt<=Date.now()?(this.duplicateMessages.delete(messageId),null):duplicate.originalMessageId}receiveById(queueName,messageId,consumerGroup){let message2=this.messages.get(messageId);if(!message2||message2.queueName!==queueName||this.isMessageExpired(message2))return null;let group=this.getOrCreatePullGroup(queueName,consumerGroup),state=this.deliveryState.get(group.id)?.get(messageId);if(!state)return null;if(state.status==="pending"){if(state.visibleAt>Date.now())return null;state.status="in-flight",state.receiptHandle=randomBytes(16).toString("hex"),state.deliveryCount++,state.leaseExpiresAt=Date.now()+DEFAULT_VISIBILITY_TIMEOUT}return{messageId:message2.messageId,payload:message2.payload,contentType:message2.contentType,deliveryCount:state.deliveryCount,createdAt:message2.createdAt,receiptHandle:state.receiptHandle}}receiveMessages(queueName,consumerGroup,options){let group=this.getOrCreatePullGroup(queueName,consumerGroup),groupDeliveries=this.deliveryState.get(group.id);if(!groupDeliveries)return[];let now=Date.now(),limit=Math.min(Math.max(options?.limit??1,1),10),visibilityTimeoutMs=(options?.visibilityTimeoutSeconds??DEFAULT_VISIBILITY_TIMEOUT/1e3)*1e3,results=[];for(let[messageId,state]of groupDeliveries){let message2=this.messages.get(messageId);if(!message2){groupDeliveries.delete(messageId);continue}if(this.isMessageExpired(message2,now)){this.deleteMessage(messageId);continue}if(message2.queueName!==queueName||state.status!=="pending"||state.visibleAt>now)continue;let receiptHandle=randomBytes(16).toString("hex");if(state.status="in-flight",state.receiptHandle=receiptHandle,state.deliveryCount++,state.leaseExpiresAt=Date.now()+visibilityTimeoutMs,results.push({messageId:message2.messageId,payload:message2.payload,contentType:message2.contentType,deliveryCount:state.deliveryCount,createdAt:message2.createdAt,receiptHandle}),results.length>=limit)break}return results}acknowledge(messageId,consumerGroup,receiptHandle){let{deliveries:groupDeliveries,state}=this.findDeliveryState(messageId,consumerGroup);return!groupDeliveries||!state?!1:state.receiptHandle&&state.receiptHandle!==receiptHandle?(output_manager_default.debug(`queues: ACK rejected for ${messageId} in group "${consumerGroup}" - receipt handle mismatch`),!1):(state.status="acked",groupDeliveries.delete(messageId),output_manager_default.debug(`queues: ACK message ${messageId} in group "${consumerGroup}"`),!0)}changeVisibility(messageId,consumerGroup,receiptHandle,timeoutSeconds){let{state}=this.findDeliveryState(messageId,consumerGroup);return!state||state.status!=="in-flight"||state.receiptHandle&&state.receiptHandle!==receiptHandle?!1:(state.leaseExpiresAt=Date.now()+timeoutSeconds*1e3,output_manager_default.debug(`queues: visibility for ${messageId} in group "${consumerGroup}" extended by ${timeoutSeconds}s`),!0)}findMessageIdByReceiptHandle(consumerGroup,receiptHandle){for(let group of this.consumerGroups){if(group.name!==consumerGroup)continue;let deliveries=this.deliveryState.get(group.id);if(deliveries){for(let[messageId,state]of deliveries)if(state.receiptHandle===receiptHandle)return messageId}}return null}findDeliveryState(messageId,serviceName){for(let group of this.consumerGroups){if(group.name!==serviceName)continue;let deliveries=this.deliveryState.get(group.id);if(!deliveries)continue;let state=deliveries.get(messageId);if(state)return{deliveries,state}}return{deliveries:null,state:null}}getOrCreatePullGroup(queueName,consumerGroup){let existingGroup=this.consumerGroups.find(group2=>group2.name===consumerGroup&&group2.topicRegex.test(queueName));if(existingGroup)return existingGroup;let group={id:`${consumerGroup}::${queueName}`,name:consumerGroup,topicPattern:queueName,topicRegex:topicPatternToRegex(queueName),retryAfterMs:DEFAULT_RETRY_AFTER,maxDeliveries:DEFAULT_MAX_DELIVERIES,initialDelayMs:DEFAULT_INITIAL_DELAY},deliveries=new Map;for(let message2 of this.messages.values())message2.queueName!==queueName||this.isMessageExpired(message2)||deliveries.set(message2.messageId,{status:"pending",deliveryCount:0,receiptHandle:"",visibleAt:message2.visibleAt,leaseExpiresAt:0});return this.consumerGroups.push(group),this.deliveryState.set(group.id,deliveries),group}isMessageExpired(message2,now=Date.now()){return new Date(message2.createdAt).getTime()+message2.retentionMs<now}deleteMessage(messageId){this.messages.delete(messageId);for(let groupDeliveries of this.deliveryState.values())groupDeliveries.delete(messageId)}createRetainedDeliveries(group){let deliveries=new Map;for(let message2 of this.messages.values())!group.topicRegex.test(message2.queueName)||this.isMessageExpired(message2)||deliveries.set(message2.messageId,{status:"pending",deliveryCount:0,receiptHandle:"",visibleAt:Math.max(message2.visibleAt,new Date(message2.createdAt).getTime()+group.initialDelayMs),leaseExpiresAt:0});return deliveries}activatePushGroup(group){if(!group.serviceOriginFn&&!group.resolveFunction)return;let now=Date.now(),deliveries=this.deliveryState.get(group.id);if(deliveries)for(let[messageId,state]of deliveries){let message2=this.messages.get(messageId);!message2||state.status!=="pending"||(state.visibleAt=Math.max(state.visibleAt,new Date(message2.createdAt).getTime()+group.initialDelayMs),state.visibleAt<=now&&this.dispatchToConsumer(message2,group).catch(err=>{output_manager_default.debug(`queues: unexpected dispatch error: ${err}`)}))}}async dispatchToConsumer(message2,group){let groupDeliveries=this.deliveryState.get(group.id);if(!groupDeliveries)return;let state=groupDeliveries.get(message2.messageId);if(!state||state.status!=="pending")return;if(state.deliveryCount>=group.maxDeliveries){output_manager_default.debug(`queues: message ${message2.messageId} exceeded maxDeliveries (${group.maxDeliveries}) for group "${group.name}", dropping`),groupDeliveries.delete(message2.messageId);return}let upstream=group.serviceOriginFn?.(),dispatch=group.resolveFunction?.();if(!upstream&&!dispatch){state.visibleAt=Date.now()+TICK_INTERVAL2;return}let receiptHandle=randomBytes(16).toString("hex");state.status="in-flight",state.receiptHandle=receiptHandle,state.deliveryCount++,state.leaseExpiresAt=Date.now()+DEFAULT_VISIBILITY_TIMEOUT;let now=new Date().toISOString(),expiresAt=new Date(new Date(message2.createdAt).getTime()+message2.retentionMs).toISOString();output_manager_default.debug(`queues: dispatching v2beta callback to worker "${group.name}"`);try{let request={method:"POST",headers:{"content-type":message2.contentType,"ce-type":"com.vercel.queue.v2beta","ce-specversion":"1.0","ce-source":`/topic/${message2.queueName}/consumer/${group.name}`,"ce-id":message2.messageId,"ce-time":now,"ce-vqsmessageid":message2.messageId,"ce-vqsqueuename":message2.queueName,"ce-vqsconsumergroup":group.name,"ce-vqsreceipthandle":receiptHandle,"ce-vqsdeliverycount":String(state.deliveryCount),"ce-vqscreatedat":message2.createdAt,"ce-vqsexpiresat":expiresAt,"ce-vqsregion":"dev1"},body:message2.payload},response=dispatch?await dispatch(request):await directFetch(`${upstream}/`,request);if(response===null){state.receiptHandle===receiptHandle&&state.status==="in-flight"&&(state.status="pending",state.deliveryCount--,state.receiptHandle="",state.leaseExpiresAt=0,state.visibleAt=Date.now()+TICK_INTERVAL2);return}response.ok||(output_manager_default.debug(`queues: worker "${group.name}" returned ${response.status} for message ${message2.messageId}`),this.handleDeliveryFailure(message2.messageId,group,receiptHandle))}catch(err){output_manager_default.debug(`queues: failed to dispatch CloudEvent to "${group.name}": ${err}`),this.handleDeliveryFailure(message2.messageId,group,receiptHandle)}}handleDeliveryFailure(messageId,group,receiptHandle){let groupDeliveries=this.deliveryState.get(group.id);if(!groupDeliveries)return;let state=groupDeliveries.get(messageId);!state||state.receiptHandle!==receiptHandle||(state.status="pending",state.visibleAt=Date.now()+group.retryAfterMs,state.leaseExpiresAt=0)}tick(){let now=Date.now();for(let[key,record]of this.idempotencyRecords)record.expiresAt<=now&&this.idempotencyRecords.delete(key);for(let[messageId,record]of this.duplicateMessages)record.expiresAt<=now&&this.duplicateMessages.delete(messageId);for(let[messageId,message2]of this.messages)this.isMessageExpired(message2,now)&&this.deleteMessage(messageId);for(let group of this.consumerGroups){let groupDeliveries=this.deliveryState.get(group.id);if(groupDeliveries)for(let[messageId,state]of groupDeliveries){let message2=this.messages.get(messageId);if(!message2){groupDeliveries.delete(messageId);continue}if(state.status==="in-flight"&&state.leaseExpiresAt<=now){state.deliveryCount>=group.maxDeliveries?(output_manager_default.debug(`queues: message ${messageId} exceeded maxDeliveries (${group.maxDeliveries}) for group "${group.name}", dropping`),groupDeliveries.delete(messageId)):(state.status="pending",state.visibleAt=group.serviceOriginFn||group.resolveFunction?now+group.retryAfterMs:now,state.leaseExpiresAt=0);continue}state.status==="pending"&&state.visibleAt<=now&&(group.serviceOriginFn||group.resolveFunction)&&this.dispatchToConsumer(message2,group).catch(err=>{output_manager_default.debug(`queues: unexpected dispatch error: ${err}`)})}}}stop(){clearInterval(this.tickTimer)}};var import_build_utils7=__toESM(require_build_utils(),1),import_minimatch2=__toESM(require_minimatch(),1);import{posix}from"path";function validPath(value,http2=!1){if(typeof value!="string"||!value)return!1;try{let pathname=http2?value:`/${value}`,decoded=decodeURIComponent(pathname);return pathname.startsWith("/")&&!pathname.startsWith("//")&&!/[\\?#\s]/.test(pathname)&&new URL(pathname,"http://localhost").pathname===pathname&&!/[\\?#\x00-\x1f\x7f]/.test(decoded)&&!/%2f/i.test(pathname)&&!decoded.split("/").some(segment=>segment==="."||segment==="..")&&(http2||!value.endsWith("/")&&!value.includes("//"))}catch{return!1}}async function collectDevFunctions({scopes,workPath,files,config,env}){let builders=await importBuilders(new Set(scopes.map(({build})=>build.use)),workPath),unmatched=new Set(Object.entries(config.functions??{}).filter(([,fn2])=>fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta")).map(([pattern])=>pattern)),functions=new Map,schedules=[];for(let scope of scopes){let{build,target}=scope,builder=builders.get(build.use)?.builder;if(!builder)throw dev.DEV_BUILDER_LOAD_FAILED({use:build.use});let scopedConfig=structuredClone({...config,...build.config,functions:build.config?.functions??(build.config?.zeroConfig?{}:config.functions)}),manifest;if(builder.getDevManifest)manifest=await builder.getDevManifest({workPath,build,files,config:scopedConfig,env});else{manifest={functions:[],matchedFunctionPatterns:[]};let mode=build.config??{};if(target!=="builder"||mode.framework||mode.middleware||mode.buildType==="middleware"||mode.buildType==="app"||mode.serviceName||mode.serviceType||mode.buildpack||!build.src||build.src.includes("<"))continue;let pattern=build.src.replace(/^\//,"");for(let sourceFile of files){if(!(sourceFile===pattern||(0,import_minimatch2.default)(sourceFile,pattern,{dot:!0}))||builder.version!==3&&!(builder.version===-1&&mode.zeroConfig&&pattern.startsWith("api/")&&sourceFile.startsWith("api/"))||/(^|\/)package\.json$/.test(sourceFile)||/^(?:src\/)?middleware\.[^/]+$/.test(sourceFile))continue;let extension=posix.extname(sourceFile),outputPath=mode.zeroConfig&&extension?sourceFile.slice(0,-extension.length):sourceFile,{experimentalTriggers}=await(0,import_build_utils7.getLambdaOptionsFromFunction)({sourceFile,config:scopedConfig});manifest.functions.push({outputPath,sourceFile,invocation:{type:"entrypoint",entrypoint:sourceFile},experimentalTriggers});let matched=Object.keys(scopedConfig.functions??{}).find(key=>sourceFile===key||(0,import_minimatch2.default)(sourceFile,key));matched&&manifest.matchedFunctionPatterns.push(matched)}}if(!Array.isArray(manifest?.functions)||!Array.isArray(manifest?.matchedFunctionPatterns)||manifest.matchedFunctionPatterns.some(pattern=>typeof pattern!="string"))throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:build.use});let scheduleError=validateConfig({schedules:manifest.schedules});if(scheduleError)throw scheduleError;for(let fn2 of manifest.functions){if(!validPath(fn2?.outputPath)||fn2.outputPath.endsWith(".func")||fn2.sourceFile!==void 0&&!validPath(fn2.sourceFile)||!fn2.invocation||(fn2.invocation.type==="http"?!validPath(fn2.invocation.pathname,!0):fn2.invocation.type!=="entrypoint"||!validPath(fn2.invocation.entrypoint))||fn2.experimentalTriggers!==void 0&&!Array.isArray(fn2.experimentalTriggers))throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:build.use});if(functions.has(fn2.outputPath))throw dev.DEV_FUNCTION_OUTPUT_DUPLICATE({outputPath:fn2.outputPath});functions.set(fn2.outputPath,{outputPath:fn2.outputPath,sourceFile:fn2.sourceFile,invocation:structuredClone(fn2.invocation),experimentalTriggers:structuredClone(fn2.experimentalTriggers),scope})}schedules.push(...structuredClone(manifest.schedules??[]));for(let pattern of manifest.matchedFunctionPatterns)unmatched.delete(pattern)}return{functions,schedules,unmatchedPatterns:[...unmatched]}}function deriveQueueSubscriptions(registry){let subscriptions=[],ids=new Set;for(let fn2 of registry.functions.values())for(let trigger of fn2.experimentalTriggers??[]){if(!trigger||typeof trigger.type!="string")throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:fn2.scope.build.use});if(trigger.type!=="queue/v2beta")continue;let{consumer,topic,retryAfterSeconds,initialDelaySeconds,maxDeliveries}=trigger;if(typeof consumer!="string"||!consumer||typeof topic!="string"||!topic||[retryAfterSeconds,initialDelaySeconds,maxDeliveries].some(value=>value!==void 0&&(!Number.isFinite(value)||value<0))||retryAfterSeconds!==void 0&&retryAfterSeconds<=0||maxDeliveries!==void 0&&(!Number.isInteger(maxDeliveries)||maxDeliveries<1))throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:fn2.scope.build.use});let id=`${consumer}::${topic}`;if(ids.has(id))throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup:consumer,topic});ids.add(id),subscriptions.push({outputPath:fn2.outputPath,consumer,topic,retryAfterSeconds,initialDelaySeconds,maxDeliveries})}return subscriptions}var import_raw_body=__toESM(require_raw_body(),1),import_local_schedules=__toESM(require_dist9(),1);import{z}from"zod";var identifier=z.string().min(1).max(256).regex(/^[0-9A-Za-z._-]+$/),definition=z.strictObject({expression:z.discriminatedUnion("type",[z.strictObject({type:z.literal("cron"),cron:z.string().min(1)}),z.strictObject({type:z.literal("single"),at:z.string().min(1)})]),timezone:z.string().min(1).max(50).optional(),jitter:z.number().int().min(1).max(15).optional(),target:z.strictObject({type:z.literal("queue"),topic:z.string().regex(/^[A-Za-z0-9_-]+$/)}),payload:z.unknown().optional()}),createBody=definition.extend({name:identifier.optional(),namespace:identifier.optional()}),updateBody=definition.partial().extend({jitter:definition.shape.jitter.nullable()}),scopeQuery=z.object({projectId:z.string().min(1).optional()}),identifierQuery=scopeQuery.extend({namespace:identifier.optional()}),listQuery=identifierQuery.extend({cursor:z.string().min(1).optional(),limit:z.coerce.number().int().min(1).max(100).default(20)}),MAX_PAYLOAD_BYTES=256*1024,MAX_BODY_BYTES=MAX_PAYLOAD_BYTES+16*1024;async function handleSchedulesRequest(broker,projectId,req,res,pathname){let send=(status,data)=>{res.writeHead(status,{"Content-Type":"application/json"}),res.end(JSON.stringify(data))},error2=(status,code,message2)=>send(status,{error:{code,message:message2}});try{let route=/^\/v1\/schedules(?:\/([^/]+)(?:\/(enable|disable|invoke))?)?$/.exec(pathname);if(!route){error2(404,"not_found","Schedule route not found");return}let[,encodedName,action]=route,methods=action?["POST"]:encodedName?["GET","PATCH","DELETE"]:["GET","POST"];if(!methods.includes(req.method||"")){res.setHeader("Allow",methods.join(", ")),error2(405,"method_not_allowed","Method not allowed");return}let query=Object.fromEntries(new URL(req.url||"/","http://localhost").searchParams),parsedQuery=(!encodedName&&req.method==="POST"?scopeQuery:identifierQuery).parse(query);if(parsedQuery.projectId!==void 0&&parsedQuery.projectId!==projectId)throw new import_local_schedules.ScheduleBrokerError("invalid_request","The projectId query parameter must match the local project.");if(!encodedName&&req.method==="GET"){let{namespace,cursor,limit}=listQuery.parse(query);send(200,broker.list({namespace,cursor,limit}));return}if(req.method==="PATCH"||!encodedName&&req.method==="POST"){let body;try{body=JSON.parse(await(0,import_raw_body.default)(req,{limit:MAX_BODY_BYTES,encoding:"utf8"}))}catch(err){let tooLarge=err.statusCode===413;error2(tooLarge?413:400,tooLarge?"payload_too_large":"bad_request",tooLarge?`Schedule request exceeds ${MAX_BODY_BYTES} bytes`:"Expected a JSON object as the request body");return}let parsed=(req.method==="PATCH"?updateBody:createBody).parse(body);if(parsed.payload!==void 0&&Buffer.byteLength(JSON.stringify(parsed.payload))>MAX_PAYLOAD_BYTES){error2(400,"payload_too_large",`Schedule payload exceeds ${MAX_PAYLOAD_BYTES} bytes`);return}encodedName?send(200,broker.update({name:identifier.parse(decodeURIComponent(encodedName)),namespace:identifierQuery.parse(query).namespace},parsed)):send(201,broker.create(createBody.parse(parsed)));return}let id={name:identifier.parse(decodeURIComponent(encodedName)),namespace:identifierQuery.parse(query).namespace};action==="invoke"?(await broker.invoke(id),res.writeHead(204),res.end()):action==="enable"||action==="disable"?send(200,broker[action](id)):req.method==="DELETE"?send(200,broker.delete(id)):send(200,broker.get(id))}catch(err){if(err instanceof z.ZodError)error2(400,"bad_request",err.issues.map(issue=>`${issue.path.join(".")||"request"}: ${issue.message}`).join("; "));else if(err instanceof URIError)error2(400,"bad_request","Invalid encoded schedule name");else if(err instanceof import_local_schedules.ScheduleBrokerError){let status={invalid_request:400,not_found:404,conflict:409,closed:503}[err.code],code={invalid_request:"bad_request",conflict:"schedule_already_exists",closed:"unavailable",not_found:"not_found"}[err.code];error2(status,code,err.message)}else error2(500,"schedule_dispatch_failed",err instanceof Error?err.message:"Failed to dispatch schedule")}}var import_build_utils8=__toESM(require_build_utils(),1);function collectStaticSchedules(authored,registry){let schedules=[...authored??[],...registry.schedules],error2=validateConfig({schedules});if(error2)throw error2;for(let{name,target}of registry.schedules)if("entrypoint"in target)throw new import_build_utils8.NowBuildError({code:"DEV_SCHEDULE_MANIFEST_ENTRYPOINT",message:`Native schedule "${name}" has an unresolved target.entrypoint. The builder's getDevManifest must return a Build Output API target.function or target.topic instead.`});return schedules.sort((a,b)=>a.name.localeCompare(b.name)),schedules.map(({name,expression,timezone,target})=>{if("entrypoint"in target)throw new import_build_utils8.NowBuildError({code:"DEV_SCHEDULE_ENTRYPOINT_UNSUPPORTED",message:`Schedule "${name}" targets entrypoint "${target.entrypoint}", which cannot be resolved by vercel dev. Use target.function with an exact registered build output ID and a sole schedule/v1beta trigger, or target.topic for a queue. A matching sourceFile in getDevManifest is not sufficient to resolve a schedule entrypoint.`});if("function"in target){let fn2=registry.functions.get(target.function);if(!fn2)throw dev.DEV_SCHEDULE_FUNCTION_MISSING({name,outputPath:target.function});if(fn2.experimentalTriggers?.length!==1||fn2.experimentalTriggers[0]?.type!=="schedule/v1beta")throw dev.DEV_SCHEDULE_FUNCTION_TRIGGER({name,outputPath:target.function})}return{name,expression:{type:"cron",cron:expression.cron},jitter:expression.jitter,timezone,target:"function"in target?{type:"function",function:target.function}:{type:"queue",topic:target.topic}}})}import path3 from"path";function toOrchestratorService(sidecar){let{type:_type,...subscriber}=sidecar;return{...subscriber,schema:"experimentalServices",type:"worker",trigger:"queue"}}async function collectBuilderDevSidecars({builds,workPath,services=[]}){let builderSpecs=new Set(builds.map(build=>build.use)),buildersWithPkgs=await importBuilders(builderSpecs,workPath),servicesByBuilder=new Map(services.map(service=>[service.builder,service])),sidecars=(await Promise.all(builds.map(async build=>{let builder=buildersWithPkgs.get(build.use)?.builder;if(!builder)throw dev.DEV_BUILDER_LOAD_FAILED({use:build.use});let service=servicesByBuilder.get(build),serviceRoot=service?.root??".",sidecars2=await builder.getDevSidecars?.({workPath:path3.join(workPath,serviceRoot),build,...service?{service}:{}})??[];return service?sidecars2.map(sidecar=>({...sidecar,name:`${service.name}-${sidecar.name}`,workspace:serviceRoot})):sidecars2}))).flat(),names=new Set;for(let sidecar of sidecars){let{name,type}=sidecar;if(type!=="subscriber")throw dev.DEV_SIDECAR_UNSUPPORTED_TYPE({name,type});if(names.has(name))throw dev.DEV_SIDECAR_DUPLICATE_NAME({name});names.add(name)}return sidecars}function nodeHeadersToFetchHeaders(nodeHeaders){let headers=new globalThis.Headers;for(let[name,value]of Object.entries(nodeHeaders))if(Array.isArray(value))for(let val of value)headers.append(name,val);else typeof value<"u"&&headers.set(name,String(value));return headers}var NEVER_COMBINE_RESPONSE_HEADERS=new Set(["set-cookie","www-authenticate","proxy-authenticate"]),COMMA_JOIN_RESPONSE_HEADERS=new Set(["vary"]);function applyChainResponseHeader(res,name,value){if(NEVER_COMBINE_RESPONSE_HEADERS.has(name)){let existing=res.getHeader(name),values=Array.isArray(existing)?existing.map(String):existing!==void 0?[String(existing)]:[];values.push(value),res.setHeader(name,values);return}if(COMMA_JOIN_RESPONSE_HEADERS.has(name)){let existing=res.getHeader(name);res.setHeader(name,existing!==void 0?`${existing}, ${value}`:value);return}res.setHeader(name,value)}var NONOVERRIDABLE_HEADERS=new Set(["host","connection","content-length","transfer-encoding","keep-alive","transfer-encoding","te","upgrade","trailer"]);function applyOverriddenHeaders(reqHeaders,respHeaders){let headers=new globalThis.Headers(respHeaders),overriddenHeaders=headers.get("x-middleware-override-headers");if(!overriddenHeaders)return headers;let overriddenKeys=new Set;for(let key of overriddenHeaders.split(","))overriddenKeys.add(key.trim());headers.delete("x-middleware-override-headers");for(let key of Object.keys(reqHeaders))!NONOVERRIDABLE_HEADERS.has(key)&&!overriddenKeys.has(key)&&delete reqHeaders[key];for(let key of overriddenKeys.keys()){if(NONOVERRIDABLE_HEADERS.has(key))continue;let valueKey="x-middleware-request-"+key,newValue=headers.get(valueKey);reqHeaders[key]!==newValue&&(newValue?reqHeaders[key]=newValue:delete reqHeaders[key]),headers.delete(valueKey)}return headers}var import_error_utils=__toESM(require_dist(),1);import{parse}from"url";function parseListen(str,defaultPort=3e3){let port=Number(str);if(!isNaN(port))return[port];let url4=parse(str);switch(url4.protocol){case"pipe:":{let cutStr=str.replace(/^pipe:/,"");if(cutStr.slice(0,4)!=="\\\\.\\")throw dev.DEV_INVALID_WINDOWS_PIPE({endpoint:str});return[cutStr]}case"unix:":if(!url4.pathname)throw dev.DEV_INVALID_UNIX_SOCKET({endpoint:str});return[url4.pathname];case"tcp:":return url4.port=url4.port||String(defaultPort),[parseInt(url4.port,10),url4.hostname??void 0];default:if(!url4.slashes){if(url4.protocol===null)return[defaultPort,url4.pathname??void 0];if(port=Number(url4.hostname),url4.protocol&&!isNaN(port))return[port,url4.protocol.substring(0,url4.protocol.length-1)]}throw dev.DEV_INVALID_LISTEN_SCHEME({protocol:url4.protocol})}}function replaceLocalhost(address){return address.replace("[::]","localhost").replace("0.0.0.0","localhost")}import{lstat,readdir,readFile,stat}from"node:fs/promises";import{extname,isAbsolute as isAbsolute2,join as join3,relative as relative3,resolve}from"node:path";import{parse as parseUrl}from"node:url";var MAX_REDIRECTS=1e6,MAX_FILES=100,MAX_URL_LENGTH=2048,VALID_STATUS_CODES=new Set([301,302,303,307,308]),SUPPORTED_EXTENSIONS=new Set([".csv",".json",".jsonl"]),BulkRedirectTable=class{constructor(){this.caseSensitiveByHostPath=new Map;this.caseInsensitiveByHostPath=new Map;this.caseSensitiveByPath=new Map;this.caseInsensitiveByPath=new Map}get size(){return this.caseSensitiveByHostPath.size+this.caseInsensitiveByHostPath.size+this.caseSensitiveByPath.size+this.caseInsensitiveByPath.size}add(redirect2){let{host,pathname}=parseSource(redirect2.source),stored={destination:redirect2.destination,statusCode:redirect2.statusCode,preserveQueryParams:redirect2.preserveQueryParams};if(host){let key=hostPathKey(host,pathname);redirect2.caseSensitive?this.caseSensitiveByHostPath.set(key,stored):this.caseInsensitiveByHostPath.set(key.toLowerCase(),stored);return}redirect2.caseSensitive?this.caseSensitiveByPath.set(pathname,stored):this.caseInsensitiveByPath.set(pathname.toLowerCase(),stored)}lookup(pathname,host){let hostname=host?hostnameFromHostHeader(host):"";if(hostname){let hostKey=hostPathKey(hostname,pathname),hostMatch=this.caseSensitiveByHostPath.get(hostKey)||this.caseInsensitiveByHostPath.get(hostKey.toLowerCase());if(hostMatch)return hostMatch}return this.caseSensitiveByPath.get(pathname)||this.caseInsensitiveByPath.get(pathname.toLowerCase())}};async function getBulkRedirectsSignature(cwd,bulkRedirectsPath){if(!bulkRedirectsPath)return"";let resolved=resolveBulkRedirectsPath(cwd,bulkRedirectsPath);if(!resolved)return`invalid:${bulkRedirectsPath}`;try{let stats=await stat(resolved);if(stats.isFile())return`file:${resolved}:${stats.mtimeMs}:${stats.size}`;if(!stats.isDirectory())return`other:${resolved}:${stats.mtimeMs}`;let files=await listRedirectFiles(resolved),parts=await Promise.all(files.map(async file=>{try{let fileStats=await stat(file);return`${file}:${fileStats.mtimeMs}:${fileStats.size}`}catch{return`${file}:missing`}}));return`dir:${resolved}:${parts.join("|")}`}catch{return`missing:${resolved}`}}async function loadBulkRedirects(cwd,bulkRedirectsPath){let warnings=[],table=new BulkRedirectTable,resolved=resolveBulkRedirectsPath(cwd,bulkRedirectsPath);if(!resolved)return warnings.push(`Skipping bulk redirects path "${bulkRedirectsPath}" because it resolves outside the project directory.`),{table,redirectCount:0,fileCount:0,warnings};let files;try{let stats=await stat(resolved);if(stats.isDirectory())files=await listRedirectFiles(resolved),files.length>MAX_FILES&&(warnings.push(`Bulk redirects directory "${bulkRedirectsPath}" has ${files.length} files; only the first ${MAX_FILES} will be used.`),files=files.slice(0,MAX_FILES));else if(stats.isFile()){let ext=extname(resolved).toLowerCase();if(!SUPPORTED_EXTENSIONS.has(ext))return warnings.push(`Bulk redirects file "${bulkRedirectsPath}" must be a .csv, .json, or .jsonl file.`),{table,redirectCount:0,fileCount:0,warnings};files=[resolved]}else return warnings.push(`Bulk redirects path "${bulkRedirectsPath}" is not a file or directory.`),{table,redirectCount:0,fileCount:0,warnings}}catch(err){if(isNotFound(err))return warnings.push(`Bulk redirects path "${bulkRedirectsPath}" was not found.`),{table,redirectCount:0,fileCount:0,warnings};throw err}let redirectCount=0;for(let file of files){if(redirectCount>=MAX_REDIRECTS){warnings.push(`Bulk redirects limit of ${MAX_REDIRECTS} reached; remaining entries were skipped.`);break}let remaining=MAX_REDIRECTS-redirectCount,parsed=await parseRedirectFile(file,remaining,warnings,cwd);for(let redirect2 of parsed)table.add(redirect2),redirectCount++}let duplicateCount=redirectCount-table.size;return duplicateCount>0&&warnings.push(`Bulk redirects contain ${duplicateCount} duplicate ${duplicateCount===1?"source":"sources"}; the last occurrence wins.`),{table,redirectCount,fileCount:files.length,warnings}}function resolveBulkRedirect(table,reqUrl,host){let parsed=parseUrl(reqUrl),match=table.lookup(parsed.pathname||"/",host);if(!match)return;let location=match.destination;return match.preserveQueryParams&&parsed.search&&(location=appendQueryParams(location,parsed.search)),{location,statusCode:match.statusCode}}function appendQueryParams(destination,search){let query=search.startsWith("?")?search.slice(1):search;return query?destination.includes("?")?`${destination}&${query}`:`${destination}?${query}`:destination}function resolveBulkRedirectsPath(cwd,bulkRedirectsPath){let projectRoot=resolve(cwd),resolved=resolve(projectRoot,bulkRedirectsPath),relativeFromRoot=relative3(projectRoot,resolved);return relativeFromRoot.startsWith("..")||isAbsolute2(relativeFromRoot)?null:resolved}async function listRedirectFiles(dir){let files=[];return await walk(dir,files),files.sort(),files}async function walk(dir,files){let entries=await readdir(dir);for(let entry of entries){let fullPath=join3(dir,entry),stats=await lstat(fullPath);stats.isDirectory()?await walk(fullPath,files):stats.isFile()&&SUPPORTED_EXTENSIONS.has(extname(fullPath).toLowerCase())&&files.push(fullPath)}}async function parseRedirectFile(file,remaining,warnings,cwd){let rel=relative3(cwd,file)||file,ext=extname(file).toLowerCase(),content;try{content=stripBom(await readFile(file,"utf8"))}catch(err){return warnings.push(`Failed to read bulk redirects file "${rel}": ${errorMessage(err)}`),[]}try{return ext===".csv"?parseCsvRedirects(content,remaining,warnings,rel):ext===".jsonl"?parseJsonlRedirects(content,remaining,warnings,rel):parseJsonRedirects(content,remaining,warnings,rel)}catch(err){return warnings.push(`Failed to parse bulk redirects file "${rel}": ${errorMessage(err)}`),[]}}function parseJsonRedirects(content,remaining,warnings,rel){let parsed=JSON.parse(content);return Array.isArray(parsed)?normalizeRedirects(parsed,remaining,warnings,rel):(warnings.push(`Bulk redirects file "${rel}" must contain a JSON array of redirects.`),[])}function parseJsonlRedirects(content,remaining,warnings,rel){let rows=[],lines=content.split(/\r?\n/);for(let i=0;i<lines.length;i++){let line=lines[i].trim();if(line)try{rows.push(JSON.parse(line))}catch{warnings.push(`Skipping invalid JSONL in "${rel}" at line ${i+1}.`)}}return normalizeRedirects(rows,remaining,warnings,rel)}var CSV_HEADER_ALIASES={source:"source",destination:"destination",permanent:"permanent",statuscode:"statusCode",casesensitive:"caseSensitive",preservequeryparams:"preserveQueryParams"};function parseCsvRedirects(content,remaining,warnings,rel){let lines=content.split(/\r?\n/).filter(line=>line.trim().length>0);if(lines.length===0)return warnings.push(`Bulk redirects CSV "${rel}" is empty.`),[];let headers=parseCsvLine(lines[0]).map(header=>CSV_HEADER_ALIASES[header.trim().toLowerCase()]);if(!headers.includes("source")||!headers.includes("destination"))return warnings.push(`Bulk redirects CSV "${rel}" must have "source" and "destination" columns.`),[];let rows=[];for(let i=1;i<lines.length;i++){let values=parseCsvLine(lines[i]),row={};for(let col=0;col<headers.length;col++){let header=headers[col];header&&(row[header]=values[col]??"")}rows.push(row)}return normalizeRedirects(rows,remaining,warnings,rel)}function normalizeRedirects(rows,remaining,warnings,rel){let redirects=[];for(let i=0;i<rows.length;i++){if(redirects.length>=remaining){warnings.push(`Bulk redirects limit of ${MAX_REDIRECTS} reached while reading "${rel}"; remaining entries were skipped.`);break}let row=rows[i];if(!row||typeof row!="object"){warnings.push(`Skipping invalid redirect in "${rel}" at index ${i}.`);continue}let record=row,source=asTrimmedString(record.source),destination=asTrimmedString(record.destination);if(!source||!destination){warnings.push(`Skipping redirect in "${rel}" at index ${i}: source and destination are required.`);continue}if(source.length>MAX_URL_LENGTH||destination.length>MAX_URL_LENGTH){warnings.push(`Skipping redirect in "${rel}" at index ${i}: source and destination must be at most ${MAX_URL_LENGTH} characters.`);continue}let statusCode;if(record.statusCode!==void 0&&record.statusCode!==""){let parsedStatus=parseStatusCode(record.statusCode);if(parsedStatus===void 0){warnings.push(`Skipping redirect in "${rel}" at index ${i}: statusCode must be one of ${[...VALID_STATUS_CODES].join(", ")}.`);continue}statusCode=parsedStatus}else statusCode=parseBoolean(record.permanent)??!1?308:307;redirects.push({source,destination,statusCode,caseSensitive:parseBoolean(record.caseSensitive)??!1,preserveQueryParams:parseBoolean(record.preserveQueryParams)??!1})}return redirects}function parseSource(source){if(/^https?:\/\//i.test(source))try{let parsed=new URL(source);return{host:parsed.hostname.toLowerCase(),pathname:parsed.pathname||"/"}}catch{return{host:null,pathname:source}}return{host:null,pathname:source||"/"}}function hostPathKey(host,pathname){return`${host}\0${pathname}`}function hostnameFromHostHeader(hostHeader){let trimmed=hostHeader.trim();if(!trimmed)return"";if(trimmed.startsWith("[")){let end=trimmed.indexOf("]");return end===-1?trimmed.toLowerCase():trimmed.slice(1,end).toLowerCase()}let colon=trimmed.lastIndexOf(":");return colon!==-1&&trimmed.indexOf(":")===colon?trimmed.slice(0,colon).toLowerCase():trimmed.toLowerCase()}function parseBoolean(value){if(typeof value=="boolean")return value;if(typeof value=="number")return value===1?!0:value===0?!1:void 0;if(typeof value!="string")return;let normalized=value.trim().toLowerCase();if(normalized==="t"||normalized==="true")return!0;if(normalized==="f"||normalized==="false")return!1}function parseStatusCode(value){let n=typeof value=="number"?value:typeof value=="string"?Number(value.trim()):NaN;return VALID_STATUS_CODES.has(n)?n:void 0}function asTrimmedString(value){if(typeof value!="string")return;let trimmed=value.trim();return trimmed||void 0}function parseCsvLine(line){let fields=[],current="",inQuotes=!1;for(let i=0;i<line.length;i++){let char=line[i];inQuotes?char==='"'?line[i+1]==='"'?(current+='"',i++):inQuotes=!1:current+=char:char==='"'?inQuotes=!0:char===","?(fields.push(current),current=""):current+=char}return fields.push(current),fields}function stripBom(content){return content.charCodeAt(0)===65279?content.slice(1):content}function isNotFound(err){return typeof err=="object"&&err!==null&&"code"in err&&err.code==="ENOENT"}function errorMessage(err){return err instanceof Error?err.message:String(err)}var DEV_SERVER_PORT_BIND_TIMEOUT=(0,import_ms6.default)("5m"),DEV_QUEUES_DEFAULT_VISIBILITY_TIMEOUT_SECONDS=60,DEV_RUNTIME_CACHE_MAX_ITEM_SIZE=2*1024*1024,DEV_RUNTIME_CACHE_ONE_YEAR_SECONDS=31536e3,frameworkRuntimeSet=new Set(import_frameworks3.frameworkList.map(f=>f.useRuntime?.use||"@vercel/static-build"));function isApiDirBuild(build){let src=build.src?.replace(/^\.\//,"");return typeof src=="string"&&src.startsWith("api/")}function sortBuilders(buildA,buildB){return buildA&&buildA.use&&(0,import_fs_detectors2.isOfficialRuntime)("static-build",buildA.use)?1:buildB&&buildB.use&&(0,import_fs_detectors2.isOfficialRuntime)("static-build",buildB.use)?-1:0}var DevServer=class{constructor(cwd,options){this.initialDevCommandStarted=!1;this.devCommandStarts=new Set;this.functionDispatchReady=!1;this.functionReconciliations=0;this.configGeneration=0;this.unmatchedQueuePatterns=new Set;this.functionRegistry={functions:new Map,schedules:[],unmatchedPatterns:[]};this.responseTransformsByReq=new WeakMap;this.shouldBuildInDev=build=>{if(!this.shouldUseServicesOrchestrator()&&isApiDirBuild(build))return!0;let{name}=(0,import_npm_package_arg.default)(build.use);return!frameworkRuntimeSet.has(name||"")};this.clearVercelConfigPromise=()=>{this.getVercelConfigPromise=null};this.getExtensionlessFile=path6=>{let ext=extname2(path6);return this.apiDir&&path6.startsWith(this.apiDir+"/")&&this.apiExtensions.has(ext)?path6.slice(0,-ext.length):null};this.devServerHandler=async(req,res)=>{if(await this.handleSchedulesProxyRequest(req,res))return;await this.startPromise;let requestId=generateRequestId(this.podId);if(this.stopping){res.setHeader("Connection","close"),await this.send404(req,res,requestId);return}let method=req.method||"GET";output_manager_default.debug(`${import_chalk2.default.bold(method)} ${req.url}`);try{let vercelConfig=await this.getVercelConfig();await this.serveProjectAsNowV2(req,res,requestId,vercelConfig)}catch(err){console.error(err),(0,import_error_utils.isError)(err)&&typeof err.stack=="string"&&output_manager_default.debug(err.stack),res.finished||(res.statusCode=500,res.end((0,import_error_utils.errorToString)(err)))}};this.handleSchedulesRoute=async(req,res,pathname)=>{if(this.stopping){res.writeHead(503),res.end("Local Schedules is stopping");return}await handleSchedulesRequest(this.scheduleBroker,this.projectId??"prj_local",req,res,pathname)};this.exitWithStatus=async(match,routeResult,phase,req,res,requestId,responseTransforms)=>{let{status,headers,dest}=routeResult,location=headers.location||dest;if(status&&location&&300<=status&&status<=399)return output_manager_default.debug(`Route found with redirect status code ${status}`),await this.sendRedirect(req,res,requestId,location,status,responseTransforms),!0;if(!match&&status&&phase!=="miss"){if(routeResult.userDest)return!1;output_manager_default.debug(`Route found with with status code ${status}`);let errorHeaders={...headers};return responseTransforms&&applyResponseTransforms(errorHeaders,responseTransforms),await this.sendError(req,res,requestId,"",status,errorHeaders),!0}return!1};this.handleQueuesRoute=async(req,res,pathname)=>{if(!this.queueBroker){res.writeHead(503),res.end("Queues broker not initialized");return}if(!pathname.startsWith(DEV_QUEUE_API_PREFIX)){res.writeHead(404),res.end("Not Found");return}let topicPath=pathname.slice(DEV_QUEUE_API_PREFIX.length),sendMatch=topicPath.match(/^([A-Za-z0-9_-]+)$/);if(req.method==="POST"&&sendMatch){let topic=sendMatch[1],contentType2=req.headers["content-type"]||"application/json",payload=await(0,import_raw_body2.default)(req),retentionHeader=req.headers["vqs-retention-seconds"],retentionSeconds=retentionHeader&&!isNaN(parseInt(retentionHeader,10))?parseInt(retentionHeader,10):void 0,delayHeader=req.headers["vqs-delay-seconds"],delaySeconds=delayHeader&&!isNaN(parseInt(delayHeader,10))?parseInt(delayHeader,10):void 0,idempotencyKey=req.headers["vqs-idempotency-key"],{messageId}=this.queueBroker.enqueue(topic,payload,contentType2,{retentionSeconds,delaySeconds,idempotencyKey});res.writeHead(201,{"Content-Type":"application/json","Vqs-Message-Id":messageId}),res.end(JSON.stringify({messageId}));return}let receiveByIdMatch=topicPath.match(/^([A-Za-z0-9_-]+)\/consumer\/([A-Za-z0-9_-]+)\/id\/([^/]+)$/);if(req.method==="POST"&&receiveByIdMatch){let[,queueName,consumer,messageId]=receiveByIdMatch,originalMessageId=this.queueBroker.getOriginalMessageIdForDuplicate(queueName,messageId);if(originalMessageId){res.writeHead(409,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"This messageId was a duplicate - use originalMessageId instead",originalMessageId}));return}let result=this.queueBroker.receiveById(queueName,messageId,consumer);if(!result){res.writeHead(404),res.end("Message not found");return}let boundary=`----vcdevboundary${randomBytes2(8).toString("hex")}`,partHeaders=[`Vqs-Message-Id: ${messageId}`,`Vqs-Delivery-Count: ${result.deliveryCount}`,`Vqs-Timestamp: ${result.createdAt}`,`Vqs-Receipt-Handle: ${result.receiptHandle}`,`Content-Type: ${result.contentType}`].join(`\r
|
|
41
|
+
`);let installCommand=typeof config?.installCommand=="string"?config.installCommand.trim():"";installCommand?await this.runInstallCommand(installCommand,workspacePath,logger):await this.maybeInstallJSDependencies(workspacePath,logger)}async runBuffered(logger,task){let captured=[],bufStdout=new Writable({write(chunk,_enc,cb){let b=Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk);captured.push(["stdout",b]),output_manager_default.debugEnabled&&logger.stdout.write(b),cb()}}),bufStderr=new Writable({write(chunk,_enc,cb){let b=Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk);captured.push(["stderr",b]),output_manager_default.debugEnabled&&logger.stderr.write(b),cb()}});try{await task(bufStdout,bufStderr)}catch(err){for(let[channel,chunk]of captured)logger[channel].write(chunk);throw err}}async runInstallCommand(command,workspacePath,logger){await this.runBuffered(logger,(stdout,stderr)=>new Promise((resolve3,reject)=>{output_manager_default.debug(`Running install command: "${command}" in ${workspacePath}`);let child=(0,import_build_utils5.spawnCommand)(command,{cwd:workspacePath,stdio:["inherit","pipe","pipe"]});child.stdout?.on("data",chunk=>stdout.write(chunk)),child.stderr?.on("data",chunk=>stderr.write(chunk)),child.on("error",reject),child.on("exit",(code,signal)=>{code===0?resolve3():reject(new import_build_utils5.NowBuildError({code:"INSTALL_COMMAND_FAILED",message:`Install command "${command}" failed with code ${code}, signal ${signal}`}))})}))}async maybeInstallJSDependencies(workspacePath,logger){await this.runBuffered(logger,async(stdout,stderr)=>{try{await(0,import_build_utils5.runNpmInstall)(workspacePath,[],void 0,this.installMeta,void 0,{stdout,stderr})}catch(err){throw new import_build_utils5.NowBuildError({code:"NODE_DEPENDENCY_SYNC_FAILED",message:`Failed to install Node.JS dependencies: ${err instanceof Error?err.message:String(err)}`})}})}startCronSchedulers(){for(let[name,managed]of this.managedServices){let service=this.services.find(candidate=>candidate.name===name),crons=managed.crons&&managed.crons.length>0?managed.crons:service&&(0,import_build_utils5.isExperimentalService)(service)&&(0,import_build_utils5.isScheduleTriggeredService)(service)&&service.schedule?(0,import_service_schedules.getStaticServiceSchedules)(service.schedule).map(schedule=>({path:(0,import_build_utils5.getInternalServiceCronPath)(name,service.entrypoint||service.builder.src||"index",service.handlerFunction||"cron"),schedule})):[];if(crons.length!==0)for(let cron of crons)output_manager_default.debug(`Scheduling job service ${import_chalk.default.bold(name)} (${import_chalk.default.cyan(cron.schedule)})`),this.scheduleCronTrigger(name,cron.path,cron.schedule,managed)}}scheduleCronTrigger(serviceName,cronPath,schedule,managed){let delayMs=getNextCronDelay(schedule);if(delayMs===null){output_manager_default.warn(`Could not parse cron schedule "${schedule}" for service "${serviceName}", skipping auto-trigger`);return}let timer=setTimeout(async()=>{if(!this.stopping){output_manager_default.debug(`Triggering scheduled job ${import_chalk.default.bold(serviceName)} (schedule: ${import_chalk.default.cyan(schedule)})`);try{let url4=`http://${managed.host}:${managed.port}${cronPath}`,res=await fetch(url4,{method:"POST"});output_manager_default.debug(`Cron trigger for "${serviceName}" responded with status ${res.status}`)}catch(err){output_manager_default.error(`Cron trigger for "${serviceName}" failed: ${err instanceof Error?err.message:String(err)}`)}this.scheduleCronTrigger(serviceName,cronPath,schedule,managed)}},delayMs);this.cronTimers.push(timer)}};var import_ms5=__toESM(require_ms(),1);import{randomBytes}from"crypto";var import_build_utils6=__toESM(require_build_utils(),1);var DEFAULT_RETRY_AFTER=(0,import_ms5.default)("1m"),DEFAULT_MAX_DELIVERIES=32,DEFAULT_INITIAL_DELAY=0,DEFAULT_VISIBILITY_TIMEOUT=(0,import_ms5.default)("1m"),DEFAULT_RETENTION=(0,import_ms5.default)("1h"),TICK_INTERVAL2=(0,import_ms5.default)("1s");function topicPatternToRegex(pattern){let parts=pattern.split("*").map(s=>s.replace(/-/g,"\\-"));return new RegExp(`^${parts.join("[A-Za-z0-9_\\-]*")}$`)}var QueueBroker=class{constructor(services,getServiceOrigin){this.getServiceOrigin=getServiceOrigin;this.messages=new Map;this.idempotencyRecords=new Map;this.duplicateMessages=new Map;this.consumerGroups=[];this.deliveryState=new Map;this.registerServices(services),this.tickTimer=setInterval(()=>this.tick(),TICK_INTERVAL2),this.tickTimer.unref()}registerServices(services){let ids=new Set;for(let service of services.filter(import_build_utils6.isQueueBackedService))for(let{topic}of(0,import_build_utils6.getServiceQueueTopicConfigs)(service)){let consumerGroup=service.consumer??service.name,id=`${consumerGroup}::${topic}`,existing=this.consumerGroups.find(group=>group.id===id);if(ids.has(id)||existing?.serviceOriginFn||existing?.resolveFunction)throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup,topic});ids.add(id)}for(let service of services){if(!(0,import_build_utils6.isQueueBackedService)(service))continue;let topicConfigs=(0,import_build_utils6.getServiceQueueTopicConfigs)(service),consumerGroup=service.consumer??service.name;for(let topicConfig of topicConfigs){let topicPattern=topicConfig.topic,id=`${consumerGroup}::${topicPattern}`,existingGroup=this.consumerGroups.find(group2=>group2.id===id);if(existingGroup&&!existingGroup.serviceOriginFn&&!existingGroup.resolveFunction){existingGroup.serviceName=service.name,existingGroup.serviceOriginFn=()=>this.getServiceOrigin(service.name),existingGroup.retryAfterMs=topicConfig.retryAfterSeconds!==void 0?topicConfig.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,existingGroup.initialDelayMs=topicConfig.initialDelaySeconds!==void 0?topicConfig.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY,this.activatePushGroup(existingGroup);continue}if(existingGroup)throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup,topic:topicPattern});let group={id,name:consumerGroup,serviceName:service.name,topicPattern,topicRegex:topicPatternToRegex(topicPattern),serviceOriginFn:()=>this.getServiceOrigin(service.name),retryAfterMs:topicConfig.retryAfterSeconds!==void 0?topicConfig.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,maxDeliveries:DEFAULT_MAX_DELIVERIES,initialDelayMs:topicConfig.initialDelaySeconds!==void 0?topicConfig.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY};this.consumerGroups.push(group),this.deliveryState.set(group.id,this.createRetainedDeliveries(group)),this.activatePushGroup(group)}}}updateServiceSubscriptions(serviceName,subscriptions){if(subscriptions.length===0)return;let kept=[];for(let group of this.consumerGroups)group.serviceName===serviceName?this.deliveryState.delete(group.id):kept.push(group);this.consumerGroups=kept;for(let subscription of subscriptions){let id=`${subscription.consumer}::${subscription.topic}`,existingGroup=this.consumerGroups.find(group2=>group2.id===id);if(existingGroup&&!existingGroup.serviceOriginFn&&!existingGroup.resolveFunction){existingGroup.serviceName=serviceName,existingGroup.serviceOriginFn=()=>this.getServiceOrigin(serviceName),existingGroup.retryAfterMs=subscription.retryAfterSeconds!==void 0?subscription.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,existingGroup.maxDeliveries=subscription.maxDeliveries??DEFAULT_MAX_DELIVERIES,existingGroup.initialDelayMs=subscription.initialDelaySeconds!==void 0?subscription.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY,this.activatePushGroup(existingGroup);continue}if(existingGroup){output_manager_default.debug(`Queue consumer "${subscription.consumer}" is already registered for topic "${subscription.topic}"; keeping the first registration`);continue}let group={id,name:subscription.consumer,serviceName,topicPattern:subscription.topic,topicRegex:topicPatternToRegex(subscription.topic),serviceOriginFn:()=>this.getServiceOrigin(serviceName),retryAfterMs:subscription.retryAfterSeconds!==void 0?subscription.retryAfterSeconds*1e3:DEFAULT_RETRY_AFTER,maxDeliveries:subscription.maxDeliveries??DEFAULT_MAX_DELIVERIES,initialDelayMs:subscription.initialDelaySeconds!==void 0?subscription.initialDelaySeconds*1e3:DEFAULT_INITIAL_DELAY};this.consumerGroups.push(group),this.deliveryState.set(group.id,this.createRetainedDeliveries(group)),this.activatePushGroup(group)}output_manager_default.debug(`Queue consumer groups for service "${serviceName}" updated from ${subscriptions.length} introspected subscription(s)`)}validateFunctionSubscriptions(subscriptions){let ids=new Set;for(let subscription of subscriptions){let id=`${subscription.consumer}::${subscription.topic}`,existing=this.consumerGroups.find(group=>group.id===id);if(ids.has(id)||existing?.serviceOriginFn&&!existing.configOwned)throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup:subscription.consumer,topic:subscription.topic});ids.add(id)}}setFunctionSubscriptions(subscriptions,resolve3){this.validateFunctionSubscriptions(subscriptions);let ids=new Set(subscriptions.map(subscription=>`${subscription.consumer}::${subscription.topic}`));for(let group of this.consumerGroups)group.configOwned&&!ids.has(group.id)&&(delete group.configOwned,delete group.resolveFunction);for(let subscription of subscriptions){let id=`${subscription.consumer}::${subscription.topic}`,group=this.consumerGroups.find(group2=>group2.id===id);group||(group={id,name:subscription.consumer,topicPattern:subscription.topic,topicRegex:topicPatternToRegex(subscription.topic),retryAfterMs:DEFAULT_RETRY_AFTER,maxDeliveries:DEFAULT_MAX_DELIVERIES,initialDelayMs:DEFAULT_INITIAL_DELAY},this.consumerGroups.push(group),this.deliveryState.set(id,this.createRetainedDeliveries(group))),group.configOwned=!0,group.resolveFunction=()=>resolve3(subscription.outputPath),group.retryAfterMs=subscription.retryAfterSeconds===void 0?DEFAULT_RETRY_AFTER:subscription.retryAfterSeconds*1e3,group.maxDeliveries=subscription.maxDeliveries??DEFAULT_MAX_DELIVERIES,group.initialDelayMs=(subscription.initialDelaySeconds??0)*1e3,this.activatePushGroup(group)}}enqueue(queueName,payload,contentType2,options){let now=Date.now(),messageId=randomBytes(16).toString("hex"),retentionMs=(options?.retentionSeconds??0)>0?options.retentionSeconds*1e3:DEFAULT_RETENTION,idempotencyRecordKey=options?.idempotencyKey?`${queueName}:${options.idempotencyKey}`:void 0;if(idempotencyRecordKey){let record=this.idempotencyRecords.get(idempotencyRecordKey);if(record&&record.expiresAt>Date.now())return this.duplicateMessages.set(messageId,{queueName,originalMessageId:record.messageId,expiresAt:Date.now()+retentionMs}),output_manager_default.debug(`queues: skipped duplicate message for queue "${queueName}"`),{messageId};record&&this.idempotencyRecords.delete(idempotencyRecordKey)}idempotencyRecordKey&&this.idempotencyRecords.set(idempotencyRecordKey,{messageId,expiresAt:Date.now()+retentionMs});let message2={messageId,payload,contentType:contentType2,queueName,createdAt:new Date(now).toISOString(),retentionMs,visibleAt:(options?.delaySeconds??0)>0?now+options.delaySeconds*1e3:0};this.messages.set(messageId,message2),output_manager_default.debug(`queues: stored message ${messageId} for queue "${queueName}"`);let matchingGroups=this.consumerGroups.filter(g=>g.topicRegex.test(queueName));matchingGroups.length===0&&output_manager_default.debug(`queues: no consumer group matches topic "${queueName}", message stored but not dispatched`);for(let group of matchingGroups){let groupDeliveries=this.deliveryState.get(group.id),initialVisibleAt=group.initialDelayMs>0?now+group.initialDelayMs:0,visibleAt=Math.max(message2.visibleAt,initialVisibleAt);groupDeliveries.set(messageId,{status:"pending",deliveryCount:0,receiptHandle:"",visibleAt,leaseExpiresAt:0}),visibleAt<=now&&(group.serviceOriginFn||group.resolveFunction)&&this.dispatchToConsumer(message2,group).catch(err=>{output_manager_default.debug(`queues: unexpected dispatch error: ${err}`)})}return{messageId}}getOriginalMessageIdForDuplicate(queueName,messageId){let duplicate=this.duplicateMessages.get(messageId);return!duplicate||duplicate.queueName!==queueName?null:duplicate.expiresAt<=Date.now()?(this.duplicateMessages.delete(messageId),null):duplicate.originalMessageId}receiveById(queueName,messageId,consumerGroup){let message2=this.messages.get(messageId);if(!message2||message2.queueName!==queueName||this.isMessageExpired(message2))return null;let group=this.getOrCreatePullGroup(queueName,consumerGroup),state=this.deliveryState.get(group.id)?.get(messageId);if(!state)return null;if(state.status==="pending"){if(state.visibleAt>Date.now())return null;state.status="in-flight",state.receiptHandle=randomBytes(16).toString("hex"),state.deliveryCount++,state.leaseExpiresAt=Date.now()+DEFAULT_VISIBILITY_TIMEOUT}return{messageId:message2.messageId,payload:message2.payload,contentType:message2.contentType,deliveryCount:state.deliveryCount,createdAt:message2.createdAt,receiptHandle:state.receiptHandle}}receiveMessages(queueName,consumerGroup,options){let group=this.getOrCreatePullGroup(queueName,consumerGroup),groupDeliveries=this.deliveryState.get(group.id);if(!groupDeliveries)return[];let now=Date.now(),limit=Math.min(Math.max(options?.limit??1,1),10),visibilityTimeoutMs=(options?.visibilityTimeoutSeconds??DEFAULT_VISIBILITY_TIMEOUT/1e3)*1e3,results=[];for(let[messageId,state]of groupDeliveries){let message2=this.messages.get(messageId);if(!message2){groupDeliveries.delete(messageId);continue}if(this.isMessageExpired(message2,now)){this.deleteMessage(messageId);continue}if(message2.queueName!==queueName||state.status!=="pending"||state.visibleAt>now)continue;let receiptHandle=randomBytes(16).toString("hex");if(state.status="in-flight",state.receiptHandle=receiptHandle,state.deliveryCount++,state.leaseExpiresAt=Date.now()+visibilityTimeoutMs,results.push({messageId:message2.messageId,payload:message2.payload,contentType:message2.contentType,deliveryCount:state.deliveryCount,createdAt:message2.createdAt,receiptHandle}),results.length>=limit)break}return results}acknowledge(messageId,consumerGroup,receiptHandle){let{deliveries:groupDeliveries,state}=this.findDeliveryState(messageId,consumerGroup);return!groupDeliveries||!state?!1:state.receiptHandle&&state.receiptHandle!==receiptHandle?(output_manager_default.debug(`queues: ACK rejected for ${messageId} in group "${consumerGroup}" - receipt handle mismatch`),!1):(state.status="acked",groupDeliveries.delete(messageId),output_manager_default.debug(`queues: ACK message ${messageId} in group "${consumerGroup}"`),!0)}changeVisibility(messageId,consumerGroup,receiptHandle,timeoutSeconds){let{state}=this.findDeliveryState(messageId,consumerGroup);return!state||state.status!=="in-flight"||state.receiptHandle&&state.receiptHandle!==receiptHandle?!1:(state.leaseExpiresAt=Date.now()+timeoutSeconds*1e3,output_manager_default.debug(`queues: visibility for ${messageId} in group "${consumerGroup}" extended by ${timeoutSeconds}s`),!0)}findMessageIdByReceiptHandle(consumerGroup,receiptHandle){for(let group of this.consumerGroups){if(group.name!==consumerGroup)continue;let deliveries=this.deliveryState.get(group.id);if(deliveries){for(let[messageId,state]of deliveries)if(state.receiptHandle===receiptHandle)return messageId}}return null}findDeliveryState(messageId,serviceName){for(let group of this.consumerGroups){if(group.name!==serviceName)continue;let deliveries=this.deliveryState.get(group.id);if(!deliveries)continue;let state=deliveries.get(messageId);if(state)return{deliveries,state}}return{deliveries:null,state:null}}getOrCreatePullGroup(queueName,consumerGroup){let existingGroup=this.consumerGroups.find(group2=>group2.name===consumerGroup&&group2.topicRegex.test(queueName));if(existingGroup)return existingGroup;let group={id:`${consumerGroup}::${queueName}`,name:consumerGroup,topicPattern:queueName,topicRegex:topicPatternToRegex(queueName),retryAfterMs:DEFAULT_RETRY_AFTER,maxDeliveries:DEFAULT_MAX_DELIVERIES,initialDelayMs:DEFAULT_INITIAL_DELAY},deliveries=new Map;for(let message2 of this.messages.values())message2.queueName!==queueName||this.isMessageExpired(message2)||deliveries.set(message2.messageId,{status:"pending",deliveryCount:0,receiptHandle:"",visibleAt:message2.visibleAt,leaseExpiresAt:0});return this.consumerGroups.push(group),this.deliveryState.set(group.id,deliveries),group}isMessageExpired(message2,now=Date.now()){return new Date(message2.createdAt).getTime()+message2.retentionMs<now}deleteMessage(messageId){this.messages.delete(messageId);for(let groupDeliveries of this.deliveryState.values())groupDeliveries.delete(messageId)}createRetainedDeliveries(group){let deliveries=new Map;for(let message2 of this.messages.values())!group.topicRegex.test(message2.queueName)||this.isMessageExpired(message2)||deliveries.set(message2.messageId,{status:"pending",deliveryCount:0,receiptHandle:"",visibleAt:Math.max(message2.visibleAt,new Date(message2.createdAt).getTime()+group.initialDelayMs),leaseExpiresAt:0});return deliveries}activatePushGroup(group){if(!group.serviceOriginFn&&!group.resolveFunction)return;let now=Date.now(),deliveries=this.deliveryState.get(group.id);if(deliveries)for(let[messageId,state]of deliveries){let message2=this.messages.get(messageId);!message2||state.status!=="pending"||(state.visibleAt=Math.max(state.visibleAt,new Date(message2.createdAt).getTime()+group.initialDelayMs),state.visibleAt<=now&&this.dispatchToConsumer(message2,group).catch(err=>{output_manager_default.debug(`queues: unexpected dispatch error: ${err}`)}))}}async dispatchToConsumer(message2,group){let groupDeliveries=this.deliveryState.get(group.id);if(!groupDeliveries)return;let state=groupDeliveries.get(message2.messageId);if(!state||state.status!=="pending")return;if(state.deliveryCount>=group.maxDeliveries){output_manager_default.debug(`queues: message ${message2.messageId} exceeded maxDeliveries (${group.maxDeliveries}) for group "${group.name}", dropping`),groupDeliveries.delete(message2.messageId);return}let upstream=group.serviceOriginFn?.(),dispatch=group.resolveFunction?.();if(!upstream&&!dispatch){state.visibleAt=Date.now()+TICK_INTERVAL2;return}let receiptHandle=randomBytes(16).toString("hex");state.status="in-flight",state.receiptHandle=receiptHandle,state.deliveryCount++,state.leaseExpiresAt=Date.now()+DEFAULT_VISIBILITY_TIMEOUT;let now=new Date().toISOString(),expiresAt=new Date(new Date(message2.createdAt).getTime()+message2.retentionMs).toISOString();output_manager_default.debug(`queues: dispatching v2beta callback to worker "${group.name}"`);try{let request={method:"POST",headers:{"content-type":message2.contentType,"ce-type":"com.vercel.queue.v2beta","ce-specversion":"1.0","ce-source":`/topic/${message2.queueName}/consumer/${group.name}`,"ce-id":message2.messageId,"ce-time":now,"ce-vqsmessageid":message2.messageId,"ce-vqsqueuename":message2.queueName,"ce-vqsconsumergroup":group.name,"ce-vqsreceipthandle":receiptHandle,"ce-vqsdeliverycount":String(state.deliveryCount),"ce-vqscreatedat":message2.createdAt,"ce-vqsexpiresat":expiresAt,"ce-vqsregion":"dev1"},body:message2.payload},response=dispatch?await dispatch(request):await directFetch(`${upstream}/`,request);if(response===null){state.receiptHandle===receiptHandle&&state.status==="in-flight"&&(state.status="pending",state.deliveryCount--,state.receiptHandle="",state.leaseExpiresAt=0,state.visibleAt=Date.now()+TICK_INTERVAL2);return}response.ok||(output_manager_default.debug(`queues: worker "${group.name}" returned ${response.status} for message ${message2.messageId}`),this.handleDeliveryFailure(message2.messageId,group,receiptHandle))}catch(err){output_manager_default.debug(`queues: failed to dispatch CloudEvent to "${group.name}": ${err}`),this.handleDeliveryFailure(message2.messageId,group,receiptHandle)}}handleDeliveryFailure(messageId,group,receiptHandle){let groupDeliveries=this.deliveryState.get(group.id);if(!groupDeliveries)return;let state=groupDeliveries.get(messageId);!state||state.receiptHandle!==receiptHandle||(state.status="pending",state.visibleAt=Date.now()+group.retryAfterMs,state.leaseExpiresAt=0)}tick(){let now=Date.now();for(let[key,record]of this.idempotencyRecords)record.expiresAt<=now&&this.idempotencyRecords.delete(key);for(let[messageId,record]of this.duplicateMessages)record.expiresAt<=now&&this.duplicateMessages.delete(messageId);for(let[messageId,message2]of this.messages)this.isMessageExpired(message2,now)&&this.deleteMessage(messageId);for(let group of this.consumerGroups){let groupDeliveries=this.deliveryState.get(group.id);if(groupDeliveries)for(let[messageId,state]of groupDeliveries){let message2=this.messages.get(messageId);if(!message2){groupDeliveries.delete(messageId);continue}if(state.status==="in-flight"&&state.leaseExpiresAt<=now){state.deliveryCount>=group.maxDeliveries?(output_manager_default.debug(`queues: message ${messageId} exceeded maxDeliveries (${group.maxDeliveries}) for group "${group.name}", dropping`),groupDeliveries.delete(messageId)):(state.status="pending",state.visibleAt=group.serviceOriginFn||group.resolveFunction?now+group.retryAfterMs:now,state.leaseExpiresAt=0);continue}state.status==="pending"&&state.visibleAt<=now&&(group.serviceOriginFn||group.resolveFunction)&&this.dispatchToConsumer(message2,group).catch(err=>{output_manager_default.debug(`queues: unexpected dispatch error: ${err}`)})}}}stop(){clearInterval(this.tickTimer)}};var import_build_utils7=__toESM(require_build_utils(),1),import_minimatch2=__toESM(require_minimatch(),1);import{posix}from"path";function validPath(value,http2=!1){if(typeof value!="string"||!value)return!1;try{let pathname=http2?value:`/${value}`,decoded=decodeURIComponent(pathname);return pathname.startsWith("/")&&!pathname.startsWith("//")&&!/[\\?#\s]/.test(pathname)&&new URL(pathname,"http://localhost").pathname===pathname&&!/[\\?#\x00-\x1f\x7f]/.test(decoded)&&!/%2f/i.test(pathname)&&!decoded.split("/").some(segment=>segment==="."||segment==="..")&&(http2||!value.endsWith("/")&&!value.includes("//"))}catch{return!1}}async function collectDevFunctions({scopes,workPath,files,config,env}){let builders=await importBuilders(new Set(scopes.map(({build})=>build.use)),workPath),unmatched=new Set(Object.entries(config.functions??{}).filter(([,fn2])=>fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta")).map(([pattern])=>pattern)),functions=new Map,schedules=[];for(let scope of scopes){let{build,target}=scope,builder=builders.get(build.use)?.builder;if(!builder)throw dev.DEV_BUILDER_LOAD_FAILED({use:build.use});let scopedConfig=structuredClone({...config,...build.config,functions:build.config?.functions??(build.config?.zeroConfig?{}:config.functions)}),manifest;if(builder.getDevManifest)manifest=await builder.getDevManifest({workPath,build,files,config:scopedConfig,env});else{manifest={functions:[],matchedFunctionPatterns:[]};let mode=build.config??{};if(target!=="builder"||mode.framework||mode.middleware||mode.buildType==="middleware"||mode.buildType==="app"||mode.serviceName||mode.serviceType||mode.buildpack||!build.src||build.src.includes("<"))continue;let pattern=build.src.replace(/^\//,"");for(let sourceFile of files){if(!(sourceFile===pattern||(0,import_minimatch2.default)(sourceFile,pattern,{dot:!0}))||builder.version!==3&&!(builder.version===-1&&mode.zeroConfig&&pattern.startsWith("api/")&&sourceFile.startsWith("api/"))||/(^|\/)package\.json$/.test(sourceFile)||/^(?:src\/)?middleware\.[^/]+$/.test(sourceFile))continue;let extension=posix.extname(sourceFile),outputPath=mode.zeroConfig&&extension?sourceFile.slice(0,-extension.length):sourceFile,{experimentalTriggers}=await(0,import_build_utils7.getLambdaOptionsFromFunction)({sourceFile,config:scopedConfig});manifest.functions.push({outputPath,sourceFile,invocation:{type:"entrypoint",entrypoint:sourceFile},experimentalTriggers});let matched=Object.keys(scopedConfig.functions??{}).find(key=>sourceFile===key||(0,import_minimatch2.default)(sourceFile,key));matched&&manifest.matchedFunctionPatterns.push(matched)}}if(!Array.isArray(manifest?.functions)||!Array.isArray(manifest?.matchedFunctionPatterns)||manifest.matchedFunctionPatterns.some(pattern=>typeof pattern!="string"))throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:build.use});let scheduleError=validateConfig({schedules:manifest.schedules});if(scheduleError)throw scheduleError;for(let fn2 of manifest.functions){if(!validPath(fn2?.outputPath)||fn2.outputPath.endsWith(".func")||fn2.sourceFile!==void 0&&!validPath(fn2.sourceFile)||!fn2.invocation||(fn2.invocation.type==="http"?!validPath(fn2.invocation.pathname,!0):fn2.invocation.type!=="entrypoint"||!validPath(fn2.invocation.entrypoint))||fn2.experimentalTriggers!==void 0&&!Array.isArray(fn2.experimentalTriggers))throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:build.use});if(functions.has(fn2.outputPath))throw dev.DEV_FUNCTION_OUTPUT_DUPLICATE({outputPath:fn2.outputPath});functions.set(fn2.outputPath,{outputPath:fn2.outputPath,sourceFile:fn2.sourceFile,invocation:structuredClone(fn2.invocation),experimentalTriggers:structuredClone(fn2.experimentalTriggers),scope})}schedules.push(...structuredClone(manifest.schedules??[]));for(let pattern of manifest.matchedFunctionPatterns)unmatched.delete(pattern)}return{functions,schedules,unmatchedPatterns:[...unmatched]}}function deriveQueueSubscriptions(registry){let subscriptions=[],ids=new Set;for(let fn2 of registry.functions.values())for(let trigger of fn2.experimentalTriggers??[]){if(!trigger||typeof trigger.type!="string")throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:fn2.scope.build.use});if(trigger.type!=="queue/v2beta")continue;let{consumer,topic,retryAfterSeconds,initialDelaySeconds,maxDeliveries}=trigger;if(typeof consumer!="string"||!consumer||typeof topic!="string"||!topic||[retryAfterSeconds,initialDelaySeconds,maxDeliveries].some(value=>value!==void 0&&(!Number.isFinite(value)||value<0))||retryAfterSeconds!==void 0&&retryAfterSeconds<=0||maxDeliveries!==void 0&&(!Number.isInteger(maxDeliveries)||maxDeliveries<1))throw dev.DEV_FUNCTION_MANIFEST_INVALID({use:fn2.scope.build.use});let id=`${consumer}::${topic}`;if(ids.has(id))throw dev.DEV_QUEUE_CONSUMER_DUPLICATE({consumerGroup:consumer,topic});ids.add(id),subscriptions.push({outputPath:fn2.outputPath,consumer,topic,retryAfterSeconds,initialDelaySeconds,maxDeliveries})}return subscriptions}var import_raw_body=__toESM(require_raw_body(),1),import_local_schedules=__toESM(require_dist9(),1);import{z}from"zod";var identifier=z.string().min(1).max(256).regex(/^[0-9A-Za-z._-]+$/),definition=z.strictObject({expression:z.discriminatedUnion("type",[z.strictObject({type:z.literal("cron"),cron:z.string().min(1)}),z.strictObject({type:z.literal("single"),at:z.string().min(1)})]),timezone:z.string().min(1).max(50).optional(),jitter:z.number().int().min(1).max(15).optional(),target:z.strictObject({type:z.literal("queue"),topic:z.string().regex(/^[A-Za-z0-9_-]+$/)}),payload:z.unknown().optional()}),createBody=definition.extend({name:identifier.optional(),namespace:identifier.optional()}),updateBody=definition.partial().extend({jitter:definition.shape.jitter.nullable()}),scopeQuery=z.object({projectId:z.string().min(1).optional()}),identifierQuery=scopeQuery.extend({namespace:identifier.optional()}),listQuery=identifierQuery.extend({cursor:z.string().min(1).optional(),limit:z.coerce.number().int().min(1).max(100).default(20)}),MAX_PAYLOAD_BYTES=256*1024,MAX_BODY_BYTES=MAX_PAYLOAD_BYTES+16*1024;async function handleSchedulesRequest(broker,projectId,req,res,pathname){let send=(status,data)=>{res.writeHead(status,{"Content-Type":"application/json"}),res.end(JSON.stringify(data))},error2=(status,code,message2)=>send(status,{error:{code,message:message2}});try{let route=/^\/v1\/schedules(?:\/([^/]+)(?:\/(enable|disable|invoke))?)?$/.exec(pathname);if(!route){error2(404,"not_found","Schedule route not found");return}let[,encodedName,action]=route,methods=action?["POST"]:encodedName?["GET","PATCH","DELETE"]:["GET","POST"];if(!methods.includes(req.method||"")){res.setHeader("Allow",methods.join(", ")),error2(405,"method_not_allowed","Method not allowed");return}let query=Object.fromEntries(new URL(req.url||"/","http://localhost").searchParams),parsedQuery=(!encodedName&&req.method==="POST"?scopeQuery:identifierQuery).parse(query);if(parsedQuery.projectId!==void 0&&parsedQuery.projectId!==projectId)throw new import_local_schedules.ScheduleBrokerError("invalid_request","The projectId query parameter must match the local project.");if(!encodedName&&req.method==="GET"){let{namespace,cursor,limit}=listQuery.parse(query);send(200,broker.list({namespace,cursor,limit}));return}if(req.method==="PATCH"||!encodedName&&req.method==="POST"){let body;try{body=JSON.parse(await(0,import_raw_body.default)(req,{limit:MAX_BODY_BYTES,encoding:"utf8"}))}catch(err){let tooLarge=err.statusCode===413;error2(tooLarge?413:400,tooLarge?"payload_too_large":"bad_request",tooLarge?`Schedule request exceeds ${MAX_BODY_BYTES} bytes`:"Expected a JSON object as the request body");return}let parsed=(req.method==="PATCH"?updateBody:createBody).parse(body);if(parsed.payload!==void 0&&Buffer.byteLength(JSON.stringify(parsed.payload))>MAX_PAYLOAD_BYTES){error2(400,"payload_too_large",`Schedule payload exceeds ${MAX_PAYLOAD_BYTES} bytes`);return}encodedName?send(200,broker.update({name:identifier.parse(decodeURIComponent(encodedName)),namespace:identifierQuery.parse(query).namespace},parsed)):send(201,broker.create(createBody.parse(parsed)));return}let id={name:identifier.parse(decodeURIComponent(encodedName)),namespace:identifierQuery.parse(query).namespace};action==="invoke"?(await broker.invoke(id),res.writeHead(204),res.end()):action==="enable"||action==="disable"?send(200,broker[action](id)):req.method==="DELETE"?send(200,broker.delete(id)):send(200,broker.get(id))}catch(err){if(err instanceof z.ZodError)error2(400,"bad_request",err.issues.map(issue=>`${issue.path.join(".")||"request"}: ${issue.message}`).join("; "));else if(err instanceof URIError)error2(400,"bad_request","Invalid encoded schedule name");else if(err instanceof import_local_schedules.ScheduleBrokerError){let status={invalid_request:400,not_found:404,conflict:409,closed:503}[err.code],code={invalid_request:"bad_request",conflict:"schedule_already_exists",closed:"unavailable",not_found:"not_found"}[err.code];error2(status,code,err.message)}else error2(500,"schedule_dispatch_failed",err instanceof Error?err.message:"Failed to dispatch schedule")}}var import_build_utils8=__toESM(require_build_utils(),1);function collectStaticSchedules(authored,registry){let schedules=[...authored??[],...registry.schedules],error2=validateConfig({schedules});if(error2)throw error2;for(let{name,target}of registry.schedules)if("entrypoint"in target)throw new import_build_utils8.NowBuildError({code:"DEV_SCHEDULE_MANIFEST_ENTRYPOINT",message:`Native schedule "${name}" has an unresolved target.entrypoint. The builder's getDevManifest must return a Build Output API target.function or target.topic instead.`});return schedules.sort((a,b)=>a.name.localeCompare(b.name)),schedules.map(({name,expression,timezone,target})=>{if("entrypoint"in target)throw new import_build_utils8.NowBuildError({code:"DEV_SCHEDULE_ENTRYPOINT_UNSUPPORTED",message:`Schedule "${name}" targets entrypoint "${target.entrypoint}", which cannot be resolved by vercel dev. Use target.function with an exact registered build output ID and a sole schedule/v1beta trigger, or target.topic for a queue. A matching sourceFile in getDevManifest is not sufficient to resolve a schedule entrypoint.`});if("function"in target){let fn2=registry.functions.get(target.function);if(!fn2)throw dev.DEV_SCHEDULE_FUNCTION_MISSING({name,outputPath:target.function});if(fn2.experimentalTriggers?.length!==1||fn2.experimentalTriggers[0]?.type!=="schedule/v1beta")throw dev.DEV_SCHEDULE_FUNCTION_TRIGGER({name,outputPath:target.function})}return{name,expression:{type:"cron",cron:expression.cron},jitter:expression.jitter,timezone,target:"function"in target?{type:"function",function:target.function}:"path"in target?{type:"path",path:target.path}:{type:"queue",topic:target.topic}}})}import path3 from"path";function toOrchestratorService(sidecar){let{type:_type,...subscriber}=sidecar;return{...subscriber,schema:"experimentalServices",type:"worker",trigger:"queue"}}async function collectBuilderDevSidecars({builds,workPath,services=[]}){let builderSpecs=new Set(builds.map(build=>build.use)),buildersWithPkgs=await importBuilders(builderSpecs,workPath),servicesByBuilder=new Map(services.map(service=>[service.builder,service])),sidecars=(await Promise.all(builds.map(async build=>{let builder=buildersWithPkgs.get(build.use)?.builder;if(!builder)throw dev.DEV_BUILDER_LOAD_FAILED({use:build.use});let service=servicesByBuilder.get(build),serviceRoot=service?.root??".",sidecars2=await builder.getDevSidecars?.({workPath:path3.join(workPath,serviceRoot),build,...service?{service}:{}})??[];return service?sidecars2.map(sidecar=>({...sidecar,name:`${service.name}-${sidecar.name}`,workspace:serviceRoot})):sidecars2}))).flat(),names=new Set;for(let sidecar of sidecars){let{name,type}=sidecar;if(type!=="subscriber")throw dev.DEV_SIDECAR_UNSUPPORTED_TYPE({name,type});if(names.has(name))throw dev.DEV_SIDECAR_DUPLICATE_NAME({name});names.add(name)}return sidecars}function nodeHeadersToFetchHeaders(nodeHeaders){let headers=new globalThis.Headers;for(let[name,value]of Object.entries(nodeHeaders))if(Array.isArray(value))for(let val of value)headers.append(name,val);else typeof value<"u"&&headers.set(name,String(value));return headers}var NEVER_COMBINE_RESPONSE_HEADERS=new Set(["set-cookie","www-authenticate","proxy-authenticate"]),COMMA_JOIN_RESPONSE_HEADERS=new Set(["vary"]);function applyChainResponseHeader(res,name,value){if(NEVER_COMBINE_RESPONSE_HEADERS.has(name)){let existing=res.getHeader(name),values=Array.isArray(existing)?existing.map(String):existing!==void 0?[String(existing)]:[];values.push(value),res.setHeader(name,values);return}if(COMMA_JOIN_RESPONSE_HEADERS.has(name)){let existing=res.getHeader(name);res.setHeader(name,existing!==void 0?`${existing}, ${value}`:value);return}res.setHeader(name,value)}var NONOVERRIDABLE_HEADERS=new Set(["host","connection","content-length","transfer-encoding","keep-alive","transfer-encoding","te","upgrade","trailer"]);function applyOverriddenHeaders(reqHeaders,respHeaders){let headers=new globalThis.Headers(respHeaders),overriddenHeaders=headers.get("x-middleware-override-headers");if(!overriddenHeaders)return headers;let overriddenKeys=new Set;for(let key of overriddenHeaders.split(","))overriddenKeys.add(key.trim());headers.delete("x-middleware-override-headers");for(let key of Object.keys(reqHeaders))!NONOVERRIDABLE_HEADERS.has(key)&&!overriddenKeys.has(key)&&delete reqHeaders[key];for(let key of overriddenKeys.keys()){if(NONOVERRIDABLE_HEADERS.has(key))continue;let valueKey="x-middleware-request-"+key,newValue=headers.get(valueKey);reqHeaders[key]!==newValue&&(newValue?reqHeaders[key]=newValue:delete reqHeaders[key]),headers.delete(valueKey)}return headers}var import_error_utils=__toESM(require_dist(),1);import{parse}from"url";function parseListen(str,defaultPort=3e3){let port=Number(str);if(!isNaN(port))return[port];let url4=parse(str);switch(url4.protocol){case"pipe:":{let cutStr=str.replace(/^pipe:/,"");if(cutStr.slice(0,4)!=="\\\\.\\")throw dev.DEV_INVALID_WINDOWS_PIPE({endpoint:str});return[cutStr]}case"unix:":if(!url4.pathname)throw dev.DEV_INVALID_UNIX_SOCKET({endpoint:str});return[url4.pathname];case"tcp:":return url4.port=url4.port||String(defaultPort),[parseInt(url4.port,10),url4.hostname??void 0];default:if(!url4.slashes){if(url4.protocol===null)return[defaultPort,url4.pathname??void 0];if(port=Number(url4.hostname),url4.protocol&&!isNaN(port))return[port,url4.protocol.substring(0,url4.protocol.length-1)]}throw dev.DEV_INVALID_LISTEN_SCHEME({protocol:url4.protocol})}}function replaceLocalhost(address){return address.replace("[::]","localhost").replace("0.0.0.0","localhost")}import{lstat,readdir,readFile,stat}from"node:fs/promises";import{extname,isAbsolute as isAbsolute2,join as join3,relative as relative3,resolve}from"node:path";import{parse as parseUrl}from"node:url";var MAX_REDIRECTS=1e6,MAX_FILES=100,MAX_URL_LENGTH=2048,VALID_STATUS_CODES=new Set([301,302,303,307,308]),SUPPORTED_EXTENSIONS=new Set([".csv",".json",".jsonl"]),BulkRedirectTable=class{constructor(){this.caseSensitiveByHostPath=new Map;this.caseInsensitiveByHostPath=new Map;this.caseSensitiveByPath=new Map;this.caseInsensitiveByPath=new Map}get size(){return this.caseSensitiveByHostPath.size+this.caseInsensitiveByHostPath.size+this.caseSensitiveByPath.size+this.caseInsensitiveByPath.size}add(redirect2){let{host,pathname}=parseSource(redirect2.source),stored={destination:redirect2.destination,statusCode:redirect2.statusCode,preserveQueryParams:redirect2.preserveQueryParams};if(host){let key=hostPathKey(host,pathname);redirect2.caseSensitive?this.caseSensitiveByHostPath.set(key,stored):this.caseInsensitiveByHostPath.set(key.toLowerCase(),stored);return}redirect2.caseSensitive?this.caseSensitiveByPath.set(pathname,stored):this.caseInsensitiveByPath.set(pathname.toLowerCase(),stored)}lookup(pathname,host){let hostname=host?hostnameFromHostHeader(host):"";if(hostname){let hostKey=hostPathKey(hostname,pathname),hostMatch=this.caseSensitiveByHostPath.get(hostKey)||this.caseInsensitiveByHostPath.get(hostKey.toLowerCase());if(hostMatch)return hostMatch}return this.caseSensitiveByPath.get(pathname)||this.caseInsensitiveByPath.get(pathname.toLowerCase())}};async function getBulkRedirectsSignature(cwd,bulkRedirectsPath){if(!bulkRedirectsPath)return"";let resolved=resolveBulkRedirectsPath(cwd,bulkRedirectsPath);if(!resolved)return`invalid:${bulkRedirectsPath}`;try{let stats=await stat(resolved);if(stats.isFile())return`file:${resolved}:${stats.mtimeMs}:${stats.size}`;if(!stats.isDirectory())return`other:${resolved}:${stats.mtimeMs}`;let files=await listRedirectFiles(resolved),parts=await Promise.all(files.map(async file=>{try{let fileStats=await stat(file);return`${file}:${fileStats.mtimeMs}:${fileStats.size}`}catch{return`${file}:missing`}}));return`dir:${resolved}:${parts.join("|")}`}catch{return`missing:${resolved}`}}async function loadBulkRedirects(cwd,bulkRedirectsPath){let warnings=[],table=new BulkRedirectTable,resolved=resolveBulkRedirectsPath(cwd,bulkRedirectsPath);if(!resolved)return warnings.push(`Skipping bulk redirects path "${bulkRedirectsPath}" because it resolves outside the project directory.`),{table,redirectCount:0,fileCount:0,warnings};let files;try{let stats=await stat(resolved);if(stats.isDirectory())files=await listRedirectFiles(resolved),files.length>MAX_FILES&&(warnings.push(`Bulk redirects directory "${bulkRedirectsPath}" has ${files.length} files; only the first ${MAX_FILES} will be used.`),files=files.slice(0,MAX_FILES));else if(stats.isFile()){let ext=extname(resolved).toLowerCase();if(!SUPPORTED_EXTENSIONS.has(ext))return warnings.push(`Bulk redirects file "${bulkRedirectsPath}" must be a .csv, .json, or .jsonl file.`),{table,redirectCount:0,fileCount:0,warnings};files=[resolved]}else return warnings.push(`Bulk redirects path "${bulkRedirectsPath}" is not a file or directory.`),{table,redirectCount:0,fileCount:0,warnings}}catch(err){if(isNotFound(err))return warnings.push(`Bulk redirects path "${bulkRedirectsPath}" was not found.`),{table,redirectCount:0,fileCount:0,warnings};throw err}let redirectCount=0;for(let file of files){if(redirectCount>=MAX_REDIRECTS){warnings.push(`Bulk redirects limit of ${MAX_REDIRECTS} reached; remaining entries were skipped.`);break}let remaining=MAX_REDIRECTS-redirectCount,parsed=await parseRedirectFile(file,remaining,warnings,cwd);for(let redirect2 of parsed)table.add(redirect2),redirectCount++}let duplicateCount=redirectCount-table.size;return duplicateCount>0&&warnings.push(`Bulk redirects contain ${duplicateCount} duplicate ${duplicateCount===1?"source":"sources"}; the last occurrence wins.`),{table,redirectCount,fileCount:files.length,warnings}}function resolveBulkRedirect(table,reqUrl,host){let parsed=parseUrl(reqUrl),match=table.lookup(parsed.pathname||"/",host);if(!match)return;let location=match.destination;return match.preserveQueryParams&&parsed.search&&(location=appendQueryParams(location,parsed.search)),{location,statusCode:match.statusCode}}function appendQueryParams(destination,search){let query=search.startsWith("?")?search.slice(1):search;return query?destination.includes("?")?`${destination}&${query}`:`${destination}?${query}`:destination}function resolveBulkRedirectsPath(cwd,bulkRedirectsPath){let projectRoot=resolve(cwd),resolved=resolve(projectRoot,bulkRedirectsPath),relativeFromRoot=relative3(projectRoot,resolved);return relativeFromRoot.startsWith("..")||isAbsolute2(relativeFromRoot)?null:resolved}async function listRedirectFiles(dir){let files=[];return await walk(dir,files),files.sort(),files}async function walk(dir,files){let entries=await readdir(dir);for(let entry of entries){let fullPath=join3(dir,entry),stats=await lstat(fullPath);stats.isDirectory()?await walk(fullPath,files):stats.isFile()&&SUPPORTED_EXTENSIONS.has(extname(fullPath).toLowerCase())&&files.push(fullPath)}}async function parseRedirectFile(file,remaining,warnings,cwd){let rel=relative3(cwd,file)||file,ext=extname(file).toLowerCase(),content;try{content=stripBom(await readFile(file,"utf8"))}catch(err){return warnings.push(`Failed to read bulk redirects file "${rel}": ${errorMessage(err)}`),[]}try{return ext===".csv"?parseCsvRedirects(content,remaining,warnings,rel):ext===".jsonl"?parseJsonlRedirects(content,remaining,warnings,rel):parseJsonRedirects(content,remaining,warnings,rel)}catch(err){return warnings.push(`Failed to parse bulk redirects file "${rel}": ${errorMessage(err)}`),[]}}function parseJsonRedirects(content,remaining,warnings,rel){let parsed=JSON.parse(content);return Array.isArray(parsed)?normalizeRedirects(parsed,remaining,warnings,rel):(warnings.push(`Bulk redirects file "${rel}" must contain a JSON array of redirects.`),[])}function parseJsonlRedirects(content,remaining,warnings,rel){let rows=[],lines=content.split(/\r?\n/);for(let i=0;i<lines.length;i++){let line=lines[i].trim();if(line)try{rows.push(JSON.parse(line))}catch{warnings.push(`Skipping invalid JSONL in "${rel}" at line ${i+1}.`)}}return normalizeRedirects(rows,remaining,warnings,rel)}var CSV_HEADER_ALIASES={source:"source",destination:"destination",permanent:"permanent",statuscode:"statusCode",casesensitive:"caseSensitive",preservequeryparams:"preserveQueryParams"};function parseCsvRedirects(content,remaining,warnings,rel){let lines=content.split(/\r?\n/).filter(line=>line.trim().length>0);if(lines.length===0)return warnings.push(`Bulk redirects CSV "${rel}" is empty.`),[];let headers=parseCsvLine(lines[0]).map(header=>CSV_HEADER_ALIASES[header.trim().toLowerCase()]);if(!headers.includes("source")||!headers.includes("destination"))return warnings.push(`Bulk redirects CSV "${rel}" must have "source" and "destination" columns.`),[];let rows=[];for(let i=1;i<lines.length;i++){let values=parseCsvLine(lines[i]),row={};for(let col=0;col<headers.length;col++){let header=headers[col];header&&(row[header]=values[col]??"")}rows.push(row)}return normalizeRedirects(rows,remaining,warnings,rel)}function normalizeRedirects(rows,remaining,warnings,rel){let redirects=[];for(let i=0;i<rows.length;i++){if(redirects.length>=remaining){warnings.push(`Bulk redirects limit of ${MAX_REDIRECTS} reached while reading "${rel}"; remaining entries were skipped.`);break}let row=rows[i];if(!row||typeof row!="object"){warnings.push(`Skipping invalid redirect in "${rel}" at index ${i}.`);continue}let record=row,source=asTrimmedString(record.source),destination=asTrimmedString(record.destination);if(!source||!destination){warnings.push(`Skipping redirect in "${rel}" at index ${i}: source and destination are required.`);continue}if(source.length>MAX_URL_LENGTH||destination.length>MAX_URL_LENGTH){warnings.push(`Skipping redirect in "${rel}" at index ${i}: source and destination must be at most ${MAX_URL_LENGTH} characters.`);continue}let statusCode;if(record.statusCode!==void 0&&record.statusCode!==""){let parsedStatus=parseStatusCode(record.statusCode);if(parsedStatus===void 0){warnings.push(`Skipping redirect in "${rel}" at index ${i}: statusCode must be one of ${[...VALID_STATUS_CODES].join(", ")}.`);continue}statusCode=parsedStatus}else statusCode=parseBoolean(record.permanent)??!1?308:307;redirects.push({source,destination,statusCode,caseSensitive:parseBoolean(record.caseSensitive)??!1,preserveQueryParams:parseBoolean(record.preserveQueryParams)??!1})}return redirects}function parseSource(source){if(/^https?:\/\//i.test(source))try{let parsed=new URL(source);return{host:parsed.hostname.toLowerCase(),pathname:parsed.pathname||"/"}}catch{return{host:null,pathname:source}}return{host:null,pathname:source||"/"}}function hostPathKey(host,pathname){return`${host}\0${pathname}`}function hostnameFromHostHeader(hostHeader){let trimmed=hostHeader.trim();if(!trimmed)return"";if(trimmed.startsWith("[")){let end=trimmed.indexOf("]");return end===-1?trimmed.toLowerCase():trimmed.slice(1,end).toLowerCase()}let colon=trimmed.lastIndexOf(":");return colon!==-1&&trimmed.indexOf(":")===colon?trimmed.slice(0,colon).toLowerCase():trimmed.toLowerCase()}function parseBoolean(value){if(typeof value=="boolean")return value;if(typeof value=="number")return value===1?!0:value===0?!1:void 0;if(typeof value!="string")return;let normalized=value.trim().toLowerCase();if(normalized==="t"||normalized==="true")return!0;if(normalized==="f"||normalized==="false")return!1}function parseStatusCode(value){let n=typeof value=="number"?value:typeof value=="string"?Number(value.trim()):NaN;return VALID_STATUS_CODES.has(n)?n:void 0}function asTrimmedString(value){if(typeof value!="string")return;let trimmed=value.trim();return trimmed||void 0}function parseCsvLine(line){let fields=[],current="",inQuotes=!1;for(let i=0;i<line.length;i++){let char=line[i];inQuotes?char==='"'?line[i+1]==='"'?(current+='"',i++):inQuotes=!1:current+=char:char==='"'?inQuotes=!0:char===","?(fields.push(current),current=""):current+=char}return fields.push(current),fields}function stripBom(content){return content.charCodeAt(0)===65279?content.slice(1):content}function isNotFound(err){return typeof err=="object"&&err!==null&&"code"in err&&err.code==="ENOENT"}function errorMessage(err){return err instanceof Error?err.message:String(err)}var DEV_SERVER_PORT_BIND_TIMEOUT=(0,import_ms6.default)("5m"),DEV_QUEUES_DEFAULT_VISIBILITY_TIMEOUT_SECONDS=60,DEV_RUNTIME_CACHE_MAX_ITEM_SIZE=2*1024*1024,DEV_RUNTIME_CACHE_ONE_YEAR_SECONDS=31536e3,frameworkRuntimeSet=new Set(import_frameworks3.frameworkList.map(f=>f.useRuntime?.use||"@vercel/static-build"));function isApiDirBuild(build){let src=build.src?.replace(/^\.\//,"");return typeof src=="string"&&src.startsWith("api/")}function sortBuilders(buildA,buildB){return buildA&&buildA.use&&(0,import_fs_detectors2.isOfficialRuntime)("static-build",buildA.use)?1:buildB&&buildB.use&&(0,import_fs_detectors2.isOfficialRuntime)("static-build",buildB.use)?-1:0}var DevServer=class{constructor(cwd,options){this.initialDevCommandStarted=!1;this.devCommandStarts=new Set;this.functionDispatchReady=!1;this.functionReconciliations=0;this.configGeneration=0;this.unmatchedQueuePatterns=new Set;this.functionRegistry={functions:new Map,schedules:[],unmatchedPatterns:[]};this.responseTransformsByReq=new WeakMap;this.shouldBuildInDev=build=>{if(!this.shouldUseServicesOrchestrator()&&isApiDirBuild(build))return!0;let{name}=(0,import_npm_package_arg.default)(build.use);return!frameworkRuntimeSet.has(name||"")};this.clearVercelConfigPromise=()=>{this.getVercelConfigPromise=null};this.getExtensionlessFile=path6=>{let ext=extname2(path6);return this.apiDir&&path6.startsWith(this.apiDir+"/")&&this.apiExtensions.has(ext)?path6.slice(0,-ext.length):null};this.devServerHandler=async(req,res)=>{if(await this.handleSchedulesProxyRequest(req,res))return;await this.startPromise;let requestId=generateRequestId(this.podId);if(this.stopping){res.setHeader("Connection","close"),await this.send404(req,res,requestId);return}let method=req.method||"GET";output_manager_default.debug(`${import_chalk2.default.bold(method)} ${req.url}`);try{let vercelConfig=await this.getVercelConfig();await this.serveProjectAsNowV2(req,res,requestId,vercelConfig)}catch(err){console.error(err),(0,import_error_utils.isError)(err)&&typeof err.stack=="string"&&output_manager_default.debug(err.stack),res.finished||(res.statusCode=500,res.end((0,import_error_utils.errorToString)(err)))}};this.handleSchedulesRoute=async(req,res,pathname)=>{if(this.stopping){res.writeHead(503),res.end("Local Schedules is stopping");return}await handleSchedulesRequest(this.scheduleBroker,this.projectId??"prj_local",req,res,pathname)};this.exitWithStatus=async(match,routeResult,phase,req,res,requestId,responseTransforms)=>{let{status,headers,dest}=routeResult,location=headers.location||dest;if(status&&location&&300<=status&&status<=399)return output_manager_default.debug(`Route found with redirect status code ${status}`),await this.sendRedirect(req,res,requestId,location,status,responseTransforms),!0;if(!match&&status&&phase!=="miss"){if(routeResult.userDest)return!1;output_manager_default.debug(`Route found with with status code ${status}`);let errorHeaders={...headers};return responseTransforms&&applyResponseTransforms(errorHeaders,responseTransforms),await this.sendError(req,res,requestId,"",status,errorHeaders),!0}return!1};this.handleQueuesRoute=async(req,res,pathname)=>{if(!this.queueBroker){res.writeHead(503),res.end("Queues broker not initialized");return}if(!pathname.startsWith(DEV_QUEUE_API_PREFIX)){res.writeHead(404),res.end("Not Found");return}let topicPath=pathname.slice(DEV_QUEUE_API_PREFIX.length),sendMatch=topicPath.match(/^([A-Za-z0-9_-]+)$/);if(req.method==="POST"&&sendMatch){let topic=sendMatch[1],contentType2=req.headers["content-type"]||"application/json",payload=await(0,import_raw_body2.default)(req),retentionHeader=req.headers["vqs-retention-seconds"],retentionSeconds=retentionHeader&&!isNaN(parseInt(retentionHeader,10))?parseInt(retentionHeader,10):void 0,delayHeader=req.headers["vqs-delay-seconds"],delaySeconds=delayHeader&&!isNaN(parseInt(delayHeader,10))?parseInt(delayHeader,10):void 0,idempotencyKey=req.headers["vqs-idempotency-key"],{messageId}=this.queueBroker.enqueue(topic,payload,contentType2,{retentionSeconds,delaySeconds,idempotencyKey});res.writeHead(201,{"Content-Type":"application/json","Vqs-Message-Id":messageId}),res.end(JSON.stringify({messageId}));return}let receiveByIdMatch=topicPath.match(/^([A-Za-z0-9_-]+)\/consumer\/([A-Za-z0-9_-]+)\/id\/([^/]+)$/);if(req.method==="POST"&&receiveByIdMatch){let[,queueName,consumer,messageId]=receiveByIdMatch,originalMessageId=this.queueBroker.getOriginalMessageIdForDuplicate(queueName,messageId);if(originalMessageId){res.writeHead(409,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"This messageId was a duplicate - use originalMessageId instead",originalMessageId}));return}let result=this.queueBroker.receiveById(queueName,messageId,consumer);if(!result){res.writeHead(404),res.end("Message not found");return}let boundary=`----vcdevboundary${randomBytes2(8).toString("hex")}`,partHeaders=[`Vqs-Message-Id: ${messageId}`,`Vqs-Delivery-Count: ${result.deliveryCount}`,`Vqs-Timestamp: ${result.createdAt}`,`Vqs-Receipt-Handle: ${result.receiptHandle}`,`Content-Type: ${result.contentType}`].join(`\r
|
|
42
42
|
`),body=Buffer.concat([Uint8Array.from(Buffer.from(`--${boundary}\r
|
|
43
43
|
${partHeaders}\r
|
|
44
44
|
\r
|
|
@@ -52,7 +52,7 @@ ${partHeaders}\r
|
|
|
52
52
|
`)))}parts.push(Uint8Array.from(Buffer.from(`--${boundary}--\r
|
|
53
53
|
`)));let body=Buffer.concat(parts);res.writeHead(200,{"Content-Type":`multipart/mixed; boundary=${boundary}`,"Content-Length":body.length}),res.end(body);return}let leaseMatch=topicPath.match(/^([A-Za-z0-9_-]+)\/consumer\/([A-Za-z0-9_-]+)\/lease\/([^/]+)(?:\/visibility)?$/);if(leaseMatch&&(req.method==="DELETE"||req.method==="PATCH")){let[,,consumer,receiptHandle]=leaseMatch,messageId=this.queueBroker.findMessageIdByReceiptHandle(consumer,receiptHandle);if(!messageId){res.writeHead(404,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"Message not found"}));return}if(req.method==="DELETE"){this.queueBroker.acknowledge(messageId,consumer,receiptHandle),res.writeHead(204),res.end();return}let body=await(0,import_raw_body2.default)(req),timeoutSeconds=DEV_QUEUES_DEFAULT_VISIBILITY_TIMEOUT_SECONDS;try{let parsed=JSON.parse(body.toString());typeof parsed.visibilityTimeoutSeconds=="number"&&parsed.visibilityTimeoutSeconds>=0&&(timeoutSeconds=parsed.visibilityTimeoutSeconds)}catch(err){output_manager_default.debug(`queues: failed to parse visibility timeout body: ${err}`)}this.queueBroker.changeVisibility(messageId,consumer,receiptHandle,timeoutSeconds),res.writeHead(200,{"Content-Type":"application/json"}),res.end(JSON.stringify({success:!0}));return}res.writeHead(404),res.end("Not Found")};this.handleRuntimeCacheRoute=async(req,res,pathname)=>{let store=this.runtimeCache;if(!store){res.writeHead(503),res.end("Runtime Cache not initialized");return}if(!pathname.startsWith(DEV_RUNTIME_CACHE_API_PREFIX)){res.writeHead(404),res.end("Not Found");return}let itemPath=pathname.slice(DEV_RUNTIME_CACHE_API_PREFIX.length),searchParams=new URL2(req.url||"/","http://localhost").searchParams;if(itemPath==="revalidate"){if(req.method!=="POST"){res.writeHead(405),res.end("Method Not Allowed");return}let tags=(searchParams.get("tags")||"").split(",").map(tag=>tag.trim()).filter(Boolean),itemId=searchParams.get("itemId")||void 0;if(tags.length===0&&!itemId){res.writeHead(400,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"No tags or itemId provided"}));return}tags.length>0&&(store.expireTags(tags),output_manager_default.debug(`runtime cache: expired tags "${tags.join(",")}"`)),itemId&&(store.delete(itemId),output_manager_default.debug(`runtime cache: expired item "${itemId}"`)),res.writeHead(200,{"Content-Type":"application/json"}),res.end(JSON.stringify({revalidated:!0}));return}let key;try{key=decodeURIComponent(itemPath)}catch{res.writeHead(400,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"Invalid cache key"}));return}if(!key){res.writeHead(404),res.end("Not Found");return}if(req.method==="GET"){let hit=store.get(key);if(!hit){output_manager_default.debug(`runtime cache: MISS "${key}"`),res.writeHead(404),res.end("Not Found");return}output_manager_default.debug(`runtime cache: HIT "${key}"`);let headers={"Content-Type":"application/json","Content-Length":hit.value.length,[HEADER_CACHE_STATE]:"fresh",Age:String(hit.ageSeconds)};hit.tags.length>0&&(headers[HEADER_CACHE_TAGS]=hit.tags.join(",")),res.writeHead(200,headers),res.end(hit.value);return}if(req.method==="POST"){let revalidateHeader=req.headers[HEADER_REVALIDATE],ttlSeconds;if(revalidateHeader)if(revalidateHeader==="Infinity"||["false","False","FALSE","f","F"].includes(revalidateHeader))ttlSeconds=DEV_RUNTIME_CACHE_ONE_YEAR_SECONDS;else if(/^[+-]?\d+$/.test(revalidateHeader)){let parsedRevalidate=Number(revalidateHeader);if(!Number.isSafeInteger(parsedRevalidate)||parsedRevalidate<0){res.writeHead(400,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"Invalid revalidate value"}));return}if(parsedRevalidate===0){res.writeHead(200,{"Content-Type":"application/json"}),res.end(JSON.stringify({success:!0}));return}ttlSeconds=parsedRevalidate}else{res.writeHead(400,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"Invalid revalidate value"}));return}let value;try{value=await(0,import_raw_body2.default)(req,{limit:DEV_RUNTIME_CACHE_MAX_ITEM_SIZE})}catch(err){if(err.statusCode===413){res.writeHead(413,{"Content-Type":"application/json"}),res.end(JSON.stringify({error:"Cache item is too large"}));return}throw err}let tagsHeader=req.headers[HEADER_CACHE_TAGS];store.set(key,value,{ttlSeconds,tags:(tagsHeader||"").split(",").map(tag=>tag.trim()).filter(Boolean)});let name=req.headers[HEADER_CACHE_ITEM_NAME];output_manager_default.debug(`runtime cache: SET "${key}"${name?` (${name})`:""} ${value.length} bytes`),res.writeHead(200,{"Content-Type":"application/json"}),res.end(JSON.stringify({success:!0}));return}if(req.method==="DELETE"){store.delete(key),output_manager_default.debug(`runtime cache: DELETE "${key}"`),res.writeHead(200,{"Content-Type":"application/json"}),res.end(JSON.stringify({success:!0}));return}res.writeHead(405),res.end("Method Not Allowed")};this.serveProjectAsNowV2=async(req,res,requestId,vercelConfig,routes=vercelConfig.routes,callLevel=0)=>{let{debug}=output_manager_default;if(callLevel===0&&await this.handleSchedulesProxyRequest(req,res))return;let parsed=url3.parse(req.url||"/");if(typeof parsed.pathname=="string"&&parsed.pathname.includes("//")){let location=parsed.pathname.replace(/\/+/g,"/");if(parsed.search&&(location+=parsed.search),req.method==="GET"){await this.sendRedirect(req,res,requestId,location,301);return}debug(`Rewriting URL from "${req.url}" to "${location}"`),req.url=location}let queueProxyPrefix=`${DEV_QUEUE_PROXY_PREFIX}/${this.resourceProxyToken}`,runtimeCacheProxyPrefix=`${DEV_RUNTIME_CACHE_PREFIX}${this.resourceProxyToken}`;if(callLevel===0&&this.queueBroker){let pathname=parsed.pathname||"/";if(pathname.startsWith(`${queueProxyPrefix}/`)){if(!this.isAuthorizedResourceRequest(req,DEV_RESOURCE_TOKEN)){res.writeHead(401,{"WWW-Authenticate":"Bearer"}),res.end("Unauthorized");return}await this.handleQueuesRoute(req,res,pathname.slice(queueProxyPrefix.length));return}}if(callLevel===0){let pathname=parsed.pathname||"/";if(pathname.startsWith(`${runtimeCacheProxyPrefix}/`)){if(!this.isAuthorizedResourceRequest(req,DEV_RESOURCE_TOKEN)){res.writeHead(401,{"WWW-Authenticate":"Bearer"}),res.end("Unauthorized");return}await this.handleRuntimeCacheRoute(req,res,pathname.slice(runtimeCacheProxyPrefix.length));return}}if(callLevel===0&&this.bulkRedirects){let bulkMatch=resolveBulkRedirect(this.bulkRedirects,req.url||"/",typeof req.headers.host=="string"?req.headers.host:void 0);if(bulkMatch){debug(`Bulk redirect ${bulkMatch.statusCode}: ${req.url} -> ${bulkMatch.location}`),await this.sendRedirect(req,res,requestId,bulkMatch.location,bulkMatch.statusCode);return}}if(callLevel===0&&this.orchestrator){let pathname=parsed.pathname||"/",service=this.orchestrator.getServiceForRoute(pathname);if(service){debug(`Found service: ${service.name}`);let upstream=`http://${service.host}:${service.port}`;debug(`Proxying to service "${service.name}": ${upstream}`);let headers2=this.getProxyHeaders(req,requestId,!1);for(let[name,value]of Object.entries(headers2))req.headers[name]=value;return this.setResponseHeaders(res,requestId),proxyPass(req,res,upstream,this,requestId,!1)}}callLevel===0&&await this.updateBuildMatches(vercelConfig),this.blockingBuildsPromise&&(debug("Waiting for builds to complete before handling request"),await this.blockingBuildsPromise);let getReqUrl=rr=>{if(rr.dest){if(rr.query){let destParsed=url3.parse(rr.dest),destQuery=parseQueryString(destParsed.search);return Object.assign(destQuery,rr.query),destParsed.search=formatQueryString(destQuery),url3.format(destParsed)}return rr.dest}return req.url},handleMap=getRoutesTypes(routes),missRoutes=handleMap.get("miss")||[],hitRoutes=handleMap.get("hit")||[],errorRoutes=handleMap.get("error")||[],filesystemRoutes=handleMap.get("filesystem")||[],phases=[null,"filesystem"],routeResult=null,match=null,statusCode,prevUrl=req.url,prevHeaders={},requestTransforms=[],responseTransforms,middlewares=[...this.buildMatches.values()].filter(m=>m.config?.middleware===!0);for(let middleware of middlewares){let startMiddlewareResult,middlewarePid,{envConfigs,files,devCacheDir,cwd:workPath}=this;try{let{builder:builder2}=middleware.builderWithPkg;if(typeof builder2.startDevServer=="function"&&(startMiddlewareResult=await builder2.startDevServer({files,entrypoint:middleware.entrypoint,workPath,repoRootPath:this.repoRoot,config:{projectSettings:this.projectSettings,...middleware.config},meta:{isDev:!0,...this.getDevResourceMeta(),devCacheDir,requestUrl:req.url,env:this.getBuilderDevEnv(middleware,envConfigs.runEnv),buildEnv:{...envConfigs.buildEnv}}})),startMiddlewareResult){let{port,pid,shutdown}=startMiddlewareResult;middlewarePid=pid,this.shutdownCallbacks.set(pid,shutdown),debug(`Invoking middleware "${middleware.src}" (port=${port})`);let middlewareReqHeaders=nodeHeadersToFetchHeaders(req.headers),proxyHeaders=this.getProxyHeaders(req,requestId,!0);for(let[name,value]of nodeHeadersToFetchHeaders(proxyHeaders))middlewareReqHeaders.set(name,value);let middlewareReqPath=url3.parse(req.url||"/").path||"/",middlewareRes=await directFetch(`http://127.0.0.1:${port}${middlewareReqPath}`,{headers:middlewareReqHeaders,method:req.method,redirect:"manual"}),middlewareBody=Buffer.from(await middlewareRes.arrayBuffer());if(middlewareRes.status===500&&middlewareBody.byteLength===0){await this.sendError(req,res,requestId,"EDGE_FUNCTION_INVOCATION_FAILED",500);return}res.statusCode=middlewareRes.status;let rewritePath="",contentType2="",shouldContinue=!1,skipMiddlewareHeaders=new Set(["date","connection","content-length","transfer-encoding"]),middlewareHeaders=applyOverriddenHeaders(req.headers,middlewareRes.headers);for(let[name,value]of middlewareHeaders)name==="x-middleware-next"?shouldContinue=value==="1":name==="x-middleware-rewrite"?(rewritePath=value,shouldContinue=!0):name==="content-type"?contentType2=value:skipMiddlewareHeaders.has(name)||(applyChainResponseHeader(res,name,value),req.headers[name]=value);if(!shouldContinue){this.setResponseHeaders(res,requestId),middlewareBody.length>0?(res.setHeader("content-length",middlewareBody.length),contentType2&&res.setHeader("content-type",contentType2),res.end(middlewareBody)):res.end();return}if(rewritePath){debug(`Detected rewrite path from middleware: "${rewritePath}"`),prevUrl=rewritePath;let beforeRewriteUrl=req.url||"/";if(isURL(rewritePath)){let rewriteUrlParsed=new URL2(rewritePath);if(this.address.origin===rewriteUrlParsed.origin)req.url=rewritePath.slice(rewriteUrlParsed.origin.length)||"/",prevUrl=req.url;else{debug(`ProxyPass: ${rewritePath}`),this.setResponseHeaders(res,requestId),proxyPass(req,res,rewritePath,this,requestId);return}}else{let rewriteUrlParsed=url3.parse(beforeRewriteUrl);rewriteUrlParsed.search=url3.parse(rewritePath).search,req.url=url3.format(rewriteUrlParsed)}debug(`Rewrote incoming HTTP URL from "${beforeRewriteUrl}" to "${req.url}"`)}}}catch(err){(0,import_error_utils.isSpawnError)(err)&&err.code==="ENOENT"&&(err.message=`Command not found: ${import_chalk2.default.cyan(err.path,...err.spawnargs)}
|
|
54
54
|
Please ensure that ${cmd(err.path)} is properly installed`,err.link="https://vercel.link/command-not-found"),output_manager_default.prettyError(err),await this.sendError(req,res,requestId,"MIDDLEWARE_INVOCATION_FAILED",500);return}finally{middlewarePid&&this.killBuilderDevServer(middlewarePid)}}for(let phase of phases){statusCode=void 0;let phaseRoutes=handleMap.get(phase)||[];if(routeResult=await devRouter(prevUrl,req.method,phaseRoutes,this,vercelConfig,prevHeaders,missRoutes,phase),routeResult.requestTransforms&&requestTransforms.push(...routeResult.requestTransforms),routeResult.responseTransforms&&(responseTransforms=routeResult.responseTransforms),routeResult.continue&&(routeResult.dest&&(prevUrl=getReqUrl(routeResult)),routeResult.headers&&(prevHeaders=routeResult.headers)),callLevel===0&&this.orchestrator&&!routeResult.continue&&isServiceDestination(routeResult.matched_route))return this.delegateToService(req,res,requestId,routeResult.matched_route,vercelConfig,requestTransforms,responseTransforms);if(routeResult.isDestUrl){let destParsed=url3.parse(routeResult.dest),destQuery=parseQueryString(destParsed.search);Object.assign(destQuery,routeResult.query),destParsed.search=formatQueryString(destQuery);let destUrl=url3.format(destParsed);return this.prepareTransforms(req,requestTransforms,responseTransforms),debug(`ProxyPass: ${destUrl}`),this.setResponseHeaders(res,requestId),proxyPass(req,res,destUrl,this,requestId)}if(match=await findBuildMatch(this.buildMatches,this.files,routeResult.dest,this,vercelConfig),await this.exitWithStatus(match,routeResult,phase,req,res,requestId,responseTransforms))return;if(!match&&missRoutes.length>0){if(routeResult=await devRouter(getReqUrl(routeResult),req.method,missRoutes,this,vercelConfig,routeResult.headers,[],"miss"),routeResult.requestTransforms&&requestTransforms.push(...routeResult.requestTransforms),routeResult.responseTransforms&&(responseTransforms=routeResult.responseTransforms),match=await findBuildMatch(this.buildMatches,this.files,routeResult.dest,this,vercelConfig),await this.exitWithStatus(match,routeResult,phase,req,res,requestId,responseTransforms))return}else if(match&&hitRoutes.length>0){let prevStatus=routeResult.status;routeResult=await devRouter(getReqUrl(routeResult),req.method,hitRoutes,this,vercelConfig,routeResult.headers,[],"hit"),routeResult.status=prevStatus,routeResult.requestTransforms&&requestTransforms.push(...routeResult.requestTransforms),routeResult.responseTransforms&&(responseTransforms=routeResult.responseTransforms)}if(statusCode=routeResult.status,match||phase===null&&filesystemRoutes.length===0)break}if(!match&&routeResult&&errorRoutes.length>0){let routeResultForError=await devRouter(getReqUrl(routeResult),req.method,errorRoutes,this,vercelConfig,routeResult.headers,[],"error"),{matched_route}=routeResultForError,matchForError=await findBuildMatch(this.buildMatches,this.files,routeResultForError.dest,this,vercelConfig);if(matchForError)debug("Route match detected in error phase, breaking loop"),routeResult=routeResultForError,statusCode=routeResultForError.status,match=matchForError,routeResult.requestTransforms&&requestTransforms.push(...routeResult.requestTransforms),routeResult.responseTransforms&&(responseTransforms=routeResult.responseTransforms);else if(matched_route&&matched_route.src&&!matched_route.dest&&(debug("Route without `dest` detected in error phase, attempting to exit early"),await this.exitWithStatus(matchForError,routeResultForError,"error",req,res,requestId,responseTransforms)))return}if(!routeResult)throw dev.DEV_INTERNAL_NO_ROUTE_RESULT();let{dest,query,headers}=routeResult;for(let[name,value]of Object.entries(headers))res.setHeader(name,value);statusCode&&Object.defineProperty(res,"statusCode",{get(){return statusCode},set(_){}});let requestPath=dest.replace(/^\//,"");if(!match){if(this.devProcessOrigin){let upstream=this.devProcessOrigin;debug(`Proxying to frontend dev server: ${upstream}`);let headers2=this.getProxyHeaders(req,requestId,!1);for(let[name,value]of Object.entries(headers2))req.headers[name]=value;this.setResponseHeaders(res,requestId);let origUrl=url3.parse(req.url||"/"),origQuery=parseQueryString(origUrl.search);return origUrl.pathname=dest,Object.assign(origQuery,query),origUrl.search=formatQueryString(origQuery),req.url=url3.format(origUrl),this.prepareTransforms(req,requestTransforms,responseTransforms),proxyPass(req,res,upstream,this,requestId,!1)}(statusCode===404&&routeResult.phase==="miss"||!this.renderDirectoryListing(req,res,requestPath,requestId))&&await this.send404(req,res,requestId);return}let buildRequestPath=match.buildResults.has(null)?null:requestPath,buildResult=match.buildResults.get(buildRequestPath);if(buildResult&&Array.isArray(buildResult.routes)&&buildResult.routes.length>0){let origUrl=url3.parse(req.url||"/"),origQuery=parseQueryString(origUrl.search);origUrl.pathname=dest,Object.assign(origQuery,query),origUrl.search=formatQueryString(origQuery);let newUrl=url3.format(origUrl);debug(`Checking build result's ${buildResult.routes.length} \`routes\` to match ${newUrl}`);let matchedRoute=await devRouter(newUrl,req.method,buildResult.routes,this,vercelConfig);if(matchedRoute.found&&callLevel===0){debug(`Found matching route ${matchedRoute.dest} for ${newUrl}`),req.url=newUrl,await this.serveProjectAsNowV2(req,res,requestId,vercelConfig,buildResult.routes,callLevel+1);return}}let{builder,pkg:builderPkg}=match.builderWithPkg;if(typeof builder.startDevServer=="function"){let devServerResult=null;try{devServerResult=await this.startBuildMatchDevServer(match,requestPath)}catch(err){(0,import_error_utils.isSpawnError)(err)&&err.code==="ENOENT"&&(err.message=`Command not found: ${import_chalk2.default.cyan(err.path,...err.spawnargs)}
|
|
55
|
-
Please ensure that ${cmd(err.path)} is properly installed`,err.link="https://vercel.link/command-not-found"),output_manager_default.prettyError(err),await this.sendError(req,res,requestId,"NO_RESPONSE_FROM_FUNCTION",502);return}if(devServerResult){requestId=generateRequestId(this.podId,!0);let{port,pid,shutdown,persistent}=devServerResult;this.shutdownCallbacks.set(pid,shutdown),persistent||res.once("close",()=>{this.killBuilderDevServer(pid)}),debug(`Proxying to "${builderPkg.name}" dev server (port=${port}, pid=${pid})`);let origUrl=url3.parse(req.url||"/"),origQuery=parseQueryString(origUrl.search);Object.assign(origQuery,query),origUrl.search=formatQueryString(origQuery),req.url=url3.format({pathname:origUrl.pathname,search:origUrl.search});let headers2=this.getProxyHeaders(req,requestId,!1);for(let[name,value]of Object.entries(headers2))req.headers[name]=value;return this.prepareTransforms(req,requestTransforms,responseTransforms),this.setResponseHeaders(res,requestId),proxyPass(req,res,`http://127.0.0.1:${port}`,this,requestId,!1)}else debug(`Skipping \`startDevServer()\` for ${match.entrypoint}`)}let foundAsset=findAsset(match,requestPath,vercelConfig);if(!foundAsset&&callLevel===0&&(await this.triggerBuild(match,buildRequestPath,req,vercelConfig),foundAsset=findAsset(match,requestPath,vercelConfig)),this.devProcessOrigin&&(!foundAsset||foundAsset&&foundAsset.asset.type!=="Lambda")){debug("Proxying to frontend dev server");let headers2=this.getProxyHeaders(req,requestId,!1);for(let[name,value]of Object.entries(headers2))req.headers[name]=value;return this.prepareTransforms(req,requestTransforms,responseTransforms),this.setResponseHeaders(res,requestId),proxyPass(req,res,this.devProcessOrigin,this,requestId,!1)}if(!foundAsset){await this.send404(req,res,requestId);return}let{asset,assetKey}=foundAsset;switch(debug(`Serving asset: [${asset.type}] ${assetKey} ${asset.contentType||""}`),asset.type){case"FileFsRef":this.setResponseHeaders(res,requestId);let staticResHeaders={};applyResponseTransforms(staticResHeaders,responseTransforms??[]);for(let[name,value]of Object.entries(staticResHeaders))value!==void 0&&res.setHeader(name,value);return req.url=`/${basename(asset.fsPath)}`,serveStaticFile(req,res,dirname3(asset.fsPath),{headers:[{source:"**/*",headers:[{key:"Content-Type",value:asset.contentType||getMimeType(assetKey)}]}]});case"FileBlob":let headers2={"Content-Length":asset.data.length,"Content-Type":asset.contentType||getMimeType(assetKey)};applyResponseTransforms(headers2,responseTransforms??[]),this.setResponseHeaders(res,requestId,headers2),res.end(asset.data);return;case"Lambda":if(!asset.fn){await this.sendError(req,res,requestId,"INTERNAL_LAMBDA_NOT_FOUND");return}requestId=generateRequestId(this.podId,!0);let origUrl=url3.parse(req.url||"/"),origQuery=parseQueryString(origUrl.search);Object.assign(origQuery,query),origUrl.search=formatQueryString(origQuery),req.url=url3.format({pathname:origUrl.pathname,search:origUrl.search}),applyRequestTransforms(req,requestTransforms);let path6=req.url||"/",body=await(0,import_raw_body2.default)(req);debug(`Invoking lambda: "${assetKey}" with ${path6}`);let result;try{result=await this.invokeBuiltLambda(asset,req,requestId,body)}catch(err){console.error(err),await this.sendError(req,res,requestId,"NO_RESPONSE_FROM_FUNCTION",502);return}statusCode||(res.statusCode=result.statusCode);let lambdaHeaders=result.headers??{};applyResponseTransforms(lambdaHeaders,responseTransforms??[]),this.setResponseHeaders(res,requestId,lambdaHeaders);let resBody;return result.encoding==="base64"&&typeof result.body=="string"?resBody=Buffer.from(result.body,"base64"):resBody=result.body,res.end(resBody);default:await this.sendError(req,res,requestId,"UNKNOWN_ASSET_TYPE")}};this.cwd=cwd,this.repoRoot=options.repoRoot??cwd,this.envConfigs={buildEnv:{},runEnv:{},allEnv:{}},this.envValues=options.envValues||{},this.projectId=options.projectId,this.orgId=options.orgId,this.queuePort=options.queuePort,this.runtimeCachePort=options.runtimeCachePort,this.schedulesPort=options.schedulesPort,this.scheduleBroker=new import_local_schedules2.ScheduleBroker({ownerId:this.orgId??"team_local",projectId:this.projectId??"prj_local",trackId:"development",dispatch:invocation=>this.dispatchSchedule(invocation),onError:(err,invocation)=>{try{output_manager_default.error(`Failed to dispatch schedule "${invocation.schedule.name}": ${(0,import_error_utils.errorToString)(err)}`)}catch{}}}),this.resourceProxyToken=randomBytes2(32).toString("base64url"),this.reportError=createErrorReporter(code=>options.onErrorCode?.(code)),this.files={},this.originalProjectSettings=options.projectSettings,this.projectSettings=options.projectSettings,this.services=options.services,this.useImplicitServicesEnvInjection=options.useImplicitServicesEnvInjection??!0,this.caseSensitive=!1,this.apiDir=null,this.apiExtensions=new Set,this.proxy=import_http_proxy_node16.default.createProxyServer({changeOrigin:!0,ws:!0,xfwd:!0}),this.proxy.on("proxyRes",(proxyRes,req)=>{proxyRes.headers.server="Vercel";let responseTransforms=this.responseTransformsByReq.get(req);responseTransforms&&(this.responseTransformsByReq.delete(req),applyResponseTransforms(proxyRes.headers,responseTransforms))}),this.proxy.on("error",(err,req,res)=>{if(output_manager_default.debug(`Proxy error for ${req?.url??"unknown request"}: ${(0,import_error_utils.errorToString)(err)}`),!!res){if("destroy"in res&&typeof res.destroy=="function"){res.destroy();return}res instanceof http.ServerResponse&&(res.headersSent||res.writeHead(502),res.end())}}),this.server=http.createServer(this.devServerHandler),this.server.timeout=0,this.queueServer=http.createServer((req,res)=>{this.handleResourceServerRequest(req,res,this.queueOrigin,this.handleQueuesRoute)}),this.runtimeCacheServer=http.createServer((req,res)=>{this.handleResourceServerRequest(req,res,this.runtimeCacheOrigin,this.handleRuntimeCacheRoute)}),this.schedulesServer=http.createServer((req,res)=>{this.handleResourceServerRequest(req,res,this.schedulesOrigin,this.handleSchedulesRoute)}),this.stopping=!1,this.buildMatches=new Map,this.inProgressBuilds=new Map,this.devCacheDir=join4(getVercelDirectory(cwd),"cache"),this.vercelConfigWarning=!1,this.getVercelConfigPromise=null,this.blockingBuildsPromise=null,this.startPromise=null,this.bulkRedirects=null,this.bulkRedirectsSignature=null,this.bulkRedirectsLastPath=null,this.bulkRedirectsResolvedPath=null,this.bulkRedirectsDirty=!0,this.watchAggregationId=null,this.watchAggregationEvents=[],this.watchAggregationTimeout=500,this.filter=path6=>!!path6,this.podId=Math.random().toString(32).slice(-5),this.shutdownCallbacks=new Map}get address(){if(!this._address)throw dev.DEV_INTERNAL_ADDRESS_UNAVAILABLE();return this._address}shouldUseServicesOrchestrator(){return!!(this.services&&this.services.length>0)}hasSubscribers(){return!!this.sidecars?.length}getDevQueueEnv(){return this.queueOrigin?getDevQueueEnv(this.queueOrigin,this.hasSubscribers()):{}}getDevRuntimeCacheEnv(env){return!this.runtimeCacheOrigin||env.RUNTIME_CACHE_ENDPOINT?{}:process.env.RUNTIME_CACHE_ENDPOINT?{RUNTIME_CACHE_ENDPOINT:process.env.RUNTIME_CACHE_ENDPOINT,...process.env.RUNTIME_CACHE_HEADERS?{RUNTIME_CACHE_HEADERS:process.env.RUNTIME_CACHE_HEADERS}:{}}:getDevRuntimeCacheEnv(this.runtimeCacheOrigin,DEV_RUNTIME_CACHE_API_PREFIX)}get resourceEndpoints(){if(!this.queueOrigin||!this.runtimeCacheOrigin)throw new Error("Local resource servers have not started");return{queues:{direct:this.queueOrigin,proxy:`${this.address.origin}${DEV_QUEUE_PROXY_PREFIX}/${this.resourceProxyToken}`},runtimeCache:{direct:`${this.runtimeCacheOrigin}${DEV_RUNTIME_CACHE_API_PREFIX}`,proxy:`${this.address.origin}${DEV_RUNTIME_CACHE_PREFIX}${this.resourceProxyToken}${DEV_RUNTIME_CACHE_API_PREFIX}`},...this.schedulesOrigin?{schedules:{direct:this.schedulesOrigin,proxy:`${this.address.origin}${DEV_SCHEDULES_PROXY_PREFIX}/${this.resourceProxyToken}`}}:{}}}getDevResourceMeta(){return{devResourceEndpoints:this.resourceEndpoints}}handleResourceServerRequest(req,res,origin,handler){if(!origin||!this.isAuthorizedResourceRequest(req,DEV_RESOURCE_TOKEN)){res.writeHead(401,{"WWW-Authenticate":"Bearer"}),res.end("Unauthorized");return}if(!isValidDevResourceHost(origin,req.headers.host)){res.writeHead(403),res.end("Forbidden");return}let pathname=new URL2(req.url||"/","http://127.0.0.1").pathname;handler(req,res,pathname).catch(err=>{output_manager_default.debug(`Local resource request failed for ${req.url||"/"}: ${(0,import_error_utils.errorToString)(err)}`),res.headersSent||res.writeHead(500),res.end("Internal Server Error")})}isAuthorizedResourceRequest(req,token){let authorization=req.headers.authorization;if(typeof authorization!="string")return!1;let encoder=new TextEncoder,actual=encoder.encode(authorization),expected=encoder.encode(`Bearer ${token}`);return actual.length===expected.length&&timingSafeEqual(actual,expected)}getBuilderDevEnv(match,env){let result={...env,...getDevSchedulesEnv(this.schedulesOrigin)};if(match.builderWithPkg.pkg.name!=="@vercel/container")return result;let endpoints=this.resourceEndpoints;return Object.assign(result,getDevSchedulesEnv(endpoints.schedules?.proxy,!0)),result.VERCEL_QUEUE_BASE_URL===endpoints.queues.direct&&Object.assign(result,getDevQueueEnv(endpoints.queues.proxy,result.VERCEL_HAS_WORKER_SERVICES!==void 0)),result.RUNTIME_CACHE_ENDPOINT===endpoints.runtimeCache.direct&&Object.assign(result,getDevRuntimeCacheEnv(endpoints.runtimeCache.proxy,"")),result}getSidecarDevMeta(match){let serviceCount=(this.sidecars??[]).filter(sidecar=>sidecar.builder.use!==match.use?!1:!sidecar.workspace||sidecar.workspace===".").length;return serviceCount>0?{serviceCount}:{}}async setupBuilderDevSidecars(){if(this.shouldUseServicesOrchestrator())return;let sidecars=this.sidecars??[];if(sidecars.length===0)return;Object.assign(this.envConfigs.runEnv,this.getDevQueueEnv());let services=sidecars.map(toOrchestratorService),orchestrator=new ServicesOrchestrator({services,cwd:this.cwd,repoRoot:this.repoRoot,env:this.envConfigs.allEnv,proxyOrigin:this.address.origin,resourceEndpoints:this.resourceEndpoints,useImplicitEnvInjection:!1,preferServiceBuilder:!0,onQueueSubscriptions:(serviceName,subscriptions)=>this.queueBroker?.updateServiceSubscriptions(serviceName,subscriptions)});this.sidecarOrchestrator=orchestrator,this.queueBroker?.registerServices(services);try{await orchestrator.startAll()}catch(err){throw await orchestrator.stopAll(),this.sidecarOrchestrator=void 0,this.sidecars=[],err}output_manager_default.log(`Started ${sidecars.length} development ${(0,import_pluralize2.default)("sidecar",sidecars.length)}`)}async exit(code=1){await this.stop(code),process.exit(code)}enqueueFsEvent(type,path6){this.bulkRedirectsResolvedPath&&(path6===this.bulkRedirectsResolvedPath||path6.startsWith(this.bulkRedirectsResolvedPath+sep2))&&(this.bulkRedirectsDirty=!0),this.watchAggregationEvents.push({type,path:path6}),this.watchAggregationId===null&&(this.watchAggregationId=setTimeout(()=>{let events=this.watchAggregationEvents.slice();this.watchAggregationEvents.length=0,this.watchAggregationId=null,this.handleFilesystemEvents(events).catch(err=>{output_manager_default.prettyError(err),(0,import_error_utils.isError)(err)&&typeof err.stack=="string"&&output_manager_default.debug(err.stack)})},this.watchAggregationTimeout))}async handleFilesystemEvents(events){if(this.stopping)return;output_manager_default.debug(`Filesystem watcher notified of ${events.length} events`);let filesChanged=new Set,filesRemoved=new Set,distPaths=[];for(let buildMatch of this.buildMatches.values())for(let buildResult of buildMatch.buildResults.values())buildResult.distPath&&distPaths.push(buildResult.distPath);if(events=events.filter(event=>distPaths.every(distPath=>!event.path.startsWith(distPath))),events.length!==0){this.functionReconciliations++;try{this.configGeneration++,this.functionDiscovery=void 0;for(let event of events)event.type==="add"?await this.handleFileCreated(event.path,filesChanged,filesRemoved):event.type==="unlink"?this.handleFileDeleted(event.path,filesChanged,filesRemoved):event.type==="change"&&await this.handleFileModified(event.path,filesChanged,filesRemoved);let vercelConfig=await this.getVercelConfig();if(this.stopping)return;await this.updateBuildMatches(vercelConfig);let filesChangedArray=[...filesChanged],filesRemovedArray=[...filesRemoved],needsRebuild=new Map;for(let match of this.buildMatches.values()){this.canonicalizeFunctionBuild(match);for(let[requestPath,result]of match.buildResults)if(!needsRebuild.has(result)&&Array.isArray(result.watch)){for(let pattern of result.watch)if(minimatches(filesChangedArray,pattern)||minimatches(filesRemovedArray,pattern)){needsRebuild.set(result,[requestPath,match]);break}}}if(needsRebuild.size>0){output_manager_default.debug(`Triggering ${needsRebuild.size} rebuilds`),filesChangedArray.length>0&&output_manager_default.debug(`Files changed: ${filesChangedArray.join(", ")}`),filesRemovedArray.length>0&&output_manager_default.debug(`Files removed: ${filesRemovedArray.join(", ")}`);for(let[result,[requestPath,match]]of needsRebuild)requestPath===null||await shouldServe(match,this.files,requestPath,this,vercelConfig)?this.triggerBuild(match,requestPath,null,vercelConfig,result,filesChangedArray,filesRemovedArray).catch(err=>{output_manager_default.warn(`An error occurred while rebuilding \`${match.src}\`:`),console.error(err.stack)}):output_manager_default.debug(`Not rebuilding because \`shouldServe()\` returned \`false\` for "${match.use}" request path "${requestPath}"`)}}finally{this.functionReconciliations--}}}async handleFileCreated(fsPath,changed,removed){let name=relative2(this.cwd,fsPath);try{await this.getVercelConfig(),this.files[name]=await import_build_utils9.FileFsRef.fromFsPath({fsPath});let extensionless=this.getExtensionlessFile(name);extensionless&&(this.files[extensionless]=await import_build_utils9.FileFsRef.fromFsPath({fsPath})),fileChanged(name,changed,removed),output_manager_default.debug(`File created: ${name}`)}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT")output_manager_default.debug(`File created, but has since been deleted: ${name}`),fileRemoved(name,this.files,changed,removed);else throw err}}handleFileDeleted(fsPath,changed,removed){let name=relative2(this.cwd,fsPath);output_manager_default.debug(`File deleted: ${name}`),fileRemoved(name,this.files,changed,removed);let extensionless=this.getExtensionlessFile(name);extensionless&&(output_manager_default.debug(`File deleted: ${extensionless}`),fileRemoved(extensionless,this.files,changed,removed))}async handleFileModified(fsPath,changed,removed){let name=relative2(this.cwd,fsPath);try{this.files[name]=await import_build_utils9.FileFsRef.fromFsPath({fsPath}),fileChanged(name,changed,removed),output_manager_default.debug(`File modified: ${name}`)}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT")output_manager_default.debug(`File modified, but has since been deleted: ${name}`),fileRemoved(name,this.files,changed,removed);else throw err}}async updateBuildMatches(vercelConfig,isInitial=!1){let fileList=this.resolveBuildFiles(this.files),matches=await getBuildMatches(vercelConfig,this.cwd,this,fileList),sources=matches.map(m=>m.src);isInitial&&fileList.length===0&&output_manager_default.warn("There are no files inside your deployment.");let ops=[];for(let src of this.buildMatches.keys())if(!sources.includes(src)){output_manager_default.debug(`Removing build match for "${src}"`);let match=this.buildMatches.get(src);match&&ops.push(shutdownBuilder(match)),this.buildMatches.delete(src)}await Promise.all(ops);let blockingBuilds=[];for(let match of matches){let currentMatch=this.buildMatches.get(match.src);if(!buildMatchEquals(currentMatch,match)&&(output_manager_default.debug(`Adding build match for "${match.src}" with "${match.use}"`),this.buildMatches.set(match.src,match),!isInitial&&needsBlockingBuild(match))){let buildPromise=executeBuild(vercelConfig,this,this.files,match,null,!1);blockingBuilds.push(buildPromise)}}blockingBuilds.length>0&&(output_manager_default.debug(`Waiting for ${blockingBuilds.length} "blocking builds"`),this.blockingBuildsPromise=Promise.all(blockingBuilds).then(()=>{output_manager_default.debug('Cleaning up "blockingBuildsPromise" after successful resolve'),this.blockingBuildsPromise=null}).catch(err=>{output_manager_default.debug(`Cleaning up "blockingBuildsPromise" after error: ${err}`),this.blockingBuildsPromise=null,err&&output_manager_default.prettyError(err)})),this.buildMatches=new Map([...this.buildMatches.entries()].sort((matchA,matchB)=>sortBuilders(matchA[1],matchB[1])))}async getLocalEnv(fileName,base){let filePath=join4(this.cwd,fileName),env={};try{let dotenv=await import_fs_extra.default.readFile(filePath,"utf8");output_manager_default.debug(`Using local env: ${filePath}`),env=(0,import_dotenv.parse)(dotenv),env=this.injectSystemValuesInDotenv(env)}catch(err){if(!(0,import_error_utils.isErrnoException)(err)||err.code!=="ENOENT")throw err}try{return{...this.validateEnvConfig(fileName,base||{},env)}}catch(err){if(err instanceof MissingDotenvVarsError)this.reportError(err),await this.exit();else throw err}return{}}getVercelConfig(){if(this.getVercelConfigPromise)return this.getVercelConfigPromise;this.getVercelConfigPromise=(async()=>{for(;;){let generation=this.configGeneration;try{let config=await this._getVercelConfig();if(this.stopping||generation===this.configGeneration)return config}catch(err){if(this.stopping||generation===this.configGeneration)throw err}this.functionDiscovery=void 0}})();let clear=this.clearVercelConfigPromise;return this.getVercelConfigPromise.then(clear,clear),this.getVercelConfigPromise}get devCommand(){return this.getDevCommand(this.projectSettings)}getDevCommand(projectSettings){if(projectSettings?.devCommand)return projectSettings.devCommand;if(projectSettings?.framework){let frameworkSlug=projectSettings.framework,framework=import_frameworks3.frameworkList.find(f=>f.slug===frameworkSlug);if(framework){let defaults=framework.settings.devCommand.value;if(defaults)return defaults}if((0,import_build_utils9.shouldUseExperimentalBackends)(frameworkSlug))return"npx @vercel/cervel dev"}}getFunctionDiscovery(options){let key=JSON.stringify(options);if(!this.functionDiscovery||this.functionDiscovery.key!==key){let promise=collectDevFunctions(options);this.functionDiscovery={key,promise},promise.catch(()=>{this.functionDiscovery?.promise===promise&&(this.functionDiscovery=void 0)})}return this.functionDiscovery.promise}getDevFunction(outputPath){return this.functionRegistry.functions.get(outputPath)}getDevSchedules(){return this.functionRegistry.schedules}async dispatchSchedule({delivery,signal}){if(signal.throwIfAborted(),this.stopping)throw new Error("Local Schedules is stopping");if(delivery.type==="queue"){if(!this.queueBroker)throw new Error("Local Queue broker is not ready");this.queueBroker.enqueue(delivery.topic,Buffer.from(JSON.stringify(delivery.message)),"application/json");return}let invoke=this.resolveDevFunction(delivery.function);if(!invoke)throw new Error(`Schedule function "${delivery.function}" is missing or not ready`);signal.throwIfAborted();let onAbort=()=>{},aborted=new Promise((_,reject)=>{onAbort=()=>reject(signal.reason),signal.addEventListener("abort",onAbort,{once:!0})});try{let result=await Promise.race([aborted,invoke({method:"POST",headers:delivery.headers,body:Buffer.alloc(0),signal})]);if(!result)throw new Error(`Schedule function "${delivery.function}" is missing or not ready`);if(!result.ok)throw new Error(`Schedule function "${delivery.function}" returned HTTP ${result.status}`)}finally{signal.removeEventListener("abort",onAbort)}}resolveDevFunction(outputPath){let fn2=this.getDevFunction(outputPath);if(!fn2||this.stopping)return null;if(fn2.invocation.type==="http"){if(!this.devProcessOrigin)return null}else if(!this.functionDispatchReady||this.functionReconciliations>0||!this.getDevFunctionMatch(fn2))return null;return request=>this.invokeDevFunction(outputPath,request)}getDevFunctionMatch(fn2){if(fn2.invocation.type!=="entrypoint"||fn2.scope.target!=="builder")return;let{entrypoint}=fn2.invocation;return[...this.buildMatches.values()].find(match=>match.entrypoint===entrypoint&&match.use===fn2.scope.build.use&&(0,import_fast_deep_equal.default)(match.config??{},fn2.scope.build.config??{}))}canonicalizeFunctionBuild(match){if(![...this.functionRegistry.functions.values()].some(fn2=>this.getDevFunctionMatch(fn2)===match))return!1;if(match.buildResults.size&&!(match.buildResults.size===1&&match.buildResults.has(null))){let results=[...match.buildResults.values()],result=results[results.length-1];result.watch=[...new Set(results.flatMap(result2=>result2.watch))],match.buildResults.clear(),match.buildResults.set(null,result)}return!0}async invokeDevFunction(outputPath,request){request.signal?.throwIfAborted();let fn2=this.getDevFunction(outputPath);if(!fn2||!this.resolveDevFunction(outputPath))return null;let generation=this.configGeneration,isCurrent=()=>!this.stopping&&generation===this.configGeneration&&this.getDevFunction(outputPath)===fn2;if(fn2.invocation.type==="http"){let response=await directFetch(`${this.devProcessOrigin}${fn2.invocation.pathname}`,{...request,redirect:"manual"});return await response.arrayBuffer(),{ok:response.ok,status:response.status}}let match=this.getDevFunctionMatch(fn2),config=this.functionConfig,req=new http.IncomingMessage(new Socket);req.method=request.method,req.url=`/${outputPath}`,req.headers={host:this.address.host,...request.headers};let requestId=generateRequestId(this.podId,!0),currentMatch=()=>!request.signal?.aborted&&isCurrent()&&this.getDevFunctionMatch(fn2)===match,devServerResult=await this.startBuildMatchDevServer(match,outputPath);if(devServerResult){let{port,pid,shutdown,persistent}=devServerResult;this.shutdownCallbacks.set(pid,shutdown);try{if(!currentMatch())return null;let response=await directFetch(`http://127.0.0.1:${port}/${outputPath}`,{...request,headers:nodeHeadersToFetchHeaders({...req.headers,...this.getProxyHeaders(req,requestId,!0)}),redirect:"manual"});return await response.arrayBuffer(),{ok:response.ok,status:response.status}}finally{let current=this.getDevFunction(outputPath);(this.stopping||!persistent||!current||this.getDevFunctionMatch(current)!==match)&&this.shutdownCallbacks.has(pid)&&await this.killBuilderDevServer(pid)}}if(!currentMatch())return null;let{entrypoint}=fn2.invocation,getAsset=()=>match.buildOutput[(match.buildResultVersion??match.builderWithPkg.builder.version)===2?outputPath:entrypoint];this.canonicalizeFunctionBuild(match);let asset=getAsset();if((!asset||this.inProgressBuilds.get(match)?.size)&&(await this.triggerBuild(match,null,null,config),asset=getAsset()),!currentMatch())return null;if(!asset||asset.type!=="Lambda"||!asset.fn)return{ok:!1,status:404};let result=await this.invokeBuiltLambda(asset,req,requestId,request.body);return{ok:result.statusCode>=200&&result.statusCode<300,status:result.statusCode}}async startBuildMatchDevServer(match,requestPath){let{builder}=match.builderWithPkg;if(!builder.startDevServer)return null;let{envConfigs,files,devCacheDir,cwd:workPath}=this;return builder.startDevServer({files,entrypoint:match.entrypoint,workPath,config:match.config||{},repoRootPath:this.repoRoot,meta:{isDev:!0,...this.getDevResourceMeta(),requestPath,devCacheDir,...this.getSidecarDevMeta(match),env:this.getBuilderDevEnv(match,{...envConfigs.runEnv,VERCEL_DEBUG_PREFIX:output_manager_default.debugEnabled?"[builder]":void 0}),buildEnv:{...envConfigs.buildEnv}}})}invokeBuiltLambda(asset,req,requestId,body){let payload={method:req.method||"GET",host:req.headers.host,path:req.url||"/",headers:{...req.headers,...this.getProxyHeaders(req,requestId,!0)},encoding:"base64",body:body.toString("base64")};return asset.fn({Action:"Invoke",body:JSON.stringify(payload)})}async _getVercelConfig(){let generation=this.configGeneration,{compileVercelConfig}=await import("../../chunks/compile-vercel-config-YY3CODZP.js"),compiled=await compileVercelConfig(this.cwd),configPath=getLocalPathConfig(this.cwd,!!compiled.sourceFile),[pkg=null,vercelConfig={version:2,[import_client.fileNameSymbol]:"vercel.json"}]=await Promise.all([this.readJsonFile("package.json"),this.readJsonFile(configPath,!0)]);await this.validateVercelConfig(vercelConfig);let functionConfig=structuredClone(vercelConfig),sourceFiles;for(let[name,service]of Object.entries(this.queueBroker?vercelConfig.services??vercelConfig.experimentalServicesV2??{}:{}))if(Object.values(service.functions??{}).some(fn2=>fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta")))throw dev.DEV_QUEUE_FUNCTION_UNSUPPORTED({sourceFile:`services.${name}.functions`,reason:"service-hosted function queue triggers are not supported locally yet"});let nextProjectSettings={...this.originalProjectSettings,...pickOverrides(vercelConfig)},{error:routeError,routes:maybeRoutes}=(0,import_routing_utils3.getTransformedRoutes)(vercelConfig);routeError&&(this.reportError(routeError),await this.exit()),vercelConfig.routes=maybeRoutes||[];let hasServices=(this.services?.length??0)>0,hasResolvedServices=!!this.services&&this.services.length>0;if(!vercelConfig.experimentalServices&&!hasResolvedServices&&(!vercelConfig.builds||vercelConfig.builds.length===0)){let{projectSettings,cleanUrls,trailingSlash}=vercelConfig,files=(await staticFiles(this.cwd,{})).map(f=>relative2(this.cwd,f));sourceFiles=files;let detectionOptions={tag:"latest",bunVersion:vercelConfig.bunVersion,functions:vercelConfig.functions,projectSettings:projectSettings||nextProjectSettings,featHandleMiss:!0,cleanUrls,trailingSlash,proxy:vercelConfig.proxy,workPath:this.cwd},detectedBuilders=await(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,detectionOptions);for(;detectedBuilders.errors?.length===1&&detectedBuilders.errors[0].code==="unused_function";){let error2=detectedBuilders.errors[0],unmatchedTrigger=Object.entries(detectionOptions.functions??{}).find(([pattern,fn2])=>error2.message.startsWith(`The pattern "${pattern}" defined in \`functions\` `)&&fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta"||trigger.type==="schedule/v1beta"));if(!unmatchedTrigger)break;detectionOptions.functions={...detectionOptions.functions},delete detectionOptions.functions[unmatchedTrigger[0]],detectedBuilders=await(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,detectionOptions)}let{builders,warnings,errors,defaultRoutes,redirectRoutes,rewriteRoutes,errorRoutes}=detectedBuilders,hostRewriteRoutes=detectedBuilders.hostRewriteRoutes;if(errors){if(this.functionConfig)throw errors[0];this.reportError(errors[0]),await this.exit()}if(warnings?.length>0&&warnings.forEach(warning=>output_manager_default.warn(warning.message,null,warning.link,warning.action)),builders){let buildpackRuntime=builders.map(getBuildpackRuntime).find(runtime=>runtime!==void 0);if(buildpackRuntime)throw buildpackDevUnsupportedError(buildpackRuntime);vercelConfig.builds=vercelConfig.builds||[],vercelConfig.builds.push(...builders),delete vercelConfig.functions}let serviceRewrites=detectedBuilders.serviceRewrites,serviceRewriteRoutes=serviceRewrites&&serviceRewrites.length>0?(0,import_routing_utils3.convertRewrites)(serviceRewrites):null,routes=[];routes.push(...redirectRoutes||[]),routes=(0,import_routing_utils3.appendRoutesToPhase)({routes,newRoutes:hostRewriteRoutes??null,phase:null}),routes.push(...(0,import_routing_utils3.appendRoutesToPhase)({routes:vercelConfig.routes,newRoutes:[...rewriteRoutes||[],...serviceRewriteRoutes||[]],phase:"filesystem"})),routes=(0,import_routing_utils3.appendRoutesToPhase)({routes,newRoutes:errorRoutes,phase:"error"}),routes.push(...defaultRoutes||[]),vercelConfig.routes=routes}else if(hasResolvedServices&&vercelConfig.proxy){let{entrypoint}=vercelConfig.proxy;await import_fs_extra.default.pathExists(join4(this.cwd,entrypoint))||(output_manager_default.error(`The proxy entrypoint \`${entrypoint}\` does not exist. Set \`proxy.entrypoint\` to an existing \`.js\` or \`.ts\` file.`),await this.exit()),vercelConfig.builds=vercelConfig.builds||[],vercelConfig.builds.push((0,import_fs_detectors2.getProxyBuilder)(vercelConfig.proxy,"latest",vercelConfig.functions))}if(this.sidecars===void 0){let services=(this.services??[]).filter(import_build_utils9.isExperimentalServiceV2);this.sidecars=await collectBuilderDevSidecars({builds:this.shouldUseServicesOrchestrator()?services.map(service=>service.builder):vercelConfig.builds??[],workPath:this.cwd,services})}let functionBuilds=[...vercelConfig.builds??[]];Array.isArray(vercelConfig.builds)&&((this.getDevCommand(nextProjectSettings)||hasServices)&&(vercelConfig.builds=vercelConfig.builds.filter(this.shouldBuildInDev)),vercelConfig.builds.sort(sortBuilders)),vercelConfig.routes=(vercelConfig.routes||[]).filter(route=>"has"in route?(this.vercelConfigWarning||(this.vercelConfigWarning=!0,output_manager_default.warn(`The "has" property in ${vercelConfig[import_client.fileNameSymbol]} will be ignored during development. Deployments will work as expected.`)),!1):!0);let[runEnv,buildEnv]=await Promise.all([this.getLocalEnv(".env",vercelConfig.env),this.getLocalEnv(".env.build",vercelConfig.build?.env)]),allEnv={...buildEnv,...runEnv};if(Object.keys(allEnv).length===0){let envValues={...this.envValues};this.address.host&&(envValues.VERCEL_URL=this.address.host),allEnv={...envValues},runEnv={...envValues},buildEnv={...envValues}}runEnv.NODE_ENV??=process.env.NODE_ENV??"development",allEnv.NODE_ENV??=runEnv.NODE_ENV,runEnv.NOW_REGION="dev1",buildEnv.NOW_REGION="dev1",allEnv.NOW_REGION="dev1",allEnv.VERCEL_ENV="development",allEnv.VERCEL="1",this.projectId&&!process.env.VERCEL_PROJECT_ID&&("VERCEL_PROJECT_ID"in allEnv||(allEnv.VERCEL_PROJECT_ID=this.projectId),"VERCEL_PROJECT_ID"in runEnv||(runEnv.VERCEL_PROJECT_ID=this.projectId)),this.orgId&&!process.env.VERCEL_ORG_ID&&("VERCEL_ORG_ID"in allEnv||(allEnv.VERCEL_ORG_ID=this.orgId),"VERCEL_ORG_ID"in runEnv||(runEnv.VERCEL_ORG_ID=this.orgId)),nextProjectSettings?.autoExposeSystemEnvs&&(runEnv.VERCEL_REGION="dev1"),runEnv.VERCEL_CLI_VERSION=pkg_default.version,Object.assign(runEnv,this.getDevQueueEnv()),Object.assign(runEnv,getDevSchedulesEnv(this.schedulesOrigin)),Object.assign(allEnv,getDevSchedulesEnv(this.schedulesOrigin)),Object.assign(runEnv,this.getDevRuntimeCacheEnv(runEnv));let hasQueueFunctions=Object.values(functionConfig.functions??{}).some(fn2=>fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta"));if(this.queueBroker&&hasQueueFunctions&&hasResolvedServices)throw dev.DEV_QUEUE_FUNCTION_UNSUPPORTED({sourceFile:"functions",reason:"service-hosted function queue triggers are not supported locally yet"});let registry=await this.getFunctionDiscovery({scopes:(hasResolvedServices?[]:functionBuilds).map(build=>({build,target:vercelConfig.builds?.includes(build)?"builder":"framework"})),workPath:this.cwd,files:(sourceFiles??(await staticFiles(this.cwd,{})).map(f=>relative2(this.cwd,f))).sort(),config:functionConfig,env:{...process.env,...allEnv,...this.getDevQueueEnv(),...getDevSchedulesEnv(this.schedulesOrigin),...this.getDevRuntimeCacheEnv(allEnv)}}),subscriptions,staticSchedules,sourceChanged;try{subscriptions=deriveQueueSubscriptions(registry),this.queueBroker?.validateFunctionSubscriptions(subscriptions),staticSchedules=collectStaticSchedules(functionConfig.schedules,registry),sourceChanged=!(0,import_fast_deep_equal.default)(this.staticSchedulesSnapshot,staticSchedules),sourceChanged&&this.scheduleBroker.validateStatic(staticSchedules)}catch(err){throw this.functionDiscovery=void 0,err}let{unmatchedPatterns}=registry;if(await this.refreshBulkRedirects(vercelConfig.bulkRedirectsPath),this.devCommandStarts.size&&await Promise.all(this.devCommandStarts),this.stopping||generation!==this.configGeneration)return vercelConfig;let restartForFunctionEnv=!!(this.devCommandEnv&&[...registry.functions.values()].some(fn2=>fn2.invocation.type==="http")&&!(0,import_fast_deep_equal.default)(this.devCommandEnv,allEnv)),previousProcess=this.devProcess,previousOrigin=this.devProcessOrigin,previousCommand=this.currentDevCommand,previousEnv=this.devCommandEnv,previousRuntime={projectSettings:this.projectSettings,allEnv:previousEnv??this.envConfigs.allEnv},restarted,validated=!1;try{if(this.initialDevCommandStarted&&await this.runDevCommand(restartForFunctionEnv,{projectSettings:nextProjectSettings,allEnv},origin=>{restarted={origin}}),this.stopping||generation!==this.configGeneration)return vercelConfig;this.queueBroker?.validateFunctionSubscriptions(subscriptions),sourceChanged=!(0,import_fast_deep_equal.default)(this.staticSchedulesSnapshot,staticSchedules),sourceChanged&&(this.scheduleBroker.validateStatic(staticSchedules),this.scheduleBroker.reconcileStatic(staticSchedules),this.staticSchedulesSnapshot=structuredClone(staticSchedules)),validated=!0}finally{!this.stopping&&!validated&&(this.devProcess!==previousProcess||this.devProcessOrigin!==previousOrigin||this.currentDevCommand!==previousCommand||this.devCommandEnv!==previousEnv)&&await this.runDevCommand(!0,previousRuntime)}this.projectSettings=nextProjectSettings,this.caseSensitive=hasNewRoutingProperties(vercelConfig),this.apiDir=(0,import_fs_detectors2.detectApiDirectory)(vercelConfig.builds||[]),this.apiExtensions=(0,import_fs_detectors2.detectApiExtensions)(vercelConfig.builds||[]),this.envConfigs={buildEnv,runEnv,allEnv},this.functionRegistry=registry,this.functionConfig=vercelConfig,restarted&&(this.devProcessOrigin=restarted.origin),this.queueBroker?.setFunctionSubscriptions(subscriptions,outputPath=>this.resolveDevFunction(outputPath));for(let pattern of unmatchedPatterns)if(!this.unmatchedQueuePatterns.has(pattern)){let warning=dev.DEV_QUEUE_FUNCTION_UNMATCHED({pattern});output_manager_default.warn(`[${warning.name}] ${warning.message} ${warning.fix}`)}return this.unmatchedQueuePatterns=new Set(unmatchedPatterns),vercelConfig}async refreshBulkRedirects(bulkRedirectsPath){let configPath=bulkRedirectsPath??null;if(configPath===this.bulkRedirectsLastPath&&!this.bulkRedirectsDirty)return;if(this.bulkRedirectsLastPath=configPath,this.bulkRedirectsDirty=!1,this.bulkRedirectsResolvedPath=configPath?resolveBulkRedirectsPath(this.cwd,configPath):null,!configPath){this.bulkRedirects=null,this.bulkRedirectsSignature=null;return}let signature=await getBulkRedirectsSignature(this.cwd,configPath);if(signature!==this.bulkRedirectsSignature){this.bulkRedirectsSignature=signature;try{let result=await loadBulkRedirects(this.cwd,configPath);this.bulkRedirects=result.table;for(let warning of result.warnings)output_manager_default.warn(warning);let count=result.table.size;count>0&&output_manager_default.log(`Loaded ${count} bulk ${(0,import_pluralize2.default)("redirect",count)} from ${configPath}`)}catch(err){this.bulkRedirects=null,output_manager_default.warn(`Failed to load bulk redirects from "${configPath}": ${(0,import_error_utils.errorToString)(err)}`)}}}async readJsonFile(filePath,strict=!1){let rel,abs;isAbsolute3(filePath)?(rel=path4.relative(this.cwd,filePath),abs=filePath):(rel=filePath,abs=join4(this.cwd,filePath)),output_manager_default.debug(`Reading \`${rel}\` file`);try{let raw=await import_fs_extra.default.readFile(abs,"utf8"),parsed=(0,import_json_parse_better_errors.default)(raw);return parsed[import_client.fileNameSymbol]=rel,parsed}catch(err){if(strict&&!((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"))throw err;if((0,import_error_utils.isError)(err))(0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"?output_manager_default.debug(`No \`${rel}\` file present`):err.name==="SyntaxError"&&output_manager_default.warn(`There is a syntax error in the \`${rel}\` file: ${err.message}`);else throw err}}async tryValidateOrExit(config,validate){let message2=validate(config);message2&&(output_manager_default.error(message2),await this.exit(1))}async validateVercelConfig(config){if(config.version===1){if(this.functionConfig)throw dev.DEV_UNSUPPORTED_CONFIG_VERSION();this.reportError(dev.DEV_UNSUPPORTED_CONFIG_VERSION()),await this.exit(1);return}let error2=validateConfig(config);if(error2){if(this.functionConfig)throw error2;this.reportError(error2),await this.exit(1)}}validateEnvConfig(type,env={},localEnv={}){let missing=Object.entries(env).filter(([name,value])=>typeof value=="string"&&value.startsWith("@")&&!hasProp(localEnv,name)).map(([name])=>name);if(missing.length>0)throw new MissingDotenvVarsError(type,missing);let merged={...env,...localEnv},hasInvalidName=!1;for(let key of Object.keys(merged))/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key)||(output_manager_default.warn(`Ignoring ${type.split(".").slice(1).reverse().join(" ")} var ${JSON.stringify(key)} because name is invalid`),hasInvalidName=!0,delete merged[key]);return hasInvalidName&&output_manager_default.log("The name contains invalid characters. Only letters, digits, and underscores are allowed. Furthermore, the name should not start with a digit"),merged}injectSystemValuesInDotenv(env){for(let name of Object.keys(env))name==="VERCEL_URL"?env.VERCEL_URL=this.address.host:name==="VERCEL_REGION"&&(env.VERCEL_REGION="dev1");return env}resolveBuildFiles(files){return Object.keys(files).filter(this.filter)}isWatcherIgnored(fsPath){let relativePath=relative2(this.cwd,fsPath);return relativePath===""?!1:!this.filter(relativePath)}start(...listenSpec){return this.startPromise||(this.startPromise=this._start(...listenSpec).catch(async err=>{throw await this.stop(),err})),this.startPromise}async _start(...listenSpec){if(!import_fs_extra.default.existsSync(this.cwd))throw dev.DEV_CWD_NOT_FOUND({cwd:this.cwd});if(!import_fs_extra.default.lstatSync(this.cwd).isDirectory())throw dev.DEV_CWD_NOT_DIRECTORY({cwd:this.cwd});let{ig}=await(0,import_client.getVercelIgnore)(this.cwd);this.filter=ig.createFilter();let address=null;for(;typeof address!="string";)try{address=(await(0,import_async_listen.listen)(this.server,...listenSpec)).toString()}catch(err){if((0,import_error_utils.isErrnoException)(err))output_manager_default.debug(`Got listen error: ${err.code}`),err.code==="EADDRINUSE"&&(typeof listenSpec[0]=="number"?(output_manager_default.note(`Requested port ${import_chalk2.default.yellow(String(listenSpec[0]))} is already in use`),listenSpec[0]++):(this.reportError(dev.DEV_LISTEN_ADDRESS_IN_USE({address:String(listenSpec[0])})),process.exit(1)));else throw err}this._address=new URL2(replaceLocalhost(address)),this.runtimeCache=new RuntimeCacheStore;let runtimeCacheListener=await listenOnDevResourcePort(this.runtimeCacheServer,{name:"Runtime Cache",flag:"--runtime-cache-port",defaultPort:DEV_RUNTIME_CACHE_DEFAULT_PORT,port:this.runtimeCachePort,reservedPorts:[this.queuePort,this.schedulesPort??DEV_SCHEDULES_DEFAULT_PORT].filter(port=>port!==void 0&&port!==0)});this.runtimeCacheOrigin=runtimeCacheListener.origin,runtimeCacheListener.defaultPort!==void 0&&output_manager_default.warn(`Runtime Cache default port ${runtimeCacheListener.defaultPort} is unavailable; listening on ${runtimeCacheListener.port} instead.
|
|
55
|
+
Please ensure that ${cmd(err.path)} is properly installed`,err.link="https://vercel.link/command-not-found"),output_manager_default.prettyError(err),await this.sendError(req,res,requestId,"NO_RESPONSE_FROM_FUNCTION",502);return}if(devServerResult){requestId=generateRequestId(this.podId,!0);let{port,pid,shutdown,persistent}=devServerResult;this.shutdownCallbacks.set(pid,shutdown),persistent||res.once("close",()=>{this.killBuilderDevServer(pid)}),debug(`Proxying to "${builderPkg.name}" dev server (port=${port}, pid=${pid})`);let origUrl=url3.parse(req.url||"/"),origQuery=parseQueryString(origUrl.search);Object.assign(origQuery,query),origUrl.search=formatQueryString(origQuery),req.url=url3.format({pathname:origUrl.pathname,search:origUrl.search});let headers2=this.getProxyHeaders(req,requestId,!1);for(let[name,value]of Object.entries(headers2))req.headers[name]=value;return this.prepareTransforms(req,requestTransforms,responseTransforms),this.setResponseHeaders(res,requestId),proxyPass(req,res,`http://127.0.0.1:${port}`,this,requestId,!1)}else debug(`Skipping \`startDevServer()\` for ${match.entrypoint}`)}let foundAsset=findAsset(match,requestPath,vercelConfig);if(!foundAsset&&callLevel===0&&(await this.triggerBuild(match,buildRequestPath,req,vercelConfig),foundAsset=findAsset(match,requestPath,vercelConfig)),this.devProcessOrigin&&(!foundAsset||foundAsset&&foundAsset.asset.type!=="Lambda")){debug("Proxying to frontend dev server");let headers2=this.getProxyHeaders(req,requestId,!1);for(let[name,value]of Object.entries(headers2))req.headers[name]=value;return this.prepareTransforms(req,requestTransforms,responseTransforms),this.setResponseHeaders(res,requestId),proxyPass(req,res,this.devProcessOrigin,this,requestId,!1)}if(!foundAsset){await this.send404(req,res,requestId);return}let{asset,assetKey}=foundAsset;switch(debug(`Serving asset: [${asset.type}] ${assetKey} ${asset.contentType||""}`),asset.type){case"FileFsRef":this.setResponseHeaders(res,requestId);let staticResHeaders={};applyResponseTransforms(staticResHeaders,responseTransforms??[]);for(let[name,value]of Object.entries(staticResHeaders))value!==void 0&&res.setHeader(name,value);return req.url=`/${basename(asset.fsPath)}`,serveStaticFile(req,res,dirname3(asset.fsPath),{headers:[{source:"**/*",headers:[{key:"Content-Type",value:asset.contentType||getMimeType(assetKey)}]}]});case"FileBlob":let headers2={"Content-Length":asset.data.length,"Content-Type":asset.contentType||getMimeType(assetKey)};applyResponseTransforms(headers2,responseTransforms??[]),this.setResponseHeaders(res,requestId,headers2),res.end(asset.data);return;case"Lambda":if(!asset.fn){await this.sendError(req,res,requestId,"INTERNAL_LAMBDA_NOT_FOUND");return}requestId=generateRequestId(this.podId,!0);let origUrl=url3.parse(req.url||"/"),origQuery=parseQueryString(origUrl.search);Object.assign(origQuery,query),origUrl.search=formatQueryString(origQuery),req.url=url3.format({pathname:origUrl.pathname,search:origUrl.search}),applyRequestTransforms(req,requestTransforms);let path6=req.url||"/",body=await(0,import_raw_body2.default)(req);debug(`Invoking lambda: "${assetKey}" with ${path6}`);let result;try{result=await this.invokeBuiltLambda(asset,req,requestId,body)}catch(err){console.error(err),await this.sendError(req,res,requestId,"NO_RESPONSE_FROM_FUNCTION",502);return}statusCode||(res.statusCode=result.statusCode);let lambdaHeaders=result.headers??{};applyResponseTransforms(lambdaHeaders,responseTransforms??[]),this.setResponseHeaders(res,requestId,lambdaHeaders);let resBody;return result.encoding==="base64"&&typeof result.body=="string"?resBody=Buffer.from(result.body,"base64"):resBody=result.body,res.end(resBody);default:await this.sendError(req,res,requestId,"UNKNOWN_ASSET_TYPE")}};this.cwd=cwd,this.repoRoot=options.repoRoot??cwd,this.envConfigs={buildEnv:{},runEnv:{},allEnv:{}},this.envValues=options.envValues||{},this.projectId=options.projectId,this.orgId=options.orgId,this.queuePort=options.queuePort,this.runtimeCachePort=options.runtimeCachePort,this.schedulesPort=options.schedulesPort,this.scheduleBroker=new import_local_schedules2.ScheduleBroker({ownerId:this.orgId??"team_local",projectId:this.projectId??"prj_local",trackId:"development",dispatch:invocation=>this.dispatchSchedule(invocation),onError:(err,invocation)=>{try{output_manager_default.error(`Failed to dispatch schedule "${invocation.schedule.name}": ${(0,import_error_utils.errorToString)(err)}`)}catch{}}}),this.resourceProxyToken=randomBytes2(32).toString("base64url"),this.reportError=createErrorReporter(code=>options.onErrorCode?.(code)),this.files={},this.originalProjectSettings=options.projectSettings,this.projectSettings=options.projectSettings,this.services=options.services,this.useImplicitServicesEnvInjection=options.useImplicitServicesEnvInjection??!0,this.caseSensitive=!1,this.apiDir=null,this.apiExtensions=new Set,this.proxy=import_http_proxy_node16.default.createProxyServer({changeOrigin:!0,ws:!0,xfwd:!0}),this.proxy.on("proxyRes",(proxyRes,req)=>{proxyRes.headers.server="Vercel";let responseTransforms=this.responseTransformsByReq.get(req);responseTransforms&&(this.responseTransformsByReq.delete(req),applyResponseTransforms(proxyRes.headers,responseTransforms))}),this.proxy.on("error",(err,req,res)=>{if(output_manager_default.debug(`Proxy error for ${req?.url??"unknown request"}: ${(0,import_error_utils.errorToString)(err)}`),!!res){if("destroy"in res&&typeof res.destroy=="function"){res.destroy();return}res instanceof http.ServerResponse&&(res.headersSent||res.writeHead(502),res.end())}}),this.server=http.createServer(this.devServerHandler),this.server.timeout=0,this.queueServer=http.createServer((req,res)=>{this.handleResourceServerRequest(req,res,this.queueOrigin,this.handleQueuesRoute)}),this.runtimeCacheServer=http.createServer((req,res)=>{this.handleResourceServerRequest(req,res,this.runtimeCacheOrigin,this.handleRuntimeCacheRoute)}),this.schedulesServer=http.createServer((req,res)=>{this.handleResourceServerRequest(req,res,this.schedulesOrigin,this.handleSchedulesRoute)}),this.stopping=!1,this.buildMatches=new Map,this.inProgressBuilds=new Map,this.devCacheDir=join4(getVercelDirectory(cwd),"cache"),this.vercelConfigWarning=!1,this.getVercelConfigPromise=null,this.blockingBuildsPromise=null,this.startPromise=null,this.bulkRedirects=null,this.bulkRedirectsSignature=null,this.bulkRedirectsLastPath=null,this.bulkRedirectsResolvedPath=null,this.bulkRedirectsDirty=!0,this.watchAggregationId=null,this.watchAggregationEvents=[],this.watchAggregationTimeout=500,this.filter=path6=>!!path6,this.podId=Math.random().toString(32).slice(-5),this.shutdownCallbacks=new Map}get address(){if(!this._address)throw dev.DEV_INTERNAL_ADDRESS_UNAVAILABLE();return this._address}shouldUseServicesOrchestrator(){return!!(this.services&&this.services.length>0)}hasSubscribers(){return!!this.sidecars?.length}getDevQueueEnv(){return this.queueOrigin?getDevQueueEnv(this.queueOrigin,this.hasSubscribers()):{}}getDevRuntimeCacheEnv(env){return!this.runtimeCacheOrigin||env.RUNTIME_CACHE_ENDPOINT?{}:process.env.RUNTIME_CACHE_ENDPOINT?{RUNTIME_CACHE_ENDPOINT:process.env.RUNTIME_CACHE_ENDPOINT,...process.env.RUNTIME_CACHE_HEADERS?{RUNTIME_CACHE_HEADERS:process.env.RUNTIME_CACHE_HEADERS}:{}}:getDevRuntimeCacheEnv(this.runtimeCacheOrigin,DEV_RUNTIME_CACHE_API_PREFIX)}get resourceEndpoints(){if(!this.queueOrigin||!this.runtimeCacheOrigin)throw new Error("Local resource servers have not started");return{queues:{direct:this.queueOrigin,proxy:`${this.address.origin}${DEV_QUEUE_PROXY_PREFIX}/${this.resourceProxyToken}`},runtimeCache:{direct:`${this.runtimeCacheOrigin}${DEV_RUNTIME_CACHE_API_PREFIX}`,proxy:`${this.address.origin}${DEV_RUNTIME_CACHE_PREFIX}${this.resourceProxyToken}${DEV_RUNTIME_CACHE_API_PREFIX}`},...this.schedulesOrigin?{schedules:{direct:this.schedulesOrigin,proxy:`${this.address.origin}${DEV_SCHEDULES_PROXY_PREFIX}/${this.resourceProxyToken}`}}:{}}}getDevResourceMeta(){return{devResourceEndpoints:this.resourceEndpoints}}handleResourceServerRequest(req,res,origin,handler){if(!origin||!this.isAuthorizedResourceRequest(req,DEV_RESOURCE_TOKEN)){res.writeHead(401,{"WWW-Authenticate":"Bearer"}),res.end("Unauthorized");return}if(!isValidDevResourceHost(origin,req.headers.host)){res.writeHead(403),res.end("Forbidden");return}let pathname=new URL2(req.url||"/","http://127.0.0.1").pathname;handler(req,res,pathname).catch(err=>{output_manager_default.debug(`Local resource request failed for ${req.url||"/"}: ${(0,import_error_utils.errorToString)(err)}`),res.headersSent||res.writeHead(500),res.end("Internal Server Error")})}isAuthorizedResourceRequest(req,token){let authorization=req.headers.authorization;if(typeof authorization!="string")return!1;let encoder=new TextEncoder,actual=encoder.encode(authorization),expected=encoder.encode(`Bearer ${token}`);return actual.length===expected.length&&timingSafeEqual(actual,expected)}getBuilderDevEnv(match,env){let result={...env,...getDevSchedulesEnv(this.schedulesOrigin)};if(match.builderWithPkg.pkg.name!=="@vercel/container")return result;let endpoints=this.resourceEndpoints;return Object.assign(result,getDevSchedulesEnv(endpoints.schedules?.proxy,!0)),result.VERCEL_QUEUE_BASE_URL===endpoints.queues.direct&&Object.assign(result,getDevQueueEnv(endpoints.queues.proxy,result.VERCEL_HAS_WORKER_SERVICES!==void 0)),result.RUNTIME_CACHE_ENDPOINT===endpoints.runtimeCache.direct&&Object.assign(result,getDevRuntimeCacheEnv(endpoints.runtimeCache.proxy,"")),result}getSidecarDevMeta(match){let serviceCount=(this.sidecars??[]).filter(sidecar=>sidecar.builder.use!==match.use?!1:!sidecar.workspace||sidecar.workspace===".").length;return serviceCount>0?{serviceCount}:{}}async setupBuilderDevSidecars(){if(this.shouldUseServicesOrchestrator())return;let sidecars=this.sidecars??[];if(sidecars.length===0)return;Object.assign(this.envConfigs.runEnv,this.getDevQueueEnv());let services=sidecars.map(toOrchestratorService),orchestrator=new ServicesOrchestrator({services,cwd:this.cwd,repoRoot:this.repoRoot,env:this.envConfigs.allEnv,proxyOrigin:this.address.origin,resourceEndpoints:this.resourceEndpoints,useImplicitEnvInjection:!1,preferServiceBuilder:!0,onQueueSubscriptions:(serviceName,subscriptions)=>this.queueBroker?.updateServiceSubscriptions(serviceName,subscriptions)});this.sidecarOrchestrator=orchestrator,this.queueBroker?.registerServices(services);try{await orchestrator.startAll()}catch(err){throw await orchestrator.stopAll(),this.sidecarOrchestrator=void 0,this.sidecars=[],err}output_manager_default.log(`Started ${sidecars.length} development ${(0,import_pluralize2.default)("sidecar",sidecars.length)}`)}async exit(code=1){await this.stop(code),process.exit(code)}enqueueFsEvent(type,path6){this.bulkRedirectsResolvedPath&&(path6===this.bulkRedirectsResolvedPath||path6.startsWith(this.bulkRedirectsResolvedPath+sep2))&&(this.bulkRedirectsDirty=!0),this.watchAggregationEvents.push({type,path:path6}),this.watchAggregationId===null&&(this.watchAggregationId=setTimeout(()=>{let events=this.watchAggregationEvents.slice();this.watchAggregationEvents.length=0,this.watchAggregationId=null,this.handleFilesystemEvents(events).catch(err=>{output_manager_default.prettyError(err),(0,import_error_utils.isError)(err)&&typeof err.stack=="string"&&output_manager_default.debug(err.stack)})},this.watchAggregationTimeout))}async handleFilesystemEvents(events){if(this.stopping)return;output_manager_default.debug(`Filesystem watcher notified of ${events.length} events`);let filesChanged=new Set,filesRemoved=new Set,distPaths=[];for(let buildMatch of this.buildMatches.values())for(let buildResult of buildMatch.buildResults.values())buildResult.distPath&&distPaths.push(buildResult.distPath);if(events=events.filter(event=>distPaths.every(distPath=>!event.path.startsWith(distPath))),events.length!==0){this.functionReconciliations++;try{this.configGeneration++,this.functionDiscovery=void 0;for(let event of events)event.type==="add"?await this.handleFileCreated(event.path,filesChanged,filesRemoved):event.type==="unlink"?this.handleFileDeleted(event.path,filesChanged,filesRemoved):event.type==="change"&&await this.handleFileModified(event.path,filesChanged,filesRemoved);let vercelConfig=await this.getVercelConfig();if(this.stopping)return;await this.updateBuildMatches(vercelConfig);let filesChangedArray=[...filesChanged],filesRemovedArray=[...filesRemoved],needsRebuild=new Map;for(let match of this.buildMatches.values()){this.canonicalizeFunctionBuild(match);for(let[requestPath,result]of match.buildResults)if(!needsRebuild.has(result)&&Array.isArray(result.watch)){for(let pattern of result.watch)if(minimatches(filesChangedArray,pattern)||minimatches(filesRemovedArray,pattern)){needsRebuild.set(result,[requestPath,match]);break}}}if(needsRebuild.size>0){output_manager_default.debug(`Triggering ${needsRebuild.size} rebuilds`),filesChangedArray.length>0&&output_manager_default.debug(`Files changed: ${filesChangedArray.join(", ")}`),filesRemovedArray.length>0&&output_manager_default.debug(`Files removed: ${filesRemovedArray.join(", ")}`);for(let[result,[requestPath,match]]of needsRebuild)requestPath===null||await shouldServe(match,this.files,requestPath,this,vercelConfig)?this.triggerBuild(match,requestPath,null,vercelConfig,result,filesChangedArray,filesRemovedArray).catch(err=>{output_manager_default.warn(`An error occurred while rebuilding \`${match.src}\`:`),console.error(err.stack)}):output_manager_default.debug(`Not rebuilding because \`shouldServe()\` returned \`false\` for "${match.use}" request path "${requestPath}"`)}}finally{this.functionReconciliations--}}}async handleFileCreated(fsPath,changed,removed){let name=relative2(this.cwd,fsPath);try{await this.getVercelConfig(),this.files[name]=await import_build_utils9.FileFsRef.fromFsPath({fsPath});let extensionless=this.getExtensionlessFile(name);extensionless&&(this.files[extensionless]=await import_build_utils9.FileFsRef.fromFsPath({fsPath})),fileChanged(name,changed,removed),output_manager_default.debug(`File created: ${name}`)}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT")output_manager_default.debug(`File created, but has since been deleted: ${name}`),fileRemoved(name,this.files,changed,removed);else throw err}}handleFileDeleted(fsPath,changed,removed){let name=relative2(this.cwd,fsPath);output_manager_default.debug(`File deleted: ${name}`),fileRemoved(name,this.files,changed,removed);let extensionless=this.getExtensionlessFile(name);extensionless&&(output_manager_default.debug(`File deleted: ${extensionless}`),fileRemoved(extensionless,this.files,changed,removed))}async handleFileModified(fsPath,changed,removed){let name=relative2(this.cwd,fsPath);try{this.files[name]=await import_build_utils9.FileFsRef.fromFsPath({fsPath}),fileChanged(name,changed,removed),output_manager_default.debug(`File modified: ${name}`)}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT")output_manager_default.debug(`File modified, but has since been deleted: ${name}`),fileRemoved(name,this.files,changed,removed);else throw err}}async updateBuildMatches(vercelConfig,isInitial=!1){let fileList=this.resolveBuildFiles(this.files),matches=await getBuildMatches(vercelConfig,this.cwd,this,fileList),sources=matches.map(m=>m.src);isInitial&&fileList.length===0&&output_manager_default.warn("There are no files inside your deployment.");let ops=[];for(let src of this.buildMatches.keys())if(!sources.includes(src)){output_manager_default.debug(`Removing build match for "${src}"`);let match=this.buildMatches.get(src);match&&ops.push(shutdownBuilder(match)),this.buildMatches.delete(src)}await Promise.all(ops);let blockingBuilds=[];for(let match of matches){let currentMatch=this.buildMatches.get(match.src);if(!buildMatchEquals(currentMatch,match)&&(output_manager_default.debug(`Adding build match for "${match.src}" with "${match.use}"`),this.buildMatches.set(match.src,match),!isInitial&&needsBlockingBuild(match))){let buildPromise=executeBuild(vercelConfig,this,this.files,match,null,!1);blockingBuilds.push(buildPromise)}}blockingBuilds.length>0&&(output_manager_default.debug(`Waiting for ${blockingBuilds.length} "blocking builds"`),this.blockingBuildsPromise=Promise.all(blockingBuilds).then(()=>{output_manager_default.debug('Cleaning up "blockingBuildsPromise" after successful resolve'),this.blockingBuildsPromise=null}).catch(err=>{output_manager_default.debug(`Cleaning up "blockingBuildsPromise" after error: ${err}`),this.blockingBuildsPromise=null,err&&output_manager_default.prettyError(err)})),this.buildMatches=new Map([...this.buildMatches.entries()].sort((matchA,matchB)=>sortBuilders(matchA[1],matchB[1])))}async getLocalEnv(fileName,base){let filePath=join4(this.cwd,fileName),env={};try{let dotenv=await import_fs_extra.default.readFile(filePath,"utf8");output_manager_default.debug(`Using local env: ${filePath}`),env=(0,import_dotenv.parse)(dotenv),env=this.injectSystemValuesInDotenv(env)}catch(err){if(!(0,import_error_utils.isErrnoException)(err)||err.code!=="ENOENT")throw err}try{return{...this.validateEnvConfig(fileName,base||{},env)}}catch(err){if(err instanceof MissingDotenvVarsError)this.reportError(err),await this.exit();else throw err}return{}}getVercelConfig(){if(this.getVercelConfigPromise)return this.getVercelConfigPromise;this.getVercelConfigPromise=(async()=>{for(;;){let generation=this.configGeneration;try{let config=await this._getVercelConfig();if(this.stopping||generation===this.configGeneration)return config}catch(err){if(this.stopping||generation===this.configGeneration)throw err}this.functionDiscovery=void 0}})();let clear=this.clearVercelConfigPromise;return this.getVercelConfigPromise.then(clear,clear),this.getVercelConfigPromise}get devCommand(){return this.getDevCommand(this.projectSettings)}getDevCommand(projectSettings){if(projectSettings?.devCommand)return projectSettings.devCommand;if(projectSettings?.framework){let frameworkSlug=projectSettings.framework,framework=import_frameworks3.frameworkList.find(f=>f.slug===frameworkSlug);if(framework){let defaults=framework.settings.devCommand.value;if(defaults)return defaults}if((0,import_build_utils9.shouldUseExperimentalBackends)(frameworkSlug))return"npx @vercel/cervel dev"}}getFunctionDiscovery(options){let key=JSON.stringify(options);if(!this.functionDiscovery||this.functionDiscovery.key!==key){let promise=collectDevFunctions(options);this.functionDiscovery={key,promise},promise.catch(()=>{this.functionDiscovery?.promise===promise&&(this.functionDiscovery=void 0)})}return this.functionDiscovery.promise}getDevFunction(outputPath){return this.functionRegistry.functions.get(outputPath)}getDevSchedules(){return this.functionRegistry.schedules}async dispatchSchedule({delivery,signal}){if(signal.throwIfAborted(),this.stopping)throw new Error("Local Schedules is stopping");if(delivery.type==="queue"){if(!this.queueBroker)throw new Error("Local Queue broker is not ready");this.queueBroker.enqueue(delivery.topic,Buffer.from(JSON.stringify(delivery.message)),"application/json");return}if(delivery.type==="path"){if(!this.devProcessOrigin)throw new Error(`Schedule path "${delivery.path}" is not ready because the dev server is unavailable`);signal.throwIfAborted();let response=await directFetch(`${this.devProcessOrigin}${delivery.path}`,{method:"GET",signal});if(!response.ok)throw new Error(`Schedule path "${delivery.path}" returned HTTP ${response.status}`);return}let invoke=this.resolveDevFunction(delivery.function);if(!invoke)throw new Error(`Schedule function "${delivery.function}" is missing or not ready`);signal.throwIfAborted();let onAbort=()=>{},aborted=new Promise((_,reject)=>{onAbort=()=>reject(signal.reason),signal.addEventListener("abort",onAbort,{once:!0})});try{let result=await Promise.race([aborted,invoke({method:"POST",headers:delivery.headers,body:Buffer.alloc(0),signal})]);if(!result)throw new Error(`Schedule function "${delivery.function}" is missing or not ready`);if(!result.ok)throw new Error(`Schedule function "${delivery.function}" returned HTTP ${result.status}`)}finally{signal.removeEventListener("abort",onAbort)}}resolveDevFunction(outputPath){let fn2=this.getDevFunction(outputPath);if(!fn2||this.stopping)return null;if(fn2.invocation.type==="http"){if(!this.devProcessOrigin)return null}else if(!this.functionDispatchReady||this.functionReconciliations>0||!this.getDevFunctionMatch(fn2))return null;return request=>this.invokeDevFunction(outputPath,request)}getDevFunctionMatch(fn2){if(fn2.invocation.type!=="entrypoint"||fn2.scope.target!=="builder")return;let{entrypoint}=fn2.invocation;return[...this.buildMatches.values()].find(match=>match.entrypoint===entrypoint&&match.use===fn2.scope.build.use&&(0,import_fast_deep_equal.default)(match.config??{},fn2.scope.build.config??{}))}canonicalizeFunctionBuild(match){if(![...this.functionRegistry.functions.values()].some(fn2=>this.getDevFunctionMatch(fn2)===match))return!1;if(match.buildResults.size&&!(match.buildResults.size===1&&match.buildResults.has(null))){let results=[...match.buildResults.values()],result=results[results.length-1];result.watch=[...new Set(results.flatMap(result2=>result2.watch))],match.buildResults.clear(),match.buildResults.set(null,result)}return!0}async invokeDevFunction(outputPath,request){request.signal?.throwIfAborted();let fn2=this.getDevFunction(outputPath);if(!fn2||!this.resolveDevFunction(outputPath))return null;let generation=this.configGeneration,isCurrent=()=>!this.stopping&&generation===this.configGeneration&&this.getDevFunction(outputPath)===fn2;if(fn2.invocation.type==="http"){let response=await directFetch(`${this.devProcessOrigin}${fn2.invocation.pathname}`,{...request,redirect:"manual"});return await response.arrayBuffer(),{ok:response.ok,status:response.status}}let match=this.getDevFunctionMatch(fn2),config=this.functionConfig,req=new http.IncomingMessage(new Socket);req.method=request.method,req.url=`/${outputPath}`,req.headers={host:this.address.host,...request.headers};let requestId=generateRequestId(this.podId,!0),currentMatch=()=>!request.signal?.aborted&&isCurrent()&&this.getDevFunctionMatch(fn2)===match,devServerResult=await this.startBuildMatchDevServer(match,outputPath);if(devServerResult){let{port,pid,shutdown,persistent}=devServerResult;this.shutdownCallbacks.set(pid,shutdown);try{if(!currentMatch())return null;let response=await directFetch(`http://127.0.0.1:${port}/${outputPath}`,{...request,headers:nodeHeadersToFetchHeaders({...req.headers,...this.getProxyHeaders(req,requestId,!0)}),redirect:"manual"});return await response.arrayBuffer(),{ok:response.ok,status:response.status}}finally{let current=this.getDevFunction(outputPath);(this.stopping||!persistent||!current||this.getDevFunctionMatch(current)!==match)&&this.shutdownCallbacks.has(pid)&&await this.killBuilderDevServer(pid)}}if(!currentMatch())return null;let{entrypoint}=fn2.invocation,getAsset=()=>match.buildOutput[(match.buildResultVersion??match.builderWithPkg.builder.version)===2?outputPath:entrypoint];this.canonicalizeFunctionBuild(match);let asset=getAsset();if((!asset||this.inProgressBuilds.get(match)?.size)&&(await this.triggerBuild(match,null,null,config),asset=getAsset()),!currentMatch())return null;if(!asset||asset.type!=="Lambda"||!asset.fn)return{ok:!1,status:404};let result=await this.invokeBuiltLambda(asset,req,requestId,request.body);return{ok:result.statusCode>=200&&result.statusCode<300,status:result.statusCode}}async startBuildMatchDevServer(match,requestPath){let{builder}=match.builderWithPkg;if(!builder.startDevServer)return null;let{envConfigs,files,devCacheDir,cwd:workPath}=this;return builder.startDevServer({files,entrypoint:match.entrypoint,workPath,config:match.config||{},repoRootPath:this.repoRoot,meta:{isDev:!0,...this.getDevResourceMeta(),requestPath,devCacheDir,...this.getSidecarDevMeta(match),env:this.getBuilderDevEnv(match,{...envConfigs.runEnv,VERCEL_DEBUG_PREFIX:output_manager_default.debugEnabled?"[builder]":void 0}),buildEnv:{...envConfigs.buildEnv}}})}invokeBuiltLambda(asset,req,requestId,body){let payload={method:req.method||"GET",host:req.headers.host,path:req.url||"/",headers:{...req.headers,...this.getProxyHeaders(req,requestId,!0)},encoding:"base64",body:body.toString("base64")};return asset.fn({Action:"Invoke",body:JSON.stringify(payload)})}async _getVercelConfig(){let generation=this.configGeneration,{compileVercelConfig}=await import("../../chunks/compile-vercel-config-56X2X4Z3.js"),compiled=await compileVercelConfig(this.cwd),configPath=getLocalPathConfig(this.cwd,!!compiled.sourceFile),[pkg=null,vercelConfig={version:2,[import_client.fileNameSymbol]:"vercel.json"}]=await Promise.all([this.readJsonFile("package.json"),this.readJsonFile(configPath,!0)]);await this.validateVercelConfig(vercelConfig);let functionConfig=structuredClone(vercelConfig),sourceFiles;for(let[name,service]of Object.entries(this.queueBroker?vercelConfig.services??vercelConfig.experimentalServicesV2??{}:{}))if(Object.values(service.functions??{}).some(fn2=>fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta")))throw dev.DEV_QUEUE_FUNCTION_UNSUPPORTED({sourceFile:`services.${name}.functions`,reason:"service-hosted function queue triggers are not supported locally yet"});let nextProjectSettings={...this.originalProjectSettings,...pickOverrides(vercelConfig)},{error:routeError,routes:maybeRoutes}=(0,import_routing_utils3.getTransformedRoutes)(vercelConfig);routeError&&(this.reportError(routeError),await this.exit()),vercelConfig.routes=maybeRoutes||[];let hasServices=(this.services?.length??0)>0,hasResolvedServices=!!this.services&&this.services.length>0;if(!vercelConfig.experimentalServices&&!hasResolvedServices&&(!vercelConfig.builds||vercelConfig.builds.length===0)){let{projectSettings,cleanUrls,trailingSlash}=vercelConfig,files=(await staticFiles(this.cwd,{})).map(f=>relative2(this.cwd,f));sourceFiles=files;let detectionOptions={tag:"latest",bunVersion:vercelConfig.bunVersion,functions:vercelConfig.functions,projectSettings:projectSettings||nextProjectSettings,featHandleMiss:!0,cleanUrls,trailingSlash,proxy:vercelConfig.proxy,workPath:this.cwd},detectedBuilders=await(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,detectionOptions);for(;detectedBuilders.errors?.length===1&&detectedBuilders.errors[0].code==="unused_function";){let error2=detectedBuilders.errors[0],unmatchedTrigger=Object.entries(detectionOptions.functions??{}).find(([pattern,fn2])=>error2.message.startsWith(`The pattern "${pattern}" defined in \`functions\` `)&&fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta"||trigger.type==="schedule/v1beta"));if(!unmatchedTrigger)break;detectionOptions.functions={...detectionOptions.functions},delete detectionOptions.functions[unmatchedTrigger[0]],detectedBuilders=await(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,detectionOptions)}let{builders,warnings,errors,defaultRoutes,redirectRoutes,rewriteRoutes,errorRoutes}=detectedBuilders,hostRewriteRoutes=detectedBuilders.hostRewriteRoutes;if(errors){if(this.functionConfig)throw errors[0];this.reportError(errors[0]),await this.exit()}if(warnings?.length>0&&warnings.forEach(warning=>output_manager_default.warn(warning.message,null,warning.link,warning.action)),builders){let buildpackRuntime=builders.map(getBuildpackRuntime).find(runtime=>runtime!==void 0);if(buildpackRuntime)throw buildpackDevUnsupportedError(buildpackRuntime);vercelConfig.builds=vercelConfig.builds||[],vercelConfig.builds.push(...builders),delete vercelConfig.functions}let serviceRewrites=detectedBuilders.serviceRewrites,serviceRewriteRoutes=serviceRewrites&&serviceRewrites.length>0?(0,import_routing_utils3.convertRewrites)(serviceRewrites):null,routes=[];routes.push(...redirectRoutes||[]),routes=(0,import_routing_utils3.appendRoutesToPhase)({routes,newRoutes:hostRewriteRoutes??null,phase:null}),routes.push(...(0,import_routing_utils3.appendRoutesToPhase)({routes:vercelConfig.routes,newRoutes:[...rewriteRoutes||[],...serviceRewriteRoutes||[]],phase:"filesystem"})),routes=(0,import_routing_utils3.appendRoutesToPhase)({routes,newRoutes:errorRoutes,phase:"error"}),routes.push(...defaultRoutes||[]),vercelConfig.routes=routes}else if(hasResolvedServices&&vercelConfig.proxy){let{entrypoint}=vercelConfig.proxy;await import_fs_extra.default.pathExists(join4(this.cwd,entrypoint))||(output_manager_default.error(`The proxy entrypoint \`${entrypoint}\` does not exist. Set \`proxy.entrypoint\` to an existing \`.js\` or \`.ts\` file.`),await this.exit()),vercelConfig.builds=vercelConfig.builds||[],vercelConfig.builds.push((0,import_fs_detectors2.getProxyBuilder)(vercelConfig.proxy,"latest",vercelConfig.functions))}if(this.sidecars===void 0){let services=(this.services??[]).filter(import_build_utils9.isExperimentalServiceV2);this.sidecars=await collectBuilderDevSidecars({builds:this.shouldUseServicesOrchestrator()?services.map(service=>service.builder):vercelConfig.builds??[],workPath:this.cwd,services})}let functionBuilds=[...vercelConfig.builds??[]];Array.isArray(vercelConfig.builds)&&((this.getDevCommand(nextProjectSettings)||hasServices)&&(vercelConfig.builds=vercelConfig.builds.filter(this.shouldBuildInDev)),vercelConfig.builds.sort(sortBuilders)),vercelConfig.routes=(vercelConfig.routes||[]).filter(route=>"has"in route?(this.vercelConfigWarning||(this.vercelConfigWarning=!0,output_manager_default.warn(`The "has" property in ${vercelConfig[import_client.fileNameSymbol]} will be ignored during development. Deployments will work as expected.`)),!1):!0);let[runEnv,buildEnv]=await Promise.all([this.getLocalEnv(".env",vercelConfig.env),this.getLocalEnv(".env.build",vercelConfig.build?.env)]),allEnv={...buildEnv,...runEnv};if(Object.keys(allEnv).length===0){let envValues={...this.envValues};this.address.host&&(envValues.VERCEL_URL=this.address.host),allEnv={...envValues},runEnv={...envValues},buildEnv={...envValues}}runEnv.NODE_ENV??=process.env.NODE_ENV??"development",allEnv.NODE_ENV??=runEnv.NODE_ENV,runEnv.NOW_REGION="dev1",buildEnv.NOW_REGION="dev1",allEnv.NOW_REGION="dev1",allEnv.VERCEL_ENV="development",allEnv.VERCEL="1",this.projectId&&!process.env.VERCEL_PROJECT_ID&&("VERCEL_PROJECT_ID"in allEnv||(allEnv.VERCEL_PROJECT_ID=this.projectId),"VERCEL_PROJECT_ID"in runEnv||(runEnv.VERCEL_PROJECT_ID=this.projectId)),this.orgId&&!process.env.VERCEL_ORG_ID&&("VERCEL_ORG_ID"in allEnv||(allEnv.VERCEL_ORG_ID=this.orgId),"VERCEL_ORG_ID"in runEnv||(runEnv.VERCEL_ORG_ID=this.orgId)),nextProjectSettings?.autoExposeSystemEnvs&&(runEnv.VERCEL_REGION="dev1"),runEnv.VERCEL_CLI_VERSION=pkg_default.version,Object.assign(runEnv,this.getDevQueueEnv()),Object.assign(runEnv,getDevSchedulesEnv(this.schedulesOrigin)),Object.assign(allEnv,getDevSchedulesEnv(this.schedulesOrigin)),Object.assign(runEnv,this.getDevRuntimeCacheEnv(runEnv));let hasQueueFunctions=Object.values(functionConfig.functions??{}).some(fn2=>fn2.experimentalTriggers?.some(trigger=>trigger.type==="queue/v2beta"));if(this.queueBroker&&hasQueueFunctions&&hasResolvedServices)throw dev.DEV_QUEUE_FUNCTION_UNSUPPORTED({sourceFile:"functions",reason:"service-hosted function queue triggers are not supported locally yet"});let registry=await this.getFunctionDiscovery({scopes:(hasResolvedServices?[]:functionBuilds).map(build=>({build,target:vercelConfig.builds?.includes(build)?"builder":"framework"})),workPath:this.cwd,files:(sourceFiles??(await staticFiles(this.cwd,{})).map(f=>relative2(this.cwd,f))).sort(),config:functionConfig,env:{...process.env,...allEnv,...this.getDevQueueEnv(),...getDevSchedulesEnv(this.schedulesOrigin),...this.getDevRuntimeCacheEnv(allEnv)}}),subscriptions,staticSchedules,sourceChanged;try{subscriptions=deriveQueueSubscriptions(registry),this.queueBroker?.validateFunctionSubscriptions(subscriptions),staticSchedules=collectStaticSchedules(functionConfig.schedules,registry),sourceChanged=!(0,import_fast_deep_equal.default)(this.staticSchedulesSnapshot,staticSchedules),sourceChanged&&this.scheduleBroker.validateStatic(staticSchedules)}catch(err){throw this.functionDiscovery=void 0,err}let{unmatchedPatterns}=registry;if(await this.refreshBulkRedirects(vercelConfig.bulkRedirectsPath),this.devCommandStarts.size&&await Promise.all(this.devCommandStarts),this.stopping||generation!==this.configGeneration)return vercelConfig;let restartForFunctionEnv=!!(this.devCommandEnv&&[...registry.functions.values()].some(fn2=>fn2.invocation.type==="http")&&!(0,import_fast_deep_equal.default)(this.devCommandEnv,allEnv)),previousProcess=this.devProcess,previousOrigin=this.devProcessOrigin,previousCommand=this.currentDevCommand,previousEnv=this.devCommandEnv,previousRuntime={projectSettings:this.projectSettings,allEnv:previousEnv??this.envConfigs.allEnv},restarted,validated=!1;try{if(this.initialDevCommandStarted&&await this.runDevCommand(restartForFunctionEnv,{projectSettings:nextProjectSettings,allEnv},origin=>{restarted={origin}}),this.stopping||generation!==this.configGeneration)return vercelConfig;this.queueBroker?.validateFunctionSubscriptions(subscriptions),sourceChanged=!(0,import_fast_deep_equal.default)(this.staticSchedulesSnapshot,staticSchedules),sourceChanged&&(this.scheduleBroker.validateStatic(staticSchedules),this.scheduleBroker.reconcileStatic(staticSchedules),this.staticSchedulesSnapshot=structuredClone(staticSchedules)),validated=!0}finally{!this.stopping&&!validated&&(this.devProcess!==previousProcess||this.devProcessOrigin!==previousOrigin||this.currentDevCommand!==previousCommand||this.devCommandEnv!==previousEnv)&&await this.runDevCommand(!0,previousRuntime)}this.projectSettings=nextProjectSettings,this.caseSensitive=hasNewRoutingProperties(vercelConfig),this.apiDir=(0,import_fs_detectors2.detectApiDirectory)(vercelConfig.builds||[]),this.apiExtensions=(0,import_fs_detectors2.detectApiExtensions)(vercelConfig.builds||[]),this.envConfigs={buildEnv,runEnv,allEnv},this.functionRegistry=registry,this.functionConfig=vercelConfig,restarted&&(this.devProcessOrigin=restarted.origin),this.queueBroker?.setFunctionSubscriptions(subscriptions,outputPath=>this.resolveDevFunction(outputPath));for(let pattern of unmatchedPatterns)if(!this.unmatchedQueuePatterns.has(pattern)){let warning=dev.DEV_QUEUE_FUNCTION_UNMATCHED({pattern});output_manager_default.warn(`[${warning.name}] ${warning.message} ${warning.fix}`)}return this.unmatchedQueuePatterns=new Set(unmatchedPatterns),vercelConfig}async refreshBulkRedirects(bulkRedirectsPath){let configPath=bulkRedirectsPath??null;if(configPath===this.bulkRedirectsLastPath&&!this.bulkRedirectsDirty)return;if(this.bulkRedirectsLastPath=configPath,this.bulkRedirectsDirty=!1,this.bulkRedirectsResolvedPath=configPath?resolveBulkRedirectsPath(this.cwd,configPath):null,!configPath){this.bulkRedirects=null,this.bulkRedirectsSignature=null;return}let signature=await getBulkRedirectsSignature(this.cwd,configPath);if(signature!==this.bulkRedirectsSignature){this.bulkRedirectsSignature=signature;try{let result=await loadBulkRedirects(this.cwd,configPath);this.bulkRedirects=result.table;for(let warning of result.warnings)output_manager_default.warn(warning);let count=result.table.size;count>0&&output_manager_default.log(`Loaded ${count} bulk ${(0,import_pluralize2.default)("redirect",count)} from ${configPath}`)}catch(err){this.bulkRedirects=null,output_manager_default.warn(`Failed to load bulk redirects from "${configPath}": ${(0,import_error_utils.errorToString)(err)}`)}}}async readJsonFile(filePath,strict=!1){let rel,abs;isAbsolute3(filePath)?(rel=path4.relative(this.cwd,filePath),abs=filePath):(rel=filePath,abs=join4(this.cwd,filePath)),output_manager_default.debug(`Reading \`${rel}\` file`);try{let raw=await import_fs_extra.default.readFile(abs,"utf8"),parsed=(0,import_json_parse_better_errors.default)(raw);return parsed[import_client.fileNameSymbol]=rel,parsed}catch(err){if(strict&&!((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"))throw err;if((0,import_error_utils.isError)(err))(0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"?output_manager_default.debug(`No \`${rel}\` file present`):err.name==="SyntaxError"&&output_manager_default.warn(`There is a syntax error in the \`${rel}\` file: ${err.message}`);else throw err}}async tryValidateOrExit(config,validate){let message2=validate(config);message2&&(output_manager_default.error(message2),await this.exit(1))}async validateVercelConfig(config){if(config.version===1){if(this.functionConfig)throw dev.DEV_UNSUPPORTED_CONFIG_VERSION();this.reportError(dev.DEV_UNSUPPORTED_CONFIG_VERSION()),await this.exit(1);return}let error2=validateConfig(config);if(error2){if(this.functionConfig)throw error2;this.reportError(error2),await this.exit(1)}}validateEnvConfig(type,env={},localEnv={}){let missing=Object.entries(env).filter(([name,value])=>typeof value=="string"&&value.startsWith("@")&&!hasProp(localEnv,name)).map(([name])=>name);if(missing.length>0)throw new MissingDotenvVarsError(type,missing);let merged={...env,...localEnv},hasInvalidName=!1;for(let key of Object.keys(merged))/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key)||(output_manager_default.warn(`Ignoring ${type.split(".").slice(1).reverse().join(" ")} var ${JSON.stringify(key)} because name is invalid`),hasInvalidName=!0,delete merged[key]);return hasInvalidName&&output_manager_default.log("The name contains invalid characters. Only letters, digits, and underscores are allowed. Furthermore, the name should not start with a digit"),merged}injectSystemValuesInDotenv(env){for(let name of Object.keys(env))name==="VERCEL_URL"?env.VERCEL_URL=this.address.host:name==="VERCEL_REGION"&&(env.VERCEL_REGION="dev1");return env}resolveBuildFiles(files){return Object.keys(files).filter(this.filter)}isWatcherIgnored(fsPath){let relativePath=relative2(this.cwd,fsPath);return relativePath===""?!1:!this.filter(relativePath)}start(...listenSpec){return this.startPromise||(this.startPromise=this._start(...listenSpec).catch(async err=>{throw await this.stop(),err})),this.startPromise}async _start(...listenSpec){if(!import_fs_extra.default.existsSync(this.cwd))throw dev.DEV_CWD_NOT_FOUND({cwd:this.cwd});if(!import_fs_extra.default.lstatSync(this.cwd).isDirectory())throw dev.DEV_CWD_NOT_DIRECTORY({cwd:this.cwd});let{ig}=await(0,import_client.getVercelIgnore)(this.cwd);this.filter=ig.createFilter();let address=null;for(;typeof address!="string";)try{address=(await(0,import_async_listen.listen)(this.server,...listenSpec)).toString()}catch(err){if((0,import_error_utils.isErrnoException)(err))output_manager_default.debug(`Got listen error: ${err.code}`),err.code==="EADDRINUSE"&&(typeof listenSpec[0]=="number"?(output_manager_default.note(`Requested port ${import_chalk2.default.yellow(String(listenSpec[0]))} is already in use`),listenSpec[0]++):(this.reportError(dev.DEV_LISTEN_ADDRESS_IN_USE({address:String(listenSpec[0])})),process.exit(1)));else throw err}this._address=new URL2(replaceLocalhost(address)),this.runtimeCache=new RuntimeCacheStore;let runtimeCacheListener=await listenOnDevResourcePort(this.runtimeCacheServer,{name:"Runtime Cache",flag:"--runtime-cache-port",defaultPort:DEV_RUNTIME_CACHE_DEFAULT_PORT,port:this.runtimeCachePort,reservedPorts:[this.queuePort,this.schedulesPort??DEV_SCHEDULES_DEFAULT_PORT].filter(port=>port!==void 0&&port!==0)});this.runtimeCacheOrigin=runtimeCacheListener.origin,runtimeCacheListener.defaultPort!==void 0&&output_manager_default.warn(`Runtime Cache default port ${runtimeCacheListener.defaultPort} is unavailable; listening on ${runtimeCacheListener.port} instead.
|
|
56
56
|
External clients configured for ${runtimeCacheListener.defaultPort} will not reach this dev server. Pin a port with --runtime-cache-port.`);let queueListener=await listenOnDevResourcePort(this.queueServer,{name:"Vercel Queues",flag:"--queue-port",defaultPort:DEV_QUEUE_DEFAULT_PORT,port:this.queuePort,reservedPorts:[this.schedulesPort??DEV_SCHEDULES_DEFAULT_PORT]});this.queueOrigin=queueListener.origin,queueListener.defaultPort!==void 0&&output_manager_default.warn(`Vercel Queues default port ${queueListener.defaultPort} is unavailable; listening on ${queueListener.port} instead.
|
|
57
57
|
External clients configured for ${queueListener.defaultPort} will not reach this dev server. Pin a port with --queue-port.`),this.queueBroker=new QueueBroker([],name=>this.orchestrator?.getServiceOrigin(name)??this.sidecarOrchestrator?.getServiceOrigin(name)??null);let schedulesListener=await listenOnDevResourcePort(this.schedulesServer,{name:"Vercel Schedules",flag:"--schedules-port",defaultPort:DEV_SCHEDULES_DEFAULT_PORT,port:this.schedulesPort});this.schedulesOrigin=schedulesListener.origin,schedulesListener.defaultPort!==void 0&&output_manager_default.print(import_chalk2.default.yellow(`! Vercel Schedules default port ${schedulesListener.defaultPort} is unavailable; listening on ${schedulesListener.port} instead.
|
|
58
58
|
Pin a port with --schedules-port for clients outside the dev server.
|