vercel 59.25.0 → 59.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/chunks/{add-VI6GCTOM.js → add-6MVD3GYU.js} +1 -1
  2. package/dist/chunks/{add-M4CAL43A.js → add-B6SKHP6R.js} +1 -1
  3. package/dist/chunks/{add-UQUROKDW.js → add-Y34MSA3T.js} +1 -1
  4. package/dist/chunks/{build-KQJVVWRT.js → build-PC5EQP2P.js} +1 -1
  5. package/dist/chunks/{chunk-AX3CQSVT.js → chunk-25MLFUQD.js} +1 -1
  6. package/dist/chunks/{chunk-RRTWGLJT.js → chunk-26LYRNMQ.js} +2 -2
  7. package/dist/chunks/{chunk-3V7QO2DE.js → chunk-2HZGNTI4.js} +1 -1
  8. package/dist/chunks/{chunk-YUQ2GQBY.js → chunk-3YEWE5MO.js} +1 -1
  9. package/dist/chunks/{chunk-6ISN6ZNQ.js → chunk-47BI2WLV.js} +1 -1
  10. package/dist/chunks/{chunk-GQGVOJ4V.js → chunk-4M7CX4YK.js} +1 -1
  11. package/dist/chunks/{chunk-DXYF2ULP.js → chunk-4NAYJHLI.js} +1 -1
  12. package/dist/chunks/{chunk-XDFTDPGS.js → chunk-643SKD3D.js} +1 -1
  13. package/dist/chunks/chunk-67ADLWX4.js +7 -0
  14. package/dist/chunks/{chunk-EWGDLEGG.js → chunk-CDK22NA2.js} +1 -1
  15. package/dist/chunks/{chunk-VGECSVOP.js → chunk-DUZUOQVB.js} +1 -1
  16. package/dist/chunks/{chunk-OXDGBPM6.js → chunk-F7UV4YLV.js} +2 -2
  17. package/dist/chunks/{chunk-GKWT55SU.js → chunk-FVIQMWYR.js} +1 -1
  18. package/dist/chunks/{chunk-B6RDQTJF.js → chunk-GA65WALP.js} +1 -1
  19. package/dist/chunks/{chunk-Q2KQTYPU.js → chunk-GJZRIDFC.js} +1 -1
  20. package/dist/chunks/{chunk-LN7DRS3D.js → chunk-GTDDB5H3.js} +1 -1
  21. package/dist/chunks/{chunk-7CQGVZ6Z.js → chunk-JUUECT2E.js} +1 -1
  22. package/dist/chunks/{chunk-RQTVTHE7.js → chunk-M3HTK4NR.js} +1 -1
  23. package/dist/chunks/{chunk-3JHCLQOM.js → chunk-MAWP4YIY.js} +1 -1
  24. package/dist/chunks/{chunk-IPTMDVQX.js → chunk-MXCU7XDC.js} +1 -1
  25. package/dist/chunks/{chunk-3QHHQAHD.js → chunk-OICV3NTQ.js} +1 -1
  26. package/dist/chunks/{chunk-EO4G5E7C.js → chunk-P6C5L7KC.js} +3 -3
  27. package/dist/chunks/{chunk-ZDB3FWQF.js → chunk-PSPKPQRS.js} +1 -1
  28. package/dist/chunks/{chunk-2VEEUAB2.js → chunk-Q22JZSWD.js} +1 -1
  29. package/dist/chunks/{chunk-KYYVQW52.js → chunk-Q6O7GA7P.js} +1 -1
  30. package/dist/chunks/{chunk-K72XWICT.js → chunk-Q7UVAEN3.js} +1 -1
  31. package/dist/chunks/{chunk-YUL3DN2H.js → chunk-QMO7LJLU.js} +1 -1
  32. package/dist/chunks/{chunk-RKH42432.js → chunk-T6A5HA5U.js} +1 -1
  33. package/dist/chunks/{chunk-XEWSGP2D.js → chunk-TF6R2AK2.js} +1 -1
  34. package/dist/chunks/{chunk-7QPE2TB5.js → chunk-TFG7RTGQ.js} +1 -1
  35. package/dist/chunks/{chunk-4VC32DHS.js → chunk-TGR6YHGO.js} +1 -1
  36. package/dist/chunks/chunk-TOHAMRDX.js +65 -0
  37. package/dist/chunks/{chunk-REDC5VPI.js → chunk-UFFYFZAM.js} +1 -1
  38. package/dist/chunks/{chunk-4N526L5G.js → chunk-UOHEF2JZ.js} +1 -1
  39. package/dist/chunks/{chunk-77Z66QDE.js → chunk-UWLDK7LJ.js} +1 -1
  40. package/dist/chunks/{chunk-GWSFFKFF.js → chunk-VTQUMQ2P.js} +1 -1
  41. package/dist/chunks/{chunk-DAWC332R.js → chunk-XJUAWZU2.js} +2 -2
  42. package/dist/chunks/{chunk-HZ5ZZCUZ.js → chunk-ZY3FVURC.js} +1 -1
  43. package/dist/chunks/{clear-OCDDL3S6.js → clear-HVRCYR7Y.js} +1 -1
  44. package/dist/chunks/{compile-vercel-config-UXTDRI6O.js → compile-vercel-config-C6HK4CET.js} +1 -1
  45. package/dist/chunks/{config-46HFJIVB.js → config-IGE3P5DW.js} +1 -1
  46. package/dist/chunks/{config-BTACRRGK.js → config-OWBQ7UMH.js} +1 -1
  47. package/dist/chunks/config-validator.mjs +1 -1
  48. package/dist/chunks/{delete-CWCGCHDO.js → delete-44OXGSMJ.js} +1 -1
  49. package/dist/chunks/{delete-Q3YKRT7J.js → delete-7TLDNY3R.js} +1 -1
  50. package/dist/chunks/{detect-projects-BTDKBOU4.js → detect-projects-MUTN7PJG.js} +1 -1
  51. package/dist/chunks/{detect-services-EEFYZN3O.js → detect-services-YFGQZSKL.js} +1 -1
  52. package/dist/chunks/{disable-FD757X27.js → disable-CAXQ5K7P.js} +1 -1
  53. package/dist/chunks/{discard-MCCFXCZX.js → discard-VK4JVVUI.js} +1 -1
  54. package/dist/chunks/{edit-6OV2FEJN.js → edit-OUEGHFNI.js} +1 -1
  55. package/dist/chunks/{edit-4G7SOJA4.js → edit-QQYOUSYT.js} +1 -1
  56. package/dist/chunks/{enable-Q633KLQ3.js → enable-J3JXIEXT.js} +1 -1
  57. package/dist/chunks/{exec-YH5WUJ4C.js → exec-3RMS2X6B.js} +1 -1
  58. package/dist/chunks/{export-CRBBRS6Y.js → export-V6BO2IPM.js} +1 -1
  59. package/dist/chunks/{generate-cert-for-deploy-V3LNOFRV.js → generate-cert-for-deploy-MICLCYMH.js} +1 -1
  60. package/dist/chunks/{image-ABRB2PUJ.js → image-2XS5KWHL.js} +1 -1
  61. package/dist/chunks/{import-builders-EJEQ4WXC.js → import-builders-P5BVQ6XV.js} +1 -1
  62. package/dist/chunks/{inspect-IED7TPJ3.js → inspect-4BJNJTCC.js} +1 -1
  63. package/dist/chunks/{inspect-DS7LIUWG.js → inspect-FFSXZNJX.js} +1 -1
  64. package/dist/chunks/{inspect-J3CBCMIX.js → inspect-NGKRKYFJ.js} +1 -1
  65. package/dist/chunks/{inspect-A77NDMCO.js → inspect-WEURPPD2.js} +1 -1
  66. package/dist/chunks/{inspect-JFCMOHNJ.js → inspect-XASVKP45.js} +1 -1
  67. package/dist/chunks/{list-FEHTM5WL.js → list-DMNKMHHX.js} +1 -1
  68. package/dist/chunks/{list-KSC5IJSH.js → list-P35Q5I52.js} +1 -1
  69. package/dist/chunks/{list-KLXDBNFC.js → list-WZZJBBRG.js} +1 -1
  70. package/dist/chunks/{login-S63HHO6R.js → login-5OBK5VD6.js} +1 -1
  71. package/dist/chunks/{login-C4PUINCQ.js → login-VJZGWSOW.js} +1 -1
  72. package/dist/chunks/{logs-6BYIWJPY.js → logs-VRRUJRHE.js} +1 -1
  73. package/dist/chunks/{ls-UAWOECKQ.js → ls-6RY2JL5Y.js} +1 -1
  74. package/dist/chunks/{ls-IZWWHIEK.js → ls-J6HN2ZV6.js} +1 -1
  75. package/dist/chunks/{ls-IKHNJQFH.js → ls-KDS7XXBR.js} +1 -1
  76. package/dist/chunks/{ls-C47FWYJ6.js → ls-PFPQ4FVQ.js} +1 -1
  77. package/dist/chunks/{ls-H4BCSNTG.js → ls-URHGCRIJ.js} +1 -1
  78. package/dist/chunks/{ls-DHEY2FBJ.js → ls-YLEQL3HD.js} +1 -1
  79. package/dist/chunks/{ls-YCPRYUT7.js → ls-ZQ7XIDOR.js} +1 -1
  80. package/dist/chunks/{mutate-X22CUEKM.js → mutate-YBYD3KNW.js} +1 -1
  81. package/dist/chunks/{notifications-HDMUEMWS.js → notifications-SB5JHLTX.js} +1 -1
  82. package/dist/chunks/{open-DU3MYPC3.js → open-A6XQS4I6.js} +1 -1
  83. package/dist/chunks/{openapi-ULBM7RWG.js → openapi-G3HACVTQ.js} +1 -1
  84. package/dist/chunks/{permissions-PBNI3ZE3.js → permissions-C4UXCLJM.js} +1 -1
  85. package/dist/chunks/{prompt-missing-credentials-K6IWGP2N.js → prompt-missing-credentials-KCPCA6L7.js} +1 -1
  86. package/dist/chunks/{publish-BDBMRK5M.js → publish-TEH23DH4.js} +1 -1
  87. package/dist/chunks/{pull-KMLPNSY3.js → pull-75Z4DDJE.js} +1 -1
  88. package/dist/chunks/{purchase-domain-if-available-ZNTAIIJN.js → purchase-domain-if-available-MMZA2NKN.js} +1 -1
  89. package/dist/chunks/{push-XPKPIGFN.js → push-MVETL2WL.js} +1 -1
  90. package/dist/chunks/{query-ITYSKSNF.js → query-SZHNXTY4.js} +1 -1
  91. package/dist/chunks/{reorder-CZ6OAJ5D.js → reorder-QLBFRK7S.js} +1 -1
  92. package/dist/chunks/{reply-QENWO3AS.js → reply-YAQS5FVC.js} +1 -1
  93. package/dist/chunks/{resolve-IJUP7C3T.js → resolve-HANE4JO2.js} +1 -1
  94. package/dist/chunks/{restore-GUJCGF3E.js → restore-4JNAT7IE.js} +1 -1
  95. package/dist/chunks/{rm-OTDHLXGL.js → rm-ARC7WDLH.js} +1 -1
  96. package/dist/chunks/{rm-T5F5THS2.js → rm-CVCPQXJI.js} +1 -1
  97. package/dist/chunks/{rm-2YGKGNKJ.js → rm-JWNSB3XZ.js} +1 -1
  98. package/dist/chunks/{rm-5MVVB7NO.js → rm-LYOMGU2M.js} +1 -1
  99. package/dist/chunks/{rm-3POYUGWI.js → rm-ZSFTT5HX.js} +1 -1
  100. package/dist/chunks/{rule-inspect-G3G5ISY4.js → rule-inspect-3RVLM4SD.js} +1 -1
  101. package/dist/chunks/{rules-7YI6LVNU.js → rules-NYBEYE3C.js} +1 -1
  102. package/dist/chunks/{schema-N3USOS7S.js → schema-XAUOL37J.js} +1 -1
  103. package/dist/chunks/{schema-GOG6OEUZ.js → schema-Y7A5YQQX.js} +1 -1
  104. package/dist/chunks/{set-DGS6G7GQ.js → set-CTR3K32H.js} +1 -1
  105. package/dist/chunks/{setup-and-link-ZKMVK42H.js → setup-and-link-DHQEQNHY.js} +1 -1
  106. package/dist/chunks/{tags-XZDKLBYD.js → tags-Y6NFCY2R.js} +1 -1
  107. package/dist/chunks/{update-TTQC7U3R.js → update-SPG6HQBN.js} +1 -1
  108. package/dist/chunks/vlt-builder-importer-6DGKK72W.js +11 -0
  109. package/dist/commands/build/index.js +1 -1
  110. package/dist/commands/deploy/index.js +5 -5
  111. package/dist/commands/dev/index.js +2 -2
  112. package/dist/commands/env/index.js +1 -1
  113. package/dist/commands/link/index.js +1 -1
  114. package/dist/commands/list/index.js +1 -1
  115. package/dist/commands-bulk.js +9 -9
  116. package/dist/index.js +5 -5
  117. package/dist/internal-build-worker.js +10 -0
  118. package/dist/vc.js +32 -0
  119. package/dist/version.mjs +1 -1
  120. package/package.json +54 -54
  121. package/dist/chunks/chunk-QRBAWXHP.js +0 -65
  122. package/dist/chunks/chunk-XU5QGRSL.js +0 -7
  123. package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +0 -11
@@ -1,65 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{require_inherits}from"./chunk-L3JDEHCQ.js";import{require_frameworks}from"./chunk-KK4AJES5.js";import{require_once,require_wrappy}from"./chunk-SOJCELXH.js";import{require_dist}from"./chunk-QGIQK47P.js";import{__commonJS,__require}from"./chunk-6L236MNA.js";var require_concat_map=__commonJS({"../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports,module){module.exports=function(xs,fn){for(var res=[],i=0;i<xs.length;i++){var x=fn(xs[i],i);isArray(x)?res.push.apply(res,x):res.push(x)}return res};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}}});var require_balanced_match=__commonJS({"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports,module){"use strict";module.exports=balanced;function balanced(a,b,str){a instanceof RegExp&&(a=maybeMatch(a,str)),b instanceof RegExp&&(b=maybeMatch(b,str));var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null}balanced.range=range;function range(a,b,str){var begs,beg,left,right,result,ai=str.indexOf(a),bi=str.indexOf(b,ai+1),i=ai;if(ai>=0&&bi>0){if(a===b)return[ai,bi];for(begs=[],left=str.length;i>=0&&!result;)i==ai?(begs.push(i),ai=str.indexOf(a,i+1)):begs.length==1?result=[begs.pop(),bi]:(beg=begs.pop(),beg<left&&(left=beg,right=bi),bi=str.indexOf(b,i+1)),i=ai<bi&&ai>=0?ai:bi;begs.length&&(result=[left,right])}return result}}});var require_brace_expansion=__commonJS({"../../node_modules/.pnpm/brace-expansion@1.1.15/node_modules/brace-expansion/index.js"(exports,module){var concatMap=require_concat_map(),balanced=require_balanced_match();module.exports=expandTop;var escSlash="\0SLASH"+Math.random()+"\0",escOpen="\0OPEN"+Math.random()+"\0",escClose="\0CLOSE"+Math.random()+"\0",escComma="\0COMMA"+Math.random()+"\0",escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[],m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre,body=m.body,post=m.post,p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);return post.length&&(p[p.length-1]+=postParts.shift(),p.push.apply(p,postParts)),parts.push.apply(parts,p),parts}function expandTop(str,options){if(!str)return[];options=options||{};var max=options.max==null?1/0:options.max;return str.substr(0,2)==="{}"&&(str="\\{\\}"+str.substr(2)),expand(escapeBraces(str),max,!0).map(unescapeBraces)}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,max,isTop){var expansions=[],m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body),isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body),isSequence=isNumericSequence||isAlphaSequence,isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions)return m.post.match(/,(?!,).*\}/)?(str=m.pre+"{"+m.body+escClose+m.post,expand(str,max,!0)):[str];var n;if(isSequence)n=m.body.split(/\.\./);else if(n=parseCommaParts(m.body),n.length===1&&(n=expand(n[0],max,!1).map(embrace),n.length===1)){var post=m.post.length?expand(m.post,max,!1):[""];return post.map(function(p){return m.pre+n[0]+p})}var pre=m.pre,post=m.post.length?expand(m.post,max,!1):[""],N;if(isSequence){var x=numeric(n[0]),y=numeric(n[1]),width=Math.max(n[0].length,n[1].length),incr=n.length==3?Math.max(Math.abs(numeric(n[2])),1):1,test=lte,reverse=y<x;reverse&&(incr*=-1,test=gte);var pad=n.some(isPadded);N=[];for(var i=x;test(i,y)&&N.length<max;i+=incr){var c;if(isAlphaSequence)c=String.fromCharCode(i),c==="\\"&&(c="");else if(c=String(i),pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");i<0?c="-"+z+c.slice(1):c=z+c}}N.push(c)}}else N=concatMap(n,function(el){return expand(el,max,!1)});for(var j=0;j<N.length;j++)for(var k=0;k<post.length&&expansions.length<max;k++){var expansion=pre+N[j]+post[k];(!isTop||isSequence||expansion)&&expansions.push(expansion)}return expansions}}});var require_minimatch=__commonJS({"../../node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js"(exports,module){module.exports=minimatch;minimatch.Minimatch=Minimatch;var path=function(){try{return __require("path")}catch{}}()||{sep:"/"};minimatch.sep=path.sep;var GLOBSTAR=minimatch.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=/\/+/;minimatch.filter=filter;function filter(pattern,options){return options=options||{},function(p,i,list){return minimatch(p,pattern,options)}}function ext(a,b){b=b||{};var t={};return Object.keys(a).forEach(function(k){t[k]=a[k]}),Object.keys(b).forEach(function(k){t[k]=b[k]}),t}minimatch.defaults=function(def){if(!def||typeof def!="object"||!Object.keys(def).length)return minimatch;var orig=minimatch,m=function(p,pattern,options){return orig(p,pattern,ext(def,options))};return m.Minimatch=function(pattern,options){return new orig.Minimatch(pattern,ext(def,options))},m.Minimatch.defaults=function(options){return orig.defaults(ext(def,options)).Minimatch},m.filter=function(pattern,options){return orig.filter(pattern,ext(def,options))},m.defaults=function(options){return orig.defaults(ext(def,options))},m.makeRe=function(pattern,options){return orig.makeRe(pattern,ext(def,options))},m.braceExpand=function(pattern,options){return orig.braceExpand(pattern,ext(def,options))},m.match=function(list,pattern,options){return orig.match(list,pattern,ext(def,options))},m};Minimatch.defaults=function(def){return minimatch.defaults(def).Minimatch};function minimatch(p,pattern,options){return assertValidPattern(pattern),options||(options={}),!options.nocomment&&pattern.charAt(0)==="#"?!1:new Minimatch(pattern,options).match(p)}function Minimatch(pattern,options){if(!(this instanceof Minimatch))return new Minimatch(pattern,options);assertValidPattern(pattern),options||(options={}),pattern=pattern.trim(),!options.allowWindowsEscape&&path.sep!=="/"&&(pattern=pattern.split(path.sep).join("/")),this.options=options,this.set=[],this.pattern=pattern,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!options.partial,this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){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=function(){console.error.apply(console,arguments)}),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}}minimatch.braceExpand=function(pattern,options){return braceExpand(pattern,options)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(pattern,options){return options||(this instanceof Minimatch?options=this.options:options={}),pattern=typeof pattern>"u"?this.pattern:pattern,assertValidPattern(pattern),options.nobrace||!/\{(?:(?!\{).)*\}/.test(pattern)?[pattern]:expand(pattern)}var MAX_PATTERN_LENGTH=1024*64,assertValidPattern=function(pattern){if(typeof pattern!="string")throw new TypeError("invalid pattern");if(pattern.length>MAX_PATTERN_LENGTH)throw new TypeError("pattern is too long")};Minimatch.prototype.parse=parse;var SUBPARSE={};function parse(pattern,isSub){assertValidPattern(pattern);var options=this.options;if(pattern==="**")if(options.noglobstar)pattern="*";else 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}(?:$|\\/))":"(?!\\.)",self=this;function clearStateChar(){if(stateChar){switch(stateChar){case"*":re+=star,hasMagic=!0;break;case"?":re+=qmark,hasMagic=!0;break;default:re+="\\"+stateChar;break}self.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}self.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}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
8
- %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}minimatch.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}minimatch.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=function(f,partial){if(typeof partial>"u"&&(partial=this.partial),this.debug("match",f,this.pattern),this.comment)return!1;if(this.empty)return f==="";if(f==="/"&&partial)return!0;var options=this.options;path.sep!=="/"&&(f=f.split(path.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(`
9
- 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(`
10
- >>> no match, partial?`,file,fr,pattern,pr),fr===fl))}var hit;if(typeof p=="string"?(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)return fi===fl-1&&file[fi]==="";throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}}});var require_semver=__commonJS({"../../node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js"(exports,module){exports=module.exports=SemVer;var debug;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?debug=function(){var args=Array.prototype.slice.call(arguments,0);args.unshift("SEMVER"),console.log.apply(console,args)}:debug=function(){};exports.SEMVER_SPEC_VERSION="2.0.0";var MAX_LENGTH=256,MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=MAX_LENGTH-6,re=exports.re=[],safeRe=exports.safeRe=[],src=exports.src=[],t=exports.tokens={},R=0;function tok(n){t[n]=R++}var LETTERDASHNUMBER="[a-zA-Z0-9-]",safeRegexReplacements=[["\\s",1],["\\d",MAX_LENGTH],[LETTERDASHNUMBER,MAX_SAFE_BUILD_LENGTH]];function makeSafeRe(value){for(var i2=0;i2<safeRegexReplacements.length;i2++){var token=safeRegexReplacements[i2][0],max=safeRegexReplacements[i2][1];value=value.split(token+"*").join(token+"{0,"+max+"}").split(token+"+").join(token+"{1,"+max+"}")}return value}tok("NUMERICIDENTIFIER");src[t.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");src[t.NUMERICIDENTIFIERLOOSE]="\\d+";tok("NONNUMERICIDENTIFIER");src[t.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+LETTERDASHNUMBER+"*";tok("MAINVERSION");src[t.MAINVERSION]="("+src[t.NUMERICIDENTIFIER]+")\\.("+src[t.NUMERICIDENTIFIER]+")\\.("+src[t.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");src[t.MAINVERSIONLOOSE]="("+src[t.NUMERICIDENTIFIERLOOSE]+")\\.("+src[t.NUMERICIDENTIFIERLOOSE]+")\\.("+src[t.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");src[t.PRERELEASEIDENTIFIER]="(?:"+src[t.NUMERICIDENTIFIER]+"|"+src[t.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");src[t.PRERELEASEIDENTIFIERLOOSE]="(?:"+src[t.NUMERICIDENTIFIERLOOSE]+"|"+src[t.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");src[t.PRERELEASE]="(?:-("+src[t.PRERELEASEIDENTIFIER]+"(?:\\."+src[t.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");src[t.PRERELEASELOOSE]="(?:-?("+src[t.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+src[t.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");src[t.BUILDIDENTIFIER]=LETTERDASHNUMBER+"+";tok("BUILD");src[t.BUILD]="(?:\\+("+src[t.BUILDIDENTIFIER]+"(?:\\."+src[t.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");src[t.FULLPLAIN]="v?"+src[t.MAINVERSION]+src[t.PRERELEASE]+"?"+src[t.BUILD]+"?";src[t.FULL]="^"+src[t.FULLPLAIN]+"$";tok("LOOSEPLAIN");src[t.LOOSEPLAIN]="[v=\\s]*"+src[t.MAINVERSIONLOOSE]+src[t.PRERELEASELOOSE]+"?"+src[t.BUILD]+"?";tok("LOOSE");src[t.LOOSE]="^"+src[t.LOOSEPLAIN]+"$";tok("GTLT");src[t.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");src[t.XRANGEIDENTIFIERLOOSE]=src[t.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");src[t.XRANGEIDENTIFIER]=src[t.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");src[t.XRANGEPLAIN]="[v=\\s]*("+src[t.XRANGEIDENTIFIER]+")(?:\\.("+src[t.XRANGEIDENTIFIER]+")(?:\\.("+src[t.XRANGEIDENTIFIER]+")(?:"+src[t.PRERELEASE]+")?"+src[t.BUILD]+"?)?)?";tok("XRANGEPLAINLOOSE");src[t.XRANGEPLAINLOOSE]="[v=\\s]*("+src[t.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+src[t.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+src[t.XRANGEIDENTIFIERLOOSE]+")(?:"+src[t.PRERELEASELOOSE]+")?"+src[t.BUILD]+"?)?)?";tok("XRANGE");src[t.XRANGE]="^"+src[t.GTLT]+"\\s*"+src[t.XRANGEPLAIN]+"$";tok("XRANGELOOSE");src[t.XRANGELOOSE]="^"+src[t.GTLT]+"\\s*"+src[t.XRANGEPLAINLOOSE]+"$";tok("COERCE");src[t.COERCE]="(^|[^\\d])(\\d{1,"+MAX_SAFE_COMPONENT_LENGTH+"})(?:\\.(\\d{1,"+MAX_SAFE_COMPONENT_LENGTH+"}))?(?:\\.(\\d{1,"+MAX_SAFE_COMPONENT_LENGTH+"}))?(?:$|[^\\d])";tok("COERCERTL");re[t.COERCERTL]=new RegExp(src[t.COERCE],"g");safeRe[t.COERCERTL]=new RegExp(makeSafeRe(src[t.COERCE]),"g");tok("LONETILDE");src[t.LONETILDE]="(?:~>?)";tok("TILDETRIM");src[t.TILDETRIM]="(\\s*)"+src[t.LONETILDE]+"\\s+";re[t.TILDETRIM]=new RegExp(src[t.TILDETRIM],"g");safeRe[t.TILDETRIM]=new RegExp(makeSafeRe(src[t.TILDETRIM]),"g");var tildeTrimReplace="$1~";tok("TILDE");src[t.TILDE]="^"+src[t.LONETILDE]+src[t.XRANGEPLAIN]+"$";tok("TILDELOOSE");src[t.TILDELOOSE]="^"+src[t.LONETILDE]+src[t.XRANGEPLAINLOOSE]+"$";tok("LONECARET");src[t.LONECARET]="(?:\\^)";tok("CARETTRIM");src[t.CARETTRIM]="(\\s*)"+src[t.LONECARET]+"\\s+";re[t.CARETTRIM]=new RegExp(src[t.CARETTRIM],"g");safeRe[t.CARETTRIM]=new RegExp(makeSafeRe(src[t.CARETTRIM]),"g");var caretTrimReplace="$1^";tok("CARET");src[t.CARET]="^"+src[t.LONECARET]+src[t.XRANGEPLAIN]+"$";tok("CARETLOOSE");src[t.CARETLOOSE]="^"+src[t.LONECARET]+src[t.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");src[t.COMPARATORLOOSE]="^"+src[t.GTLT]+"\\s*("+src[t.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");src[t.COMPARATOR]="^"+src[t.GTLT]+"\\s*("+src[t.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");src[t.COMPARATORTRIM]="(\\s*)"+src[t.GTLT]+"\\s*("+src[t.LOOSEPLAIN]+"|"+src[t.XRANGEPLAIN]+")";re[t.COMPARATORTRIM]=new RegExp(src[t.COMPARATORTRIM],"g");safeRe[t.COMPARATORTRIM]=new RegExp(makeSafeRe(src[t.COMPARATORTRIM]),"g");var comparatorTrimReplace="$1$2$3";tok("HYPHENRANGE");src[t.HYPHENRANGE]="^\\s*("+src[t.XRANGEPLAIN]+")\\s+-\\s+("+src[t.XRANGEPLAIN]+")\\s*$";tok("HYPHENRANGELOOSE");src[t.HYPHENRANGELOOSE]="^\\s*("+src[t.XRANGEPLAINLOOSE]+")\\s+-\\s+("+src[t.XRANGEPLAINLOOSE]+")\\s*$";tok("STAR");src[t.STAR]="(<|>)?=?\\s*\\*";for(i=0;i<R;i++)debug(i,src[i]),re[i]||(re[i]=new RegExp(src[i]),safeRe[i]=new RegExp(makeSafeRe(src[i])));var i;exports.parse=parse;function parse(version,options){if((!options||typeof options!="object")&&(options={loose:!!options,includePrerelease:!1}),version instanceof SemVer)return version;if(typeof version!="string"||version.length>MAX_LENGTH)return null;var r=options.loose?safeRe[t.LOOSE]:safeRe[t.FULL];if(!r.test(version))return null;try{return new SemVer(version,options)}catch{return null}}exports.valid=valid;function valid(version,options){var v=parse(version,options);return v?v.version:null}exports.clean=clean;function clean(version,options){var s=parse(version.trim().replace(/^[=v]+/,""),options);return s?s.version:null}exports.SemVer=SemVer;function SemVer(version,options){if((!options||typeof options!="object")&&(options={loose:!!options,includePrerelease:!1}),version instanceof SemVer){if(version.loose===options.loose)return version;version=version.version}else if(typeof version!="string")throw new TypeError("Invalid Version: "+version);if(version.length>MAX_LENGTH)throw new TypeError("version is longer than "+MAX_LENGTH+" characters");if(!(this instanceof SemVer))return new SemVer(version,options);debug("SemVer",version,options),this.options=options,this.loose=!!options.loose;var m=version.trim().match(options.loose?safeRe[t.LOOSE]:safeRe[t.FULL]);if(!m)throw new TypeError("Invalid Version: "+version);if(this.raw=version,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(function(id){if(/^[0-9]+$/.test(id)){var num=+id;if(num>=0&&num<MAX_SAFE_INTEGER)return num}return id}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}SemVer.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};SemVer.prototype.toString=function(){return this.version};SemVer.prototype.compare=function(other){return debug("SemVer.compare",this.version,this.options,other),other instanceof SemVer||(other=new SemVer(other,this.options)),this.compareMain(other)||this.comparePre(other)};SemVer.prototype.compareMain=function(other){return other instanceof SemVer||(other=new SemVer(other,this.options)),compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)};SemVer.prototype.comparePre=function(other){if(other instanceof SemVer||(other=new SemVer(other,this.options)),this.prerelease.length&&!other.prerelease.length)return-1;if(!this.prerelease.length&&other.prerelease.length)return 1;if(!this.prerelease.length&&!other.prerelease.length)return 0;var i2=0;do{var a=this.prerelease[i2],b=other.prerelease[i2];if(debug("prerelease compare",i2,a,b),a===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(a===void 0)return-1;if(a===b)continue;return compareIdentifiers(a,b)}while(++i2)};SemVer.prototype.compareBuild=function(other){other instanceof SemVer||(other=new SemVer(other,this.options));var i2=0;do{var a=this.build[i2],b=other.build[i2];if(debug("prerelease compare",i2,a,b),a===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(a===void 0)return-1;if(a===b)continue;return compareIdentifiers(a,b)}while(++i2)};SemVer.prototype.inc=function(release,identifier){switch(release){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",identifier);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",identifier);break;case"prepatch":this.prerelease.length=0,this.inc("patch",identifier),this.inc("pre",identifier);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",identifier),this.inc("pre",identifier);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var i2=this.prerelease.length;--i2>=0;)typeof this.prerelease[i2]=="number"&&(this.prerelease[i2]++,i2=-2);i2===-1&&this.prerelease.push(0)}identifier&&(this.prerelease[0]===identifier?isNaN(this.prerelease[1])&&(this.prerelease=[identifier,0]):this.prerelease=[identifier,0]);break;default:throw new Error("invalid increment argument: "+release)}return this.format(),this.raw=this.version,this};exports.inc=inc;function inc(version,release,loose,identifier){typeof loose=="string"&&(identifier=loose,loose=void 0);try{return new SemVer(version,loose).inc(release,identifier).version}catch{return null}}exports.diff=diff;function diff(version1,version2){if(eq(version1,version2))return null;var v1=parse(version1),v2=parse(version2),prefix="";if(v1.prerelease.length||v2.prerelease.length){prefix="pre";var defaultResult="prerelease"}for(var key in v1)if((key==="major"||key==="minor"||key==="patch")&&v1[key]!==v2[key])return prefix+key;return defaultResult}exports.compareIdentifiers=compareIdentifiers;var numeric=/^[0-9]+$/;function compareIdentifiers(a,b){var anum=numeric.test(a),bnum=numeric.test(b);return anum&&bnum&&(a=+a,b=+b),a===b?0:anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:1}exports.rcompareIdentifiers=rcompareIdentifiers;function rcompareIdentifiers(a,b){return compareIdentifiers(b,a)}exports.major=major;function major(a,loose){return new SemVer(a,loose).major}exports.minor=minor;function minor(a,loose){return new SemVer(a,loose).minor}exports.patch=patch;function patch(a,loose){return new SemVer(a,loose).patch}exports.compare=compare;function compare(a,b,loose){return new SemVer(a,loose).compare(new SemVer(b,loose))}exports.compareLoose=compareLoose;function compareLoose(a,b){return compare(a,b,!0)}exports.compareBuild=compareBuild;function compareBuild(a,b,loose){var versionA=new SemVer(a,loose),versionB=new SemVer(b,loose);return versionA.compare(versionB)||versionA.compareBuild(versionB)}exports.rcompare=rcompare;function rcompare(a,b,loose){return compare(b,a,loose)}exports.sort=sort;function sort(list,loose){return list.sort(function(a,b){return exports.compareBuild(a,b,loose)})}exports.rsort=rsort;function rsort(list,loose){return list.sort(function(a,b){return exports.compareBuild(b,a,loose)})}exports.gt=gt;function gt(a,b,loose){return compare(a,b,loose)>0}exports.lt=lt;function lt(a,b,loose){return compare(a,b,loose)<0}exports.eq=eq;function eq(a,b,loose){return compare(a,b,loose)===0}exports.neq=neq;function neq(a,b,loose){return compare(a,b,loose)!==0}exports.gte=gte;function gte(a,b,loose){return compare(a,b,loose)>=0}exports.lte=lte;function lte(a,b,loose){return compare(a,b,loose)<=0}exports.cmp=cmp;function cmp(a,op,b,loose){switch(op){case"===":return typeof a=="object"&&(a=a.version),typeof b=="object"&&(b=b.version),a===b;case"!==":return typeof a=="object"&&(a=a.version),typeof b=="object"&&(b=b.version),a!==b;case"":case"=":case"==":return eq(a,b,loose);case"!=":return neq(a,b,loose);case">":return gt(a,b,loose);case">=":return gte(a,b,loose);case"<":return lt(a,b,loose);case"<=":return lte(a,b,loose);default:throw new TypeError("Invalid operator: "+op)}}exports.Comparator=Comparator;function Comparator(comp,options){if((!options||typeof options!="object")&&(options={loose:!!options,includePrerelease:!1}),comp instanceof Comparator){if(comp.loose===!!options.loose)return comp;comp=comp.value}if(!(this instanceof Comparator))return new Comparator(comp,options);comp=comp.trim().split(/\s+/).join(" "),debug("comparator",comp,options),this.options=options,this.loose=!!options.loose,this.parse(comp),this.semver===ANY?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}var ANY={};Comparator.prototype.parse=function(comp){var r=this.options.loose?safeRe[t.COMPARATORLOOSE]:safeRe[t.COMPARATOR],m=comp.match(r);if(!m)throw new TypeError("Invalid comparator: "+comp);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new SemVer(m[2],this.options.loose):this.semver=ANY};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(version){if(debug("Comparator.test",version,this.options.loose),this.semver===ANY||version===ANY)return!0;if(typeof version=="string")try{version=new SemVer(version,this.options)}catch{return!1}return cmp(version,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(comp,options){if(!(comp instanceof Comparator))throw new TypeError("a Comparator is required");(!options||typeof options!="object")&&(options={loose:!!options,includePrerelease:!1});var rangeTmp;if(this.operator==="")return this.value===""?!0:(rangeTmp=new Range(comp.value,options),satisfies(this.value,rangeTmp,options));if(comp.operator==="")return comp.value===""?!0:(rangeTmp=new Range(this.value,options),satisfies(comp.semver,rangeTmp,options));var sameDirectionIncreasing=(this.operator===">="||this.operator===">")&&(comp.operator===">="||comp.operator===">"),sameDirectionDecreasing=(this.operator==="<="||this.operator==="<")&&(comp.operator==="<="||comp.operator==="<"),sameSemVer=this.semver.version===comp.semver.version,differentDirectionsInclusive=(this.operator===">="||this.operator==="<=")&&(comp.operator===">="||comp.operator==="<="),oppositeDirectionsLessThan=cmp(this.semver,"<",comp.semver,options)&&(this.operator===">="||this.operator===">")&&(comp.operator==="<="||comp.operator==="<"),oppositeDirectionsGreaterThan=cmp(this.semver,">",comp.semver,options)&&(this.operator==="<="||this.operator==="<")&&(comp.operator===">="||comp.operator===">");return sameDirectionIncreasing||sameDirectionDecreasing||sameSemVer&&differentDirectionsInclusive||oppositeDirectionsLessThan||oppositeDirectionsGreaterThan};exports.Range=Range;function Range(range,options){if((!options||typeof options!="object")&&(options={loose:!!options,includePrerelease:!1}),range instanceof Range)return range.loose===!!options.loose&&range.includePrerelease===!!options.includePrerelease?range:new Range(range.raw,options);if(range instanceof Comparator)return new Range(range.value,options);if(!(this instanceof Range))return new Range(range,options);if(this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease,this.raw=range.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(range2){return this.parseRange(range2.trim())},this).filter(function(c){return c.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}Range.prototype.format=function(){return this.range=this.set.map(function(comps){return comps.join(" ").trim()}).join("||").trim(),this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(range){var loose=this.options.loose,hr=loose?safeRe[t.HYPHENRANGELOOSE]:safeRe[t.HYPHENRANGE];range=range.replace(hr,hyphenReplace),debug("hyphen replace",range),range=range.replace(safeRe[t.COMPARATORTRIM],comparatorTrimReplace),debug("comparator trim",range,safeRe[t.COMPARATORTRIM]),range=range.replace(safeRe[t.TILDETRIM],tildeTrimReplace),range=range.replace(safeRe[t.CARETTRIM],caretTrimReplace),range=range.split(/\s+/).join(" ");var compRe=loose?safeRe[t.COMPARATORLOOSE]:safeRe[t.COMPARATOR],set=range.split(" ").map(function(comp){return parseComparator(comp,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(set=set.filter(function(comp){return!!comp.match(compRe)})),set=set.map(function(comp){return new Comparator(comp,this.options)},this),set};Range.prototype.intersects=function(range,options){if(!(range instanceof Range))throw new TypeError("a Range is required");return this.set.some(function(thisComparators){return isSatisfiable(thisComparators,options)&&range.set.some(function(rangeComparators){return isSatisfiable(rangeComparators,options)&&thisComparators.every(function(thisComparator){return rangeComparators.every(function(rangeComparator){return thisComparator.intersects(rangeComparator,options)})})})})};function isSatisfiable(comparators,options){for(var result=!0,remainingComparators=comparators.slice(),testComparator=remainingComparators.pop();result&&remainingComparators.length;)result=remainingComparators.every(function(otherComparator){return testComparator.intersects(otherComparator,options)}),testComparator=remainingComparators.pop();return result}exports.toComparators=toComparators;function toComparators(range,options){return new Range(range,options).set.map(function(comp){return comp.map(function(c){return c.value}).join(" ").trim().split(" ")})}function parseComparator(comp,options){return debug("comp",comp,options),comp=replaceCarets(comp,options),debug("caret",comp),comp=replaceTildes(comp,options),debug("tildes",comp),comp=replaceXRanges(comp,options),debug("xrange",comp),comp=replaceStars(comp,options),debug("stars",comp),comp}function isX(id){return!id||id.toLowerCase()==="x"||id==="*"}function replaceTildes(comp,options){return comp.trim().split(/\s+/).map(function(comp2){return replaceTilde(comp2,options)}).join(" ")}function replaceTilde(comp,options){var r=options.loose?safeRe[t.TILDELOOSE]:safeRe[t.TILDE];return comp.replace(r,function(_,M,m,p,pr){debug("tilde",comp,_,M,m,p,pr);var ret;return isX(M)?ret="":isX(m)?ret=">="+M+".0.0 <"+(+M+1)+".0.0":isX(p)?ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0":pr?(debug("replaceTilde pr",pr),ret=">="+M+"."+m+"."+p+"-"+pr+" <"+M+"."+(+m+1)+".0"):ret=">="+M+"."+m+"."+p+" <"+M+"."+(+m+1)+".0",debug("tilde return",ret),ret})}function replaceCarets(comp,options){return comp.trim().split(/\s+/).map(function(comp2){return replaceCaret(comp2,options)}).join(" ")}function replaceCaret(comp,options){debug("caret",comp,options);var r=options.loose?safeRe[t.CARETLOOSE]:safeRe[t.CARET];return comp.replace(r,function(_,M,m,p,pr){debug("caret",comp,_,M,m,p,pr);var ret;return isX(M)?ret="":isX(m)?ret=">="+M+".0.0 <"+(+M+1)+".0.0":isX(p)?M==="0"?ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0":ret=">="+M+"."+m+".0 <"+(+M+1)+".0.0":pr?(debug("replaceCaret pr",pr),M==="0"?m==="0"?ret=">="+M+"."+m+"."+p+"-"+pr+" <"+M+"."+m+"."+(+p+1):ret=">="+M+"."+m+"."+p+"-"+pr+" <"+M+"."+(+m+1)+".0":ret=">="+M+"."+m+"."+p+"-"+pr+" <"+(+M+1)+".0.0"):(debug("no pr"),M==="0"?m==="0"?ret=">="+M+"."+m+"."+p+" <"+M+"."+m+"."+(+p+1):ret=">="+M+"."+m+"."+p+" <"+M+"."+(+m+1)+".0":ret=">="+M+"."+m+"."+p+" <"+(+M+1)+".0.0"),debug("caret return",ret),ret})}function replaceXRanges(comp,options){return debug("replaceXRanges",comp,options),comp.split(/\s+/).map(function(comp2){return replaceXRange(comp2,options)}).join(" ")}function replaceXRange(comp,options){comp=comp.trim();var r=options.loose?safeRe[t.XRANGELOOSE]:safeRe[t.XRANGE];return comp.replace(r,function(ret,gtlt,M,m,p,pr){debug("xRange",comp,ret,gtlt,M,m,p,pr);var xM=isX(M),xm=xM||isX(m),xp=xm||isX(p),anyX=xp;return gtlt==="="&&anyX&&(gtlt=""),pr=options.includePrerelease?"-0":"",xM?gtlt===">"||gtlt==="<"?ret="<0.0.0-0":ret="*":gtlt&&anyX?(xm&&(m=0),p=0,gtlt===">"?(gtlt=">=",xm?(M=+M+1,m=0,p=0):(m=+m+1,p=0)):gtlt==="<="&&(gtlt="<",xm?M=+M+1:m=+m+1),ret=gtlt+M+"."+m+"."+p+pr):xm?ret=">="+M+".0.0"+pr+" <"+(+M+1)+".0.0"+pr:xp&&(ret=">="+M+"."+m+".0"+pr+" <"+M+"."+(+m+1)+".0"+pr),debug("xRange return",ret),ret})}function replaceStars(comp,options){return debug("replaceStars",comp,options),comp.trim().replace(safeRe[t.STAR],"")}function hyphenReplace($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr,tb){return isX(fM)?from="":isX(fm)?from=">="+fM+".0.0":isX(fp)?from=">="+fM+"."+fm+".0":from=">="+from,isX(tM)?to="":isX(tm)?to="<"+(+tM+1)+".0.0":isX(tp)?to="<"+tM+"."+(+tm+1)+".0":tpr?to="<="+tM+"."+tm+"."+tp+"-"+tpr:to="<="+to,(from+" "+to).trim()}Range.prototype.test=function(version){if(!version)return!1;if(typeof version=="string")try{version=new SemVer(version,this.options)}catch{return!1}for(var i2=0;i2<this.set.length;i2++)if(testSet(this.set[i2],version,this.options))return!0;return!1};function testSet(set,version,options){for(var i2=0;i2<set.length;i2++)if(!set[i2].test(version))return!1;if(version.prerelease.length&&!options.includePrerelease){for(i2=0;i2<set.length;i2++)if(debug(set[i2].semver),set[i2].semver!==ANY&&set[i2].semver.prerelease.length>0){var allowed=set[i2].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch)return!0}return!1}return!0}exports.satisfies=satisfies;function satisfies(version,range,options){try{range=new Range(range,options)}catch{return!1}return range.test(version)}exports.maxSatisfying=maxSatisfying;function maxSatisfying(versions,range,options){var max=null,maxSV=null;try{var rangeObj=new Range(range,options)}catch{return null}return versions.forEach(function(v){rangeObj.test(v)&&(!max||maxSV.compare(v)===-1)&&(max=v,maxSV=new SemVer(max,options))}),max}exports.minSatisfying=minSatisfying;function minSatisfying(versions,range,options){var min=null,minSV=null;try{var rangeObj=new Range(range,options)}catch{return null}return versions.forEach(function(v){rangeObj.test(v)&&(!min||minSV.compare(v)===1)&&(min=v,minSV=new SemVer(min,options))}),min}exports.minVersion=minVersion;function minVersion(range,loose){range=new Range(range,loose);var minver=new SemVer("0.0.0");if(range.test(minver)||(minver=new SemVer("0.0.0-0"),range.test(minver)))return minver;minver=null;for(var i2=0;i2<range.set.length;++i2){var comparators=range.set[i2];comparators.forEach(function(comparator){var compver=new SemVer(comparator.semver.version);switch(comparator.operator){case">":compver.prerelease.length===0?compver.patch++:compver.prerelease.push(0),compver.raw=compver.format();case"":case">=":(!minver||gt(minver,compver))&&(minver=compver);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+comparator.operator)}})}return minver&&range.test(minver)?minver:null}exports.validRange=validRange;function validRange(range,options){try{return new Range(range,options).range||"*"}catch{return null}}exports.ltr=ltr;function ltr(version,range,options){return outside(version,range,"<",options)}exports.gtr=gtr;function gtr(version,range,options){return outside(version,range,">",options)}exports.outside=outside;function outside(version,range,hilo,options){version=new SemVer(version,options),range=new Range(range,options);var gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt,ltefn=lte,ltfn=lt,comp=">",ecomp=">=";break;case"<":gtfn=lt,ltefn=gte,ltfn=gt,comp="<",ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(version,range,options))return!1;for(var i2=0;i2<range.set.length;++i2){var comparators=range.set[i2],high=null,low=null;if(comparators.forEach(function(comparator){comparator.semver===ANY&&(comparator=new Comparator(">=0.0.0")),high=high||comparator,low=low||comparator,gtfn(comparator.semver,high.semver,options)?high=comparator:ltfn(comparator.semver,low.semver,options)&&(low=comparator)}),high.operator===comp||high.operator===ecomp||(!low.operator||low.operator===comp)&&ltefn(version,low.semver))return!1;if(low.operator===ecomp&&ltfn(version,low.semver))return!1}return!0}exports.prerelease=prerelease;function prerelease(version,options){var parsed=parse(version,options);return parsed&&parsed.prerelease.length?parsed.prerelease:null}exports.intersects=intersects;function intersects(r1,r2,options){return r1=new Range(r1,options),r2=new Range(r2,options),r1.intersects(r2)}exports.coerce=coerce;function coerce(version,options){if(version instanceof SemVer)return version;if(typeof version=="number"&&(version=String(version)),typeof version!="string")return null;options=options||{};var match=null;if(!options.rtl)match=version.match(safeRe[t.COERCE]);else{for(var next;(next=safeRe[t.COERCERTL].exec(version))&&(!match||match.index+match[0].length!==version.length);)(!match||next.index+next[0].length!==match.index+match[0].length)&&(match=next),safeRe[t.COERCERTL].lastIndex=next.index+next[1].length+next[2].length;safeRe[t.COERCERTL].lastIndex=-1}return match===null?null:parse(match[2]+"."+(match[3]||"0")+"."+(match[4]||"0"),options)}}});var require_constants=__commonJS({"../../internals/runtimes/dist/constants.js"(exports,module){"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),constants_exports={};__export(constants_exports,{BUILDER_RUNTIMES:()=>BUILDER_RUNTIMES,CONTAINER_ENTRYPOINT_CANDIDATES:()=>CONTAINER_ENTRYPOINT_CANDIDATES,ENTRYPOINT_EXTENSIONS:()=>ENTRYPOINT_EXTENSIONS,ROUTE_OWNING_BUILDERS:()=>ROUTE_OWNING_BUILDERS,RUNTIME_BUILDERS:()=>RUNTIME_BUILDERS,RUNTIME_MANIFESTS:()=>RUNTIME_MANIFESTS,STATIC_BUILDERS:()=>STATIC_BUILDERS});module.exports=__toCommonJS(constants_exports);var RUNTIME_BUILDERS={node:"@vercel/backends",python:"@vercel/python",go:"@vercel/go",rust:"@vercel/rust",ruby:"@vercel/ruby",container:"@vercel/container"},RUNTIME_MANIFESTS={node:["package.json"],python:["pyproject.toml","requirements.txt","Pipfile","pylock.yml","uv.lock","setup.py"],go:["go.mod"],ruby:["Gemfile"],rust:["Cargo.toml"]},ENTRYPOINT_EXTENSIONS={".ts":"node",".mts":"node",".js":"node",".mjs":"node",".cjs":"node",".py":"python",".go":"go",".rs":"rust",".rb":"ruby",".ru":"ruby"},BUILDER_RUNTIMES=Object.fromEntries(Object.entries(RUNTIME_BUILDERS).map(([runtime,builder])=>[builder,runtime])),STATIC_BUILDERS=new Set(["@vercel/static-build","@vercel/static"]),ROUTE_OWNING_BUILDERS=new Set(["@vercel/next","@vercel/backends"]),CONTAINER_ENTRYPOINT_CANDIDATES=["Dockerfile.vercel","Containerfile.vercel","Dockerfile","Containerfile"]}});var require_framework=__commonJS({"../../internals/runtimes/dist/framework.js"(exports,module){"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),framework_exports={};__export(framework_exports,{DETECTION_FRAMEWORKS:()=>DETECTION_FRAMEWORKS,filterFrameworksByRuntime:()=>filterFrameworksByRuntime,frameworksBySlug:()=>frameworksBySlug,inferBuilderRuntimeFromFramework:()=>inferBuilderRuntimeFromFramework,inferRuntimeFromFramework:()=>inferRuntimeFromFramework,isBFFFramework:()=>isBFFFramework,isFrontendFramework:()=>isFrontendFramework});module.exports=__toCommonJS(framework_exports);var import_build_utils=__require("@vercel/build-utils"),import_frameworks=require_frameworks(),import_constants=require_constants(),frameworksBySlug=new Map(import_frameworks.frameworkList.flatMap(f=>typeof f.slug=="string"?[[f.slug,f]]:[])),DETECTION_FRAMEWORKS=import_frameworks.frameworkList.filter(framework=>!framework.experimental||framework.runtimeFramework);function inferRuntimeFromFramework(framework){if(framework){if(framework in import_constants.RUNTIME_BUILDERS)return framework;if((0,import_build_utils.isPythonFramework)(framework))return"python";if((0,import_build_utils.isBackendFramework)(framework))return"node"}}var STATIC_BUILDER_RUNTIMES={hugo:"go",jekyll:"ruby",middleman:"ruby",zola:"rust"};function inferBuilderRuntimeFromFramework(framework){if(!framework||framework==="container"||framework==="services")return;let f=frameworksBySlug.get(framework),declaredBuilder=f?.useRuntime?.use;if(declaredBuilder)return import_constants.BUILDER_RUNTIMES[declaredBuilder];let detectorItems=[...f?.detectors?.every??[],...f?.detectors?.some??[]];return STATIC_BUILDER_RUNTIMES[framework]??(detectorItems.some(d=>d.matchPackage!==void 0)?"node":void 0)}function isFrontendFramework(framework){return!!framework&&!inferRuntimeFromFramework(framework)}var BFF_FRAMEWORKS=new Set(["nextjs","nuxtjs","sveltekit","remix","solidstart"]);function isBFFFramework(framework){return!!framework&&BFF_FRAMEWORKS.has(framework)}function filterFrameworksByRuntime(frameworks,runtime){return runtime?frameworks.filter(f=>inferRuntimeFromFramework(f.slug)===runtime):[...frameworks]}}});var require_is_official_runtime=__commonJS({"../fs-detectors/dist/is-official-runtime.js"(exports,module){"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),is_official_runtime_exports={};__export(is_official_runtime_exports,{isOfficialRuntime:()=>isOfficialRuntime2,isStaticRuntime:()=>isStaticRuntime2});module.exports=__toCommonJS(is_official_runtime_exports);var isOfficialRuntime2=(desired,name)=>typeof name!="string"?!1:name===`@vercel/${desired}`||name===`@now/${desired}`||name.startsWith(`@vercel/${desired}@`)||name.startsWith(`@now/${desired}@`),isStaticRuntime2=name=>isOfficialRuntime2("static",name)}});var require_python=__commonJS({"../fs-detectors/dist/python.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),python_exports={};__export(python_exports,{isPythonEntrypoint:()=>isPythonEntrypoint});module.exports=__toCommonJS(python_exports);var import_fs=__toESM(__require("fs")),import_build_utils=__require("@vercel/build-utils"),import_python_analysis=__require("@vercel/python-analysis");async function isPythonEntrypoint(fsPath){try{let content=await import_fs.default.promises.readFile(fsPath,"utf-8");return await(0,import_python_analysis.findAppOrHandler)(content)!==null}catch(err){return(0,import_build_utils.debug)(`Failed to check Python entrypoint: ${err}`),!1}}}});var require_buildpack_runtimes=__commonJS({"../fs-detectors/dist/buildpack-runtimes.js"(exports,module){"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),buildpack_runtimes_exports={};__export(buildpack_runtimes_exports,{BUILDPACK_PROJECT_MARKERS:()=>BUILDPACK_PROJECT_MARKERS,hasBuildpackProjectMarker:()=>hasBuildpackProjectMarker,isBuildpackRuntimeEnabled:()=>isBuildpackRuntimeEnabled,toBuildpackRuntime:()=>toBuildpackRuntime});module.exports=__toCommonJS(buildpack_runtimes_exports);var BUILDPACK_PROJECT_MARKERS=new Map([["ruby",["Gemfile"]]]);function isBuildpackRuntimeEnabled(runtime){return process.env[`VERCEL_EXPERIMENTAL_BUILDPACK_${runtime.toUpperCase()}`]==="1"}function toBuildpackRuntime(runtime){if(!(!runtime||!BUILDPACK_PROJECT_MARKERS.has(runtime)||!isBuildpackRuntimeEnabled(runtime)))return runtime}async function hasBuildpackProjectMarker(runtime,hasFile){for(let marker of BUILDPACK_PROJECT_MARKERS.get(runtime)??[])if(await hasFile(marker))return!0;return!1}}});var require_detect_builders=__commonJS({"../fs-detectors/dist/detect-builders.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),detect_builders_exports={};__export(detect_builders_exports,{REGEX_MIDDLEWARE_FILES:()=>REGEX_MIDDLEWARE_FILES,REGEX_NON_VERCEL_PLATFORM_FILES:()=>REGEX_NON_VERCEL_PLATFORM_FILES2,REGEX_VERCEL_PLATFORM_FILES:()=>REGEX_VERCEL_PLATFORM_FILES,builderToFrameworks:()=>builderToFrameworks2,detectApiDirectory:()=>detectApiDirectory2,detectApiExtensions:()=>detectApiExtensions2,detectBuilders:()=>detectBuilders2,detectOutputDirectory:()=>detectOutputDirectory2,getProxyBuilder:()=>getProxyBuilder2,sortFiles:()=>sortFiles,validateProxy:()=>validateProxy2,validateProxyConfig:()=>validateProxyConfig2});module.exports=__toCommonJS(detect_builders_exports);var import_minimatch=__toESM(require_minimatch()),import_semver=require_semver(),import_path=__require("path"),import_frameworks=require_frameworks(),import_framework=require_framework(),import_constants=require_constants(),import_is_official_runtime=require_is_official_runtime(),import_build_utils=__require("@vercel/build-utils"),import_python=require_python(),import_buildpack_runtimes=require_buildpack_runtimes(),REGEX_MIDDLEWARE_FILES="middleware.[jt]s",VERCEL_PLATFORM_FILES=["api/**","node_modules/**",REGEX_MIDDLEWARE_FILES,"package.json","package-lock.json","yarn.lock","pnpm-lock.yaml","bun.lock","bun.lockb",".gitignore","README.md"],REGEX_VERCEL_PLATFORM_FILES=VERCEL_PLATFORM_FILES.join(",");function escapeMinimatchPath(path){return path.replace(/([\\,*?[\]{}()!+@])/g,"\\$1")}function getStaticFilesPattern(additionalExclusions=[]){return`!{${[...VERCEL_PLATFORM_FILES,...additionalExclusions.map(escapeMinimatchPath)].join(",")}}`}var REGEX_NON_VERCEL_PLATFORM_FILES2=getStaticFilesPattern(),builderToFrameworks2=(()=>{let map=new Map;for(let f of import_frameworks.frameworkList){if(!f.useRuntime?.use)continue;let builder=f.useRuntime.use,entry=map.get(builder);entry?entry.push(f):map.set(builder,[f])}return map})();function sortFiles(fileA,fileB){return fileA.localeCompare(fileB)}function detectApiExtensions2(builders){return new Set(builders.filter(b=>!!(b.config&&b.config.zeroConfig&&b.src?.startsWith("api/"))).map(b=>(0,import_path.extname)(b.src)).filter(Boolean))}function detectApiDirectory2(builders){return builders.some(b=>b.config&&b.config.zeroConfig&&b.src?.startsWith("api/"))?"api":null}function getPublicBuilder(builders){for(let builder of builders)if(typeof builder.src=="string"&&(0,import_is_official_runtime.isOfficialRuntime)("static",builder.use)&&/^.*\/\*\*\/\*$/.test(builder.src)&&builder.config?.zeroConfig===!0)return builder;return null}function detectOutputDirectory2(builders){let publicBuilder=getPublicBuilder(builders);return publicBuilder?publicBuilder.src.replace("/**/*",""):null}async function detectBuilders2(files,pkg,options={}){let{projectSettings={}}=options,{framework}=projectSettings,proxyError=validateProxy2(options,files,framework);if(proxyError)return{builders:null,errors:[proxyError],warnings:[],defaultRoutes:null,redirectRoutes:null,rewriteRoutes:null,errorRoutes:null};let errors=[],warnings=[],apiBuilders=[],frontendBuilder=null,functionError=validateFunctions(options);if(functionError)return{builders:null,errors:[functionError],warnings,defaultRoutes:null,redirectRoutes:null,rewriteRoutes:null,errorRoutes:null};let sortedFiles=files.sort(sortFiles),apiSortedFiles=files.sort(sortFilesBySegmentCount),usedFunctions=new Set,addToUsedFunctions=builder=>{let key=Object.keys(builder.config.functions||{})[0];key&&usedFunctions.add(key)},absolutePathCache=new Map,{buildCommand,outputDirectory}=projectSettings,frameworkConfig=import_framework.frameworksBySlug.get(framework||""),rustStaticOutput=isRustStaticOutput(framework,projectSettings),ignoreRuntimes=new Set(rustStaticOutput?void 0:frameworkConfig?.ignoreRuntimes),withTag=options.tag?`@${options.tag}`:"",apiMatches=getApiMatches().filter(b=>b.config?.middleware&&!frameworkConfig?.disableRootMiddleware||!ignoreRuntimes.has(b.use)).map(b=>(b.use=`${b.use}${withTag}`,b)),makeFrontendStatic=buildCommand===""||outputDirectory==="",usedOutputDirectory=outputDirectory||"public",hasUsedOutputDirectory=!1,hasNoneApiFiles=!1,hasNextApiFiles=!1,fallbackEntrypoint=null,apiRoutes=[],dynamicRoutes=[];for(let fileName of sortedFiles){if(fileName===options.proxy?.entrypoint)continue;let apiBuilder=await maybeGetApiBuilder(fileName,apiMatches,options);if(apiBuilder){let{routeError,apiRoute,isDynamic}=getApiRoute(fileName,apiSortedFiles,options,absolutePathCache);if(routeError)return{builders:null,errors:[routeError],warnings,defaultRoutes:null,redirectRoutes:null,rewriteRoutes:null,errorRoutes:null};apiRoute&&(apiRoutes.push(apiRoute),isDynamic&&dynamicRoutes.push(apiRoute)),addToUsedFunctions(apiBuilder),apiBuilders.push(apiBuilder);continue}!hasUsedOutputDirectory&&fileName.startsWith(`${usedOutputDirectory}/`)&&(hasUsedOutputDirectory=!0),!hasNoneApiFiles&&!fileName.startsWith("api/")&&fileName!=="package.json"&&(hasNoneApiFiles=!0),!hasNextApiFiles&&(fileName.startsWith("pages/api")||fileName.startsWith("src/pages/api"))&&(hasNextApiFiles=!0),!fallbackEntrypoint&&buildCommand&&!fileName.includes("/")&&fileName!=="now.json"&&fileName!=="vercel.json"&&fileName!=="vercel.toml"&&(fallbackEntrypoint=fileName)}if(options.proxy){let proxyBuilder=getProxyBuilder2(options.proxy,options.tag,options.functions);addToUsedFunctions(proxyBuilder),apiBuilders.unshift(proxyBuilder)}if(!makeFrontendStatic&&!(rustStaticOutput&&!pkg&&!buildCommand)&&(hasBuildScript(pkg)||buildCommand||framework))frontendBuilder=detectFrontBuilder(pkg,files,usedFunctions,fallbackEntrypoint,options);else{if(pkg&&!makeFrontendStatic&&!apiBuilders.length&&!options.ignoreBuildScript)return errors.push(getMissingBuildScriptError()),{errors,warnings,builders:null,redirectRoutes:null,defaultRoutes:null,rewriteRoutes:null,errorRoutes:null};hasUsedOutputDirectory&&outputDirectory!==""?frontendBuilder={use:"@vercel/static",src:`${usedOutputDirectory}/**/*`,config:{zeroConfig:!0,outputDirectory:usedOutputDirectory}}:apiBuilders.length&&hasNoneApiFiles&&(frontendBuilder={use:"@vercel/static",src:getStaticFilesPattern(options.proxy?[options.proxy.entrypoint]:[]),config:{zeroConfig:!0}})}if(options.proxy&&frontendBuilder&&(0,import_is_official_runtime.isOfficialRuntime)("next",frontendBuilder.use))return{builders:null,errors:[{code:"proxy_framework_conflict",message:"The `proxy` property cannot be used with Next.js because the framework builds its own routing middleware."}],warnings,defaultRoutes:null,redirectRoutes:null,rewriteRoutes:null,errorRoutes:null};let unusedFunctionError=checkUnusedFunctions(frontendBuilder,usedFunctions,options);if(unusedFunctionError)return{builders:null,errors:[unusedFunctionError],warnings,redirectRoutes:null,defaultRoutes:null,rewriteRoutes:null,errorRoutes:null};framework===null&&frontendBuilder?.use==="@vercel/next"&&apiBuilders.length>0&&(apiBuilders=apiBuilders.filter(builder=>!(builder.use==="@vercel/node"&&builder.config?.middleware)));let builders=[];apiBuilders.length&&builders.push(...apiBuilders),frontendBuilder&&(((0,import_is_official_runtime.isOfficialRuntime)("express",frontendBuilder?.use)||(0,import_is_official_runtime.isOfficialRuntime)("hono",frontendBuilder?.use)||(0,import_is_official_runtime.isOfficialRuntime)("python",frontendBuilder?.use)||(0,import_is_official_runtime.isOfficialRuntime)("go",frontendBuilder?.use)||(0,import_is_official_runtime.isOfficialRuntime)("backends",frontendBuilder?.use))&&builders.push({src:"public/**/*",use:"@vercel/static",config:{zeroConfig:!0,outputDirectory:"public"}}),builders.push(frontendBuilder),hasNextApiFiles&&apiBuilders.some(b=>(0,import_is_official_runtime.isOfficialRuntime)("node",b.use))&&warnings.push({code:"conflicting_files",message:"When using Next.js, it is recommended to place JavaScript Functions inside of the `pages/api` (provided by Next.js) directory instead of `api` (provided by Vercel). Other languages (Python, Go, etc) should still go in the `api` directory.",link:"https://nextjs.org/docs/api-routes/introduction",action:"Learn More"}));let routesResult=getRouteResult(apiRoutes,dynamicRoutes,usedOutputDirectory,apiBuilders,frontendBuilder,options);return{warnings,builders:builders.length?builders:null,errors:errors.length?errors:null,redirectRoutes:routesResult.redirectRoutes,defaultRoutes:routesResult.defaultRoutes,rewriteRoutes:routesResult.rewriteRoutes,errorRoutes:routesResult.errorRoutes}}async function maybeGetApiBuilder(fileName,apiMatches,options){let middleware=!options.proxy&&(fileName==="middleware.js"||fileName==="middleware.ts");if(middleware&&options.projectSettings?.framework==="nextjs"||!(fileName.startsWith("api/")||middleware)||fileName.includes("/.")||fileName.includes("/_")||fileName.includes("/node_modules/")||fileName.endsWith(".d.ts"))return null;if(fileName.endsWith(".py")&&options.workPath){let fsPath=(0,import_path.join)(options.workPath,fileName);if(!await(0,import_python.isPythonEntrypoint)(fsPath))return null}let nodeExtensions=[".js",".mjs",".ts",".tsx"];if(fileName.startsWith("api/")&&process.env.VERCEL_NODE_FILTER_ENTRYPOINTS==="1"&&nodeExtensions.some(ext=>fileName.endsWith(ext))&&options.workPath){let fsPath=(0,import_path.join)(options.workPath,fileName);if(!await(0,import_build_utils.isNodeEntrypoint)({fsPath}))return null}let match=apiMatches.find(({src="**"})=>src===fileName||(0,import_minimatch.default)(fileName,src)),{fnPattern,func}=getFunction(fileName,options),use=func?.runtime||match?.use;if(!use)return null;let config={zeroConfig:!0};return middleware&&(config.middleware=!0),fnPattern&&func&&(config.functions={[fnPattern]:func},func.includeFiles&&(config.includeFiles=func.includeFiles),func.excludeFiles&&(config.excludeFiles=func.excludeFiles)),options.bunVersion&&(config.bunVersion=options.bunVersion),{use,src:fileName,config}}function getFunction(fileName,{functions={}}){let keys=Object.keys(functions);if(!keys.length)return{fnPattern:null,func:null};let func=keys.find(key=>key===fileName||(0,import_minimatch.default)(fileName,key));return func?{fnPattern:func,func:functions[func]}:{fnPattern:null,func:null}}function getProxyBuilder2(proxy,tag,functions={}){let{fnPattern,func}=getFunction(proxy.entrypoint,{functions}),runtime=func?.runtime,config={zeroConfig:!0,middleware:!0,...runtime?{}:{middlewareRuntime:"nodejs"},...proxy.matcher?{middlewareMatcher:proxy.matcher}:{}};return fnPattern&&func&&(config.functions={[fnPattern]:func},func.includeFiles&&(config.includeFiles=func.includeFiles),func.excludeFiles&&(config.excludeFiles=func.excludeFiles)),{src:proxy.entrypoint,use:runtime||`@vercel/node${tag?`@${tag}`:""}`,config}}function getApiMatches(){let config={zeroConfig:!0};return[{src:REGEX_MIDDLEWARE_FILES,use:"@vercel/node",config:{...config,middleware:!0}},{src:"api/**/*.+(js|mjs|ts|tsx)",use:"@vercel/node",config},{src:"api/**/!(*_test).go",use:"@vercel/go",config},{src:"api/**/*.py",use:"@vercel/python",config},{src:"api/**/*.rb",use:"@vercel/ruby",config},{src:"api/**/*.rs",use:"@vercel/rust",config}]}function validateProxyConfig2(proxy){if(typeof proxy!="object"||typeof proxy.entrypoint!="string"||!proxy.entrypoint)return{code:"invalid_proxy",message:"The `proxy` property must contain an `entrypoint` string that references a `.js` or `.ts` file."};let entrypoint=proxy.entrypoint,segments=entrypoint.split("/");if(entrypoint.startsWith("/")||entrypoint.includes("\\")||segments.includes(".")||segments.includes("..")||/[?#\u0000-\u001f]/.test(entrypoint))return{code:"invalid_proxy_entrypoint",message:"The `proxy.entrypoint` path must be relative to the project root and cannot contain traversal, query, fragment, or control characters."};if(!/\.(?:js|ts)$/.test(entrypoint)||entrypoint.endsWith(".d.ts"))return{code:"invalid_proxy_entrypoint",message:"The `proxy.entrypoint` path must end in `.js` or `.ts` and reference an executable file."};if(proxy.matcher!==void 0){let matchers=Array.isArray(proxy.matcher)?proxy.matcher:[proxy.matcher];if(matchers.length===0||matchers.some(matcher=>typeof matcher!="string"||!matcher.startsWith("/")))return{code:"invalid_proxy_matcher",message:"The `proxy.matcher` value must be a path matcher starting with `/`, or an array of path matchers starting with `/`."}}return null}function validateProxy2(options,files,framework){let{proxy}=options;if(!proxy)return null;let configError=validateProxyConfig2(proxy);if(configError)return configError;if(!files.includes(proxy.entrypoint))return{code:"proxy_entrypoint_not_found",message:`The proxy entrypoint \`${proxy.entrypoint}\` does not exist. Set \`proxy.entrypoint\` to an existing \`.js\` or \`.ts\` file.`};if(framework==="nextjs"||framework==="astro")return{code:"proxy_framework_conflict",message:`The \`proxy\` property cannot be used with ${framework==="nextjs"?"Next.js":"Astro"} because the framework builds its own routing middleware.`};let appRuntime=(0,import_framework.inferBuilderRuntimeFromFramework)(framework),proxyRuntime=import_constants.ENTRYPOINT_EXTENSIONS[(0,import_path.extname)(proxy.entrypoint)];return appRuntime!==void 0&&proxyRuntime!==void 0&&appRuntime!==proxyRuntime?{code:"proxy_runtime_mismatch",message:`The proxy entrypoint \`${proxy.entrypoint}\` uses the ${proxyRuntime} runtime, but the app uses the ${appRuntime} runtime. The proxy and app must use the same runtime.`}:null}function hasBuildScript(pkg){let{scripts={}}=pkg||{};return!!(scripts&&scripts.build)}function isRustStaticOutput(framework,projectSettings){return framework==="rust"&&typeof projectSettings.outputDirectory=="string"&&projectSettings.outputDirectory!==""&&projectSettings.outputDirectory!=="N/A"}function detectFrontBuilder(pkg,files,usedFunctions,fallbackEntrypoint,options){let{tag,projectSettings={}}=options,withTag=tag?`@${tag}`:"",{createdAt=0}=projectSettings,{framework}=projectSettings,config={zeroConfig:!0};framework&&(config.framework=framework),projectSettings.devCommand&&(config.devCommand=projectSettings.devCommand),typeof projectSettings.installCommand=="string"&&(config.installCommand=projectSettings.installCommand),projectSettings.buildCommand&&(config.buildCommand=projectSettings.buildCommand),projectSettings.outputDirectory&&(config.outputDirectory=projectSettings.outputDirectory),options.bunVersion&&(config.bunVersion=options.bunVersion),pkg&&(framework===void 0||framework!=="storybook"&&createdAt<Date.parse("2020-03-01"))&&{...pkg.dependencies,...pkg.devDependencies}.next&&(framework="nextjs"),options.functions&&Object.entries(options.functions).forEach(([key,func])=>{usedFunctions.has(key)||(config.functions||(config.functions={}),config.functions[key]={...func})});let f=import_framework.frameworksBySlug.get(framework||"");if(f&&f.useRuntime&&!isRustStaticOutput(framework,projectSettings)){let buildpackRuntime=(0,import_buildpack_runtimes.toBuildpackRuntime)(framework);if(buildpackRuntime&&(import_buildpack_runtimes.BUILDPACK_PROJECT_MARKERS.get(buildpackRuntime)??[]).some(marker=>files.includes(marker)))return config.buildpack=buildpackRuntime,{src:"<detect>",use:`@vercel/container${withTag}`,config};let{src,use}=f.useRuntime,finalUse=(0,import_build_utils.isExperimentalBackendsEnabled)()&&import_build_utils.BACKEND_BUILDERS.includes(use)?import_build_utils.UNIFIED_BACKEND_BUILDER:use;return{src,use:`${finalUse}${withTag}`,config}}let entrypoints=new Set(["package.json","config.yaml","config.toml","config.json","_config.yml","config.yml","config.rb"]);return{src:(pkg?"package.json":files.find(file=>entrypoints.has(file))||fallbackEntrypoint||"package.json")||"package.json",use:`@vercel/static-build${withTag}`,config}}function getMissingBuildScriptError(){return{code:"missing_build_script",message:"Your `package.json` file is missing a `build` property inside the `scripts` property.\nLearn More: https://vercel.link/missing-build-script"}}function validateFunctions({functions={}}){for(let[path,func]of Object.entries(functions)){if(path.length>256)return{code:"invalid_function_glob",message:"Function globs must be less than 256 characters long."};if(!func||typeof func!="object")return{code:"invalid_function",message:"Function must be an object."};if(Object.keys(func).length===0)return{code:"invalid_function",message:"Function must contain at least one property."};let maxDurationLimit=(0,import_build_utils.getMaxDurationLimit)();if(func.maxDuration!==void 0&&func.maxDuration!=="max"&&(func.maxDuration<1||maxDurationLimit!==void 0&&func.maxDuration>maxDurationLimit||!Number.isInteger(func.maxDuration)))return{code:"invalid_function_duration",message:maxDurationLimit!==void 0?`Functions must have a maxDuration between 1 and ${maxDurationLimit}, or "max".`:'Functions must have a positive integer maxDuration, or "max".'};if(func.memory!==void 0&&(func.memory<128||func.memory>10240))return{code:"invalid_function_memory",message:"Functions must have a memory value between 128 and 10240"};if(path.startsWith("/"))return{code:"invalid_function_source",message:`The function path "${path}" is invalid. The path must be relative to your project root and therefore cannot start with a slash.`};if(func.runtime!==void 0){let tag=`${func.runtime}`.split("@").pop();if(!tag||!(0,import_semver.valid)(tag))return{code:"invalid_function_runtime",message:"Function Runtimes must have a valid version, for example `now-php@1.0.0`."}}if(func.includeFiles!==void 0&&typeof func.includeFiles!="string")return{code:"invalid_function_property",message:"The property `includeFiles` must be a string."};if(func.excludeFiles!==void 0&&typeof func.excludeFiles!="string")return{code:"invalid_function_property",message:"The property `excludeFiles` must be a string."}}return null}function checkUnusedFunctions(frontendBuilder,usedFunctions,options){let unusedFunctions=new Set(Object.keys(options.functions||{}).filter(key=>!usedFunctions.has(key)));if(!unusedFunctions.size)return null;if(frontendBuilder&&(0,import_is_official_runtime.isOfficialRuntime)("next",frontendBuilder.use))for(let fnKey of unusedFunctions.values())if(fnKey.startsWith("pages/")||fnKey.startsWith("src/pages")||fnKey.startsWith("app/")||fnKey.startsWith("src/app/")||fnKey.startsWith("middleware")||fnKey.startsWith("src/middleware"))unusedFunctions.delete(fnKey);else return{code:"unused_function",message:`The pattern "${fnKey}" defined in \`functions\` doesn't match any Serverless Functions.`,action:"Learn More",link:"https://vercel.link/unmatched-function-pattern"};if(frontendBuilder&&((0,import_is_official_runtime.isOfficialRuntime)("express",frontendBuilder.use)||(0,import_is_official_runtime.isOfficialRuntime)("hono",frontendBuilder.use)||(0,import_is_official_runtime.isOfficialRuntime)("python",frontendBuilder.use)||(0,import_is_official_runtime.isOfficialRuntime)("backends",frontendBuilder.use)))return null;if(unusedFunctions.size){let[fnKey]=Array.from(unusedFunctions);return{code:"unused_function",message:`The pattern "${fnKey}" defined in \`functions\` doesn't match any Serverless Functions inside the \`api\` directory.`,action:"Learn More",link:"https://vercel.link/unmatched-function-pattern"}}return null}function getApiRoute(fileName,sortedFiles,options,absolutePathCache){let conflictingSegment=getConflictingSegment(fileName);if(conflictingSegment)return{apiRoute:null,isDynamic:!1,routeError:{code:"conflicting_path_segment",message:`The segment "${conflictingSegment}" occurs more than one time in your path "${fileName}". Please make sure that every segment in a path is unique.`}};let occurrences=pathOccurrences(fileName,sortedFiles,absolutePathCache);if(occurrences.length>0){let messagePaths=concatArrayOfText(occurrences.map(name=>`"${name}"`));return{apiRoute:null,isDynamic:!1,routeError:{code:"conflicting_file_path",message:`Two or more files have conflicting paths or names. Please make sure path segments and filenames, without their extension, are unique. The path "${fileName}" has conflicts with ${messagePaths}.`}}}let out=createRouteFromPath(fileName,!!options.featHandleMiss,!!options.cleanUrls);return{apiRoute:out.route,isDynamic:out.isDynamic,routeError:null}}function getConflictingSegment(filePath){let segments=new Set;for(let segment of filePath.split("/")){let name=getSegmentName(segment);if(name!==null&&segments.has(name))return name;name&&segments.add(name)}return null}function getSegmentName(segment){let{name}=(0,import_path.parse)(segment);return name.startsWith("[")&&name.endsWith("]")?name.slice(1,-1):null}function getAbsolutePath(unresolvedPath){let{dir,name}=(0,import_path.parse)(unresolvedPath);return joinPath(dir,name).split("/").map(part=>part.replace(/\[.*\]/,"1")).join("/")}function pathOccurrences(fileName,files,absolutePathCache){let currentAbsolutePath=absolutePathCache.get(fileName);currentAbsolutePath||(currentAbsolutePath=getAbsolutePath(fileName),absolutePathCache.set(fileName,currentAbsolutePath));let prev=[];for(let file of files){if(file===fileName)continue;let absolutePath=absolutePathCache.get(file);absolutePath||(absolutePath=getAbsolutePath(file),absolutePathCache.set(file,absolutePath)),(absolutePath===currentAbsolutePath||partiallyMatches(fileName,file))&&prev.push(file)}return prev}function joinPath(...segments){return segments.join("/").replace(/\/{2,}/g,"/")}function escapeName(name){let special="[]^$.|?*+()".split("");for(let char of special)name=name.replace(new RegExp(`\\${char}`,"g"),`\\${char}`);return name}function concatArrayOfText(texts){if(texts.length<=2)return texts.join(" and ");let last=texts.pop();return`${texts.join(", ")}, and ${last}`}function partiallyMatches(pathA,pathB){let partsA=pathA.split("/"),partsB=pathB.split("/"),long=partsA.length>partsB.length?partsA:partsB,short=long===partsA?partsB:partsA,index=0;for(let segmentShort of short){let segmentLong=long[index],nameLong=getSegmentName(segmentLong),nameShort=getSegmentName(segmentShort);if(segmentShort!==segmentLong&&(!nameLong||!nameShort))return!1;if(nameLong!==nameShort)return!0;index+=1}return!1}function createRouteFromPath(filePath,featHandleMiss,cleanUrls){let parts=filePath.split("/"),counter=1,query=[],isDynamic=!1,srcParts=parts.map((segment,i)=>{let name=getSegmentName(segment),isLast=i===parts.length-1;if(name!==null)return query.push(`${name}=$${counter++}`),isDynamic=!0,"([^/]+)";if(isLast){let{name:fileName2,ext:ext2}=(0,import_path.parse)(segment),isIndex2=fileName2==="index",prefix=isIndex2?"/":"";return`(${[isIndex2?prefix:`${fileName2}/`,prefix+escapeName(fileName2),featHandleMiss&&cleanUrls?"":prefix+escapeName(fileName2)+escapeName(ext2)].filter(Boolean).join("|")})${isIndex2?"?":""}`}return segment}),{name:fileName,ext}=(0,import_path.parse)(filePath),isIndex=fileName==="index",queryString=`${query.length?"?":""}${query.join("&")}`,src=isIndex?`^/${srcParts.slice(0,-1).join("/")}${srcParts.slice(-1)[0]}$`:`^/${srcParts.join("/")}$`,route;if(featHandleMiss){let extensionless=ext?filePath.slice(0,-ext.length):filePath;route={src,dest:`/${extensionless}${queryString}`,check:!0}}else route={src,dest:`/${filePath}${queryString}`};return{route,isDynamic}}function getRouteResult(apiRoutes,dynamicRoutes,outputDirectory,apiBuilders,frontendBuilder,options){let defaultRoutes=[],redirectRoutes=[],rewriteRoutes=[],errorRoutes=[],framework=frontendBuilder?.config?.framework||"",isGatsby=framework==="gatsby",isNextjs=framework==="nextjs"||(0,import_is_official_runtime.isOfficialRuntime)("next",frontendBuilder?.use),ignoreRuntimes=import_framework.frameworksBySlug.get(framework)?.ignoreRuntimes;if(apiRoutes&&apiRoutes.length>0)if(options.featHandleMiss){let extSet=detectApiExtensions2(apiBuilders);if(extSet.size>0){let extGroup=`(?:\\.(?:${Array.from(extSet).map(ext=>ext.slice(1)).join("|")}))`;options.cleanUrls?(redirectRoutes.push({src:`^/(api(?:.+)?)/index${extGroup}?/?$`,headers:{Location:options.trailingSlash?"/$1/":"/$1"},status:308}),redirectRoutes.push({src:`^/api/(.+)${extGroup}/?$`,headers:{Location:options.trailingSlash?"/api/$1/":"/api/$1"},status:308})):(defaultRoutes.push({handle:"miss"}),defaultRoutes.push({src:`^/api/(.+)${extGroup}$`,dest:"/api/$1",check:!0}))}rewriteRoutes.push(...dynamicRoutes);let hasApiBuild=apiBuilders.find(builder=>builder.src?.startsWith("api/"));typeof ignoreRuntimes>"u"&&hasApiBuild&&!isNextjs&&rewriteRoutes.push({src:"^/api(/.*)?$",status:404})}else defaultRoutes.push(...apiRoutes),apiRoutes.length&&!isNextjs&&defaultRoutes.push({status:404,src:"^/api(/.*)?$"});return outputDirectory&&frontendBuilder&&!options.featHandleMiss&&(0,import_is_official_runtime.isOfficialRuntime)("static",frontendBuilder.use)&&defaultRoutes.push({src:"/(.*)",dest:`/${outputDirectory}/$1`}),options.featHandleMiss&&!isNextjs&&!isGatsby&&errorRoutes.push({status:404,src:"^(?!/api).*$",dest:options.cleanUrls?"/404":"/404.html"}),{defaultRoutes,redirectRoutes,rewriteRoutes,errorRoutes}}function sortFilesBySegmentCount(fileA,fileB){let lengthA=fileA.split("/").length,lengthB=fileB.split("/").length;if(lengthA>lengthB)return-1;if(lengthA<lengthB)return 1;let countSegments=(prev,segment)=>getSegmentName(segment)?prev+1:0,segmentLengthA=fileA.split("/").reduce(countSegments,0),segmentLengthB=fileB.split("/").reduce(countSegments,0);return segmentLengthA>segmentLengthB?1:segmentLengthA<segmentLengthB?-1:fileA.localeCompare(fileB)}}});var require_dist2=__commonJS({"../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char==="*"||char==="+"||char==="?"){tokens.push({type:"MODIFIER",index:i,value:str[i++]});continue}if(char==="\\"){tokens.push({type:"ESCAPED_CHAR",index:i++,value:str[i++]});continue}if(char==="{"){tokens.push({type:"OPEN",index:i,value:str[i++]});continue}if(char==="}"){tokens.push({type:"CLOSE",index:i,value:str[i++]});continue}if(char===":"){for(var name="",j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw new TypeError("Missing parameter name at "+i);tokens.push({type:"NAME",index:i,value:name}),i=j;continue}if(char==="("){var count=1,pattern="",j=i+1;if(str[j]==="?")throw new TypeError('Pattern cannot start with "?" at '+j);for(;j<str.length;){if(str[j]==="\\"){pattern+=str[j++]+str[j++];continue}if(str[j]===")"){if(count--,count===0){j++;break}}else if(str[j]==="("&&(count++,str[j+1]!=="?"))throw new TypeError("Capturing groups are not allowed at "+j);pattern+=str[j++]}if(count)throw new TypeError("Unbalanced pattern at "+i);if(!pattern)throw new TypeError("Missing pattern at "+i);tokens.push({type:"PATTERN",index:i,value:pattern}),i=j;continue}tokens.push({type:"CHAR",index:i,value:str[i++]})}return tokens.push({type:"END",index:i,value:""}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?"./":_a,defaultPattern="[^"+escapeString(options.delimiter||"/#?")+"]+?",result=[],key=0,i=0,path="",tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value2=tryConsume(type);if(value2!==void 0)return value2;var _a2=tokens[i],nextType=_a2.type,index=_a2.index;throw new TypeError("Unexpected "+nextType+" at "+index+", expected "+type)},consumeText=function(){for(var result2="",value2;value2=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)result2+=value2;return result2};i<tokens.length;){var char=tryConsume("CHAR"),name=tryConsume("NAME"),pattern=tryConsume("PATTERN");if(name||pattern){var prefix=char||"";prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=""),path&&(result.push(path),path=""),result.push({name:name||key++,prefix,suffix:"",pattern:pattern||defaultPattern,modifier:tryConsume("MODIFIER")||""});continue}var value=char||tryConsume("ESCAPED_CHAR");if(value){path+=value;continue}path&&(result.push(path),path="");var open=tryConsume("OPEN");if(open){var prefix=consumeText(),name_1=tryConsume("NAME")||"",pattern_1=tryConsume("PATTERN")||"",suffix=consumeText();mustConsume("CLOSE"),result.push({name:name_1||(pattern_1?key++:""),pattern:name_1&&!pattern_1?defaultPattern:pattern_1,prefix,suffix,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0?!0:_b,matches=tokens.map(function(token){if(typeof token=="object")return new RegExp("^(?:"+token.pattern+")$",reFlags)});return function(data){for(var path="",i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string"){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier==="?"||token.modifier==="*",repeat=token.modifier==="*"||token.modifier==="+";if(Array.isArray(value)){if(!repeat)throw new TypeError('Expected "'+token.name+'" to not repeat, but got an array');if(value.length===0){if(optional)continue;throw new TypeError('Expected "'+token.name+'" to not be empty')}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected all "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path+=token.prefix+segment+token.suffix}continue}if(typeof value=="string"||typeof value=="number"){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?"an array":"a string";throw new TypeError('Expected "'+token.name+'" to be '+typeOfMessage)}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[],re=pathToRegexp2(str,keys,options);return regexpToFunction(re,keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i2){if(m[i2]===void 0)return"continue";var key=keys[i2-1];key.modifier==="*"||key.modifier==="+"?params[key.name]=m[i2].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i2],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path,keys){if(!keys)return path;var groups=path.source.match(/\((?!\?)/g);if(groups)for(var i=0;i<groups.length;i++)keys.push({name:i,prefix:"",suffix:"",modifier:"",pattern:""});return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp2(path,keys,options).source});return new RegExp("(?:"+parts.join("|")+")",flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a===void 0?!1:_a,_b=options.start,start=_b===void 0?!0:_b,_c=options.end,end=_c===void 0?!0:_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,endsWith="["+escapeString(options.endsWith||"")+"]|$",delimiter="["+escapeString(options.delimiter||"/#?")+"]",route=start?"^":"",_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token=="string")route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern)if(keys&&keys.push(token),prefix||suffix)if(token.modifier==="+"||token.modifier==="*"){var mod=token.modifier==="*"?"?":"";route+="(?:"+prefix+"((?:"+token.pattern+")(?:"+suffix+prefix+"(?:"+token.pattern+"))*)"+suffix+")"+mod}else route+="(?:"+prefix+"("+token.pattern+")"+suffix+")"+token.modifier;else route+="("+token.pattern+")"+token.modifier;else route+="(?:"+prefix+suffix+")"+token.modifier}}if(end)strict||(route+=delimiter+"?"),route+=options.endsWith?"(?="+endsWith+")":"$";else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken=="string"?delimiter.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+="(?:"+delimiter+"(?="+endsWith+"))?"),isEndDelimited||(route+="(?="+delimiter+"|"+endsWith+")")}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp2(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp2}});var require_dist3=__commonJS({"../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pathToRegexp=exports.tokensToRegexp=exports.regexpToFunction=exports.match=exports.tokensToFunction=exports.compile=exports.parse=void 0;function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char==="*"||char==="+"||char==="?"){tokens.push({type:"MODIFIER",index:i,value:str[i++]});continue}if(char==="\\"){tokens.push({type:"ESCAPED_CHAR",index:i++,value:str[i++]});continue}if(char==="{"){tokens.push({type:"OPEN",index:i,value:str[i++]});continue}if(char==="}"){tokens.push({type:"CLOSE",index:i,value:str[i++]});continue}if(char===":"){for(var name="",j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw new TypeError("Missing parameter name at ".concat(i));tokens.push({type:"NAME",index:i,value:name}),i=j;continue}if(char==="("){var count=1,pattern="",j=i+1;if(str[j]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(j));for(;j<str.length;){if(str[j]==="\\"){pattern+=str[j++]+str[j++];continue}if(str[j]===")"){if(count--,count===0){j++;break}}else if(str[j]==="("&&(count++,str[j+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(j));pattern+=str[j++]}if(count)throw new TypeError("Unbalanced pattern at ".concat(i));if(!pattern)throw new TypeError("Missing pattern at ".concat(i));tokens.push({type:"PATTERN",index:i,value:pattern}),i=j;continue}tokens.push({type:"CHAR",index:i,value:str[i++]})}return tokens.push({type:"END",index:i,value:""}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?"./":_a,_b=options.delimiter,delimiter=_b===void 0?"/#?":_b,result=[],key=0,i=0,path="",tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value2=tryConsume(type);if(value2!==void 0)return value2;var _a2=tokens[i],nextType=_a2.type,index=_a2.index;throw new TypeError("Unexpected ".concat(nextType," at ").concat(index,", expected ").concat(type))},consumeText=function(){for(var result2="",value2;value2=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)result2+=value2;return result2},isSafe=function(value2){for(var _i=0,delimiter_1=delimiter;_i<delimiter_1.length;_i++){var char2=delimiter_1[_i];if(value2.indexOf(char2)>-1)return!0}return!1},safePattern=function(prefix2){var prev=result[result.length-1],prevText=prefix2||(prev&&typeof prev=="string"?prev:"");if(prev&&!prevText)throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name,'"'));return!prevText||isSafe(prevText)?"[^".concat(escapeString(delimiter),"]+?"):"(?:(?!".concat(escapeString(prevText),")[^").concat(escapeString(delimiter),"])+?")};i<tokens.length;){var char=tryConsume("CHAR"),name=tryConsume("NAME"),pattern=tryConsume("PATTERN");if(name||pattern){var prefix=char||"";prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=""),path&&(result.push(path),path=""),result.push({name:name||key++,prefix,suffix:"",pattern:pattern||safePattern(prefix),modifier:tryConsume("MODIFIER")||""});continue}var value=char||tryConsume("ESCAPED_CHAR");if(value){path+=value;continue}path&&(result.push(path),path="");var open=tryConsume("OPEN");if(open){var prefix=consumeText(),name_1=tryConsume("NAME")||"",pattern_1=tryConsume("PATTERN")||"",suffix=consumeText();mustConsume("CLOSE"),result.push({name:name_1||(pattern_1?key++:""),pattern:name_1&&!pattern_1?safePattern(prefix):pattern_1,prefix,suffix,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0?!0:_b,matches=tokens.map(function(token){if(typeof token=="object")return new RegExp("^(?:".concat(token.pattern,")$"),reFlags)});return function(data){for(var path="",i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string"){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier==="?"||token.modifier==="*",repeat=token.modifier==="*"||token.modifier==="+";if(Array.isArray(value)){if(!repeat)throw new TypeError('Expected "'.concat(token.name,'" to not repeat, but got an array'));if(value.length===0){if(optional)continue;throw new TypeError('Expected "'.concat(token.name,'" to not be empty'))}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected all "'.concat(token.name,'" to match "').concat(token.pattern,'", but got "').concat(segment,'"'));path+=token.prefix+segment+token.suffix}continue}if(typeof value=="string"||typeof value=="number"){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected "'.concat(token.name,'" to match "').concat(token.pattern,'", but got "').concat(segment,'"'));path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?"an array":"a string";throw new TypeError('Expected "'.concat(token.name,'" to be ').concat(typeOfMessage))}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[],re=pathToRegexp2(str,keys,options);return regexpToFunction(re,keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i2){if(m[i2]===void 0)return"continue";var key=keys[i2-1];key.modifier==="*"||key.modifier==="+"?params[key.name]=m[i2].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i2],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path,keys){if(!keys)return path;for(var groupsRegex=/\((?:\?<(.*?)>)?(?!\?)/g,index=0,execResult=groupsRegex.exec(path.source);execResult;)keys.push({name:execResult[1]||index++,prefix:"",suffix:"",modifier:"",pattern:""}),execResult=groupsRegex.exec(path.source);return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp2(path,keys,options).source});return new RegExp("(?:".concat(parts.join("|"),")"),flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a===void 0?!1:_a,_b=options.start,start=_b===void 0?!0:_b,_c=options.end,end=_c===void 0?!0:_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,_e=options.delimiter,delimiter=_e===void 0?"/#?":_e,_f=options.endsWith,endsWith=_f===void 0?"":_f,endsWithRe="[".concat(escapeString(endsWith),"]|$"),delimiterRe="[".concat(escapeString(delimiter),"]"),route=start?"^":"",_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token=="string")route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern)if(keys&&keys.push(token),prefix||suffix)if(token.modifier==="+"||token.modifier==="*"){var mod=token.modifier==="*"?"?":"";route+="(?:".concat(prefix,"((?:").concat(token.pattern,")(?:").concat(suffix).concat(prefix,"(?:").concat(token.pattern,"))*)").concat(suffix,")").concat(mod)}else route+="(?:".concat(prefix,"(").concat(token.pattern,")").concat(suffix,")").concat(token.modifier);else{if(token.modifier==="+"||token.modifier==="*")throw new TypeError('Can not repeat "'.concat(token.name,'" without a prefix and suffix'));route+="(".concat(token.pattern,")").concat(token.modifier)}else route+="(?:".concat(prefix).concat(suffix,")").concat(token.modifier)}}if(end)strict||(route+="".concat(delimiterRe,"?")),route+=options.endsWith?"(?=".concat(endsWithRe,")"):"$";else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken=="string"?delimiterRe.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+="(?:".concat(delimiterRe,"(?=").concat(endsWithRe,"))?")),isEndDelimited||(route+="(?=".concat(delimiterRe,"|").concat(endsWithRe,")"))}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp2(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp2}});var require_superstatic=__commonJS({"../routing-utils/dist/superstatic.js"(exports,module){"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),superstatic_exports={};__export(superstatic_exports,{collectHasSegments:()=>collectHasSegments,compilePathToRegexpTemplate:()=>compilePathToRegexpTemplate2,convertCleanUrls:()=>convertCleanUrls,convertHeaders:()=>convertHeaders,convertRedirects:()=>convertRedirects,convertRewrites:()=>convertRewrites2,convertTrailingSlash:()=>convertTrailingSlash,getCleanUrls:()=>getCleanUrls2,pathToRegexp:()=>pathToRegexp2,sourceToRegex:()=>sourceToRegex2});module.exports=__toCommonJS(superstatic_exports);var import_url=__require("url"),import_path_to_regexp=require_dist2(),import_path_to_regexp_updated=require_dist3();function cloneKeys(keys){if(!(typeof keys>"u"))return keys.slice(0)}function compareKeys(left,right){let leftSerialized=typeof left>"u"?"undefined":left.toString(),rightSerialized=typeof right>"u"?"undefined":right.toString();return leftSerialized===rightSerialized}function pathToRegexp2(callerId,path,keys,options){let newKeys=cloneKeys(keys),currentRegExp=(0,import_path_to_regexp.pathToRegexp)(path,keys,options);try{let currentKeys=keys,newRegExp=(0,import_path_to_regexp_updated.pathToRegexp)(path,newKeys,options),isDiffRegExp=currentRegExp.toString()!==newRegExp.toString();if(process.env.FORCE_PATH_TO_REGEXP_LOG||isDiffRegExp){let message=JSON.stringify({path,currentRegExp:currentRegExp.toString(),newRegExp:newRegExp.toString()});console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`)}let isDiffKeys=!compareKeys(keys,newKeys);if(process.env.FORCE_PATH_TO_REGEXP_LOG||isDiffKeys){let message=JSON.stringify({isDiffKeys,currentKeys,newKeys});console.error(`[vc] PATH TO REGEXP KEYS DIFF @ #${callerId}: ${message}`)}}catch(err){let message=JSON.stringify({path,error:err.message});console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${message}`)}return currentRegExp}var UN_NAMED_SEGMENT="__UN_NAMED_SEGMENT__";function getCleanUrls2(filePaths){return filePaths.map(toRoute).filter(f=>f.endsWith(".html")).map(f=>({html:f,clean:f.slice(0,-5)}))}function convertCleanUrls(cleanUrls,trailingSlash,status=308){let routes=[];if(cleanUrls){let loc=trailingSlash?"/$1/":"/$1";routes.push({src:"^/(?:(.+)/)?index(?:\\.html)?/?$",headers:{Location:loc},status}),routes.push({src:"^/(.*)\\.html/?$",headers:{Location:loc},status})}return routes}function convertRedirects(redirects,defaultStatus=308){return redirects.map(r=>{let{src,segments}=sourceToRegex2(r.source),hasSegments=collectHasSegments(r.has);normalizeHasKeys(r.has),normalizeHasKeys(r.missing);try{let loc=replaceSegments(segments,hasSegments,r.destination,!0),status;typeof r.permanent=="boolean"?status=r.permanent?308:307:r.statusCode?status=r.statusCode:status=defaultStatus;let route={src,headers:{Location:loc},status};return typeof r.env<"u"&&(route.env=r.env),r.has&&(route.has=r.has),r.missing&&(route.missing=r.missing),route}catch{throw new Error(`Failed to parse redirect: ${JSON.stringify(r)}`)}})}function convertRewrites2(rewrites,internalParamNames){return rewrites.map(r=>{let{src,segments}=sourceToRegex2(r.source),hasSegments=collectHasSegments(r.has);normalizeHasKeys(r.has),normalizeHasKeys(r.missing);try{let interpolate=value=>replaceSegments(segments,hasSegments,value,!1,internalParamNames),route;if(typeof r.destination=="string")route={src,dest:interpolate(r.destination),check:!0};else{let destination={...r.destination,type:"service"};typeof destination.path=="string"&&(destination.path=interpolate(destination.path)),route={src,destination}}return r.transforms&&(route.transforms=r.transforms.map(transform=>transform.type!=="request.path"?{...transform}:{...transform,args:compilePathToRegexpTemplateFromSegments(transform.args,segments,hasSegments,transform.env)})),typeof r.env<"u"&&(route.env=r.env),r.has&&(route.has=r.has),r.missing&&(route.missing=r.missing),r.statusCode&&(route.status=r.statusCode),route}catch{throw new Error(`Failed to parse rewrite: ${JSON.stringify(r)}`)}})}function convertHeaders(headers){return headers.map(h=>{let obj={},{src,segments}=sourceToRegex2(h.source),hasSegments=collectHasSegments(h.has);normalizeHasKeys(h.has),normalizeHasKeys(h.missing);let namedSegments=segments.filter(name=>name!==UN_NAMED_SEGMENT),indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index)}),hasSegments.forEach(name=>{indexes[name]="$"+name}),h.headers.forEach(({key,value})=>{(namedSegments.length>0||hasSegments.length>0)&&(key.includes(":")&&(key=safelyCompile(key,indexes)),value.includes(":")&&(value=safelyCompile(value,indexes))),obj[key]=value});let route={src,headers:obj,continue:!0};return h.has&&(route.has=h.has),h.missing&&(route.missing=h.missing),route})}function convertTrailingSlash(enable,status=308){let routes=[];return enable?(routes.push({src:"^/\\.well-known(?:/.*)?$"}),routes.push({src:"^/((?:[^/]+/)*[^/\\.]+)$",headers:{Location:"/$1/"},status}),routes.push({src:"^/((?:[^/]+/)*[^/]+\\.\\w+)/$",headers:{Location:"/$1"},status})):routes.push({src:"^/(.*)\\/$",headers:{Location:"/$1"},status}),routes}function sourceToRegex2(source){let keys=[],r=pathToRegexp2("632",source,keys,{strict:!0,sensitive:!0,delimiter:"/"}),segments=keys.map(k=>k.name).map(name=>typeof name!="string"?UN_NAMED_SEGMENT:name);return{src:r.source,segments}}var namedGroupsRegex=/\(\?<([a-zA-Z][a-zA-Z0-9_]*)>/g,normalizeHasKeys=(hasItems=[])=>{for(let hasItem of hasItems)"key"in hasItem&&hasItem.type==="header"&&(hasItem.key=hasItem.key.toLowerCase());return hasItems};function getStringValueForRegex(value){return typeof value=="string"?value:value&&typeof value=="object"&&value!==null&&"re"in value&&typeof value.re=="string"?value.re:null}function collectHasSegments(has){let hasSegments=new Set;for(let hasItem of has||[]){!hasItem.value&&"key"in hasItem&&hasSegments.add(hasItem.key);let stringValue=getStringValueForRegex(hasItem.value);if(stringValue){for(let match of stringValue.matchAll(namedGroupsRegex))match[1]&&hasSegments.add(match[1]);hasItem.type==="host"&&hasSegments.add("host")}}return[...hasSegments]}var escapeSegment=(str,segmentName)=>str.replace(new RegExp(`:${segmentName}`,"g"),`__ESC_COLON_${segmentName}`),unescapeSegments=str=>str.replace(/__ESC_COLON_/gi,":"),pathTemplateSegmentNameRegex=/^([a-zA-Z_][a-zA-Z0-9_]*)/;function isEscaped(value,index){let backslashCount=0;for(let i=index-1;i>=0&&value[i]==="\\";i--)backslashCount++;return backslashCount%2===1}function collectPathTemplateSegments(template){let segments=[];for(let i=0;i<template.length;i++){if(template[i]!==":"||isEscaped(template,i))continue;let match=template.slice(i+1).match(pathTemplateSegmentNameRegex);match&&(segments.push(match[1]),i+=match[1].length)}return segments}function collectNamedDollarReferences(template){let references=[];for(let i=0;i<template.length;i++){if(template[i]!=="$"||isEscaped(template,i))continue;let remainder=template.slice(i+1),bracedMatch=remainder.match(/^\{([a-zA-Z_][a-zA-Z0-9_]*)\}/),unbracedMatch=remainder.match(pathTemplateSegmentNameRegex),name=bracedMatch?.[1]||unbracedMatch?.[1];name&&references.push(name)}return references}function compilePathToRegexpTemplateFromSegments(template,segments,hasItemSegments,env=[]){let indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index)}),hasItemSegments.forEach(name=>{indexes[name]=`$${name}`});for(let name of collectPathTemplateSegments(template))if(!(name in indexes))throw new Error(`Path template references parameter ":${name}" that is not present in the source or has conditions.`);let routeParameters=new Set([...segments.filter(name=>name!==UN_NAMED_SEGMENT),...hasItemSegments]);for(let name of collectNamedDollarReferences(template))if(routeParameters.has(name)&&!env.includes(name))throw new Error(`Path template references route parameter "${name}" as \`$${name}\`. Use \`:${name}\` path-to-regexp syntax in high-level rewrites, or list "${name}" in the transform env allowlist if it is an environment variable.`);return safelyCompile(template,indexes,!0)}function compilePathToRegexpTemplate2(source,template,has,env){let{segments}=sourceToRegex2(source);return compilePathToRegexpTemplateFromSegments(template,segments,collectHasSegments(has),env)}function replaceSegments(segments,hasItemSegments,destination,isRedirect,internalParamNames){let namedSegments=segments.filter(name=>name!==UN_NAMED_SEGMENT);if(!(destination.includes(":")&&namedSegments.length>0||hasItemSegments.length>0||!isRedirect))return destination;let escapedDestination=destination,indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index),escapedDestination=escapeSegment(escapedDestination,name)}),hasItemSegments.forEach(name=>{indexes[name]="$"+name,escapedDestination=escapeSegment(escapedDestination,name)});let parsedDestination=(0,import_url.parse)(escapedDestination,!0);delete parsedDestination.href,delete parsedDestination.path,delete parsedDestination.search,delete parsedDestination.host;let{pathname,hash,query,hostname,...rest}=parsedDestination;pathname=unescapeSegments(pathname||""),hash=unescapeSegments(hash||""),hostname=unescapeSegments(hostname||"");let destParams=new Set,pathnameKeys=[],hashKeys=[],hostnameKeys=[];try{pathToRegexp2("528",pathname,pathnameKeys),pathToRegexp2("834",hash||"",hashKeys),pathToRegexp2("712",hostname||"",hostnameKeys)}catch{}destParams=new Set([...pathnameKeys,...hashKeys,...hostnameKeys].map(key=>key.name).filter(val=>typeof val=="string")),pathname=safelyCompile(pathname,indexes,!0),hash=hash?safelyCompile(hash,indexes,!0):null,hostname=hostname?safelyCompile(hostname,indexes,!0):null;for(let[key,strOrArray]of Object.entries(query))Array.isArray(strOrArray)?query[key]=strOrArray.map(str=>safelyCompile(unescapeSegments(str),indexes,!0)):query[key]=safelyCompile(unescapeSegments(strOrArray),indexes,!0);let paramKeys=Object.keys(indexes);if(!isRedirect&&!paramKeys.some(param=>!(internalParamNames&&internalParamNames.includes(param))&&destParams.has(param)))for(let param of paramKeys)!(param in query)&&param!==UN_NAMED_SEGMENT&&(query[param]=indexes[param]);return destination=(0,import_url.format)({...rest,hostname,pathname,query,hash}),destination.replace(/%24/g,"$")}function safelyCompile(value,indexes,attemptDirectCompile){if(!value)return value;if(attemptDirectCompile)try{return(0,import_path_to_regexp.compile)(value,{validate:!1})(indexes)}catch{}for(let key of Object.keys(indexes))value.includes(`:${key}`)&&(value=value.replace(new RegExp(`:${key}\\*`,"g"),`:${key}--ESCAPED_PARAM_ASTERISK`).replace(new RegExp(`:${key}\\?`,"g"),`:${key}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${key}\\+`,"g"),`:${key}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${key}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${key}`));return value=value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISK/g,"*"),(0,import_path_to_regexp.compile)(`/${value}`,{validate:!1})(indexes).slice(1)}function toSegmentDest(index){return"$"+(index+1).toString()}function toRoute(filePath){return filePath.startsWith("/")?filePath:"/"+filePath}}});var require_append=__commonJS({"../routing-utils/dist/append.js"(exports,module){"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),append_exports={};__export(append_exports,{appendRoutesToPhase:()=>appendRoutesToPhase2});module.exports=__toCommonJS(append_exports);var import_index=require_dist4();function appendRoutesToPhase2({routes:prevRoutes,newRoutes,phase}){let routes=prevRoutes?[...prevRoutes]:[];if(newRoutes===null||newRoutes.length===0)return routes;let isInPhase=!1,insertIndex=-1;if(routes.forEach((r,i)=>{(0,import_index.isHandler)(r)&&(r.handle===phase?isInPhase=!0:isInPhase&&(insertIndex=i,isInPhase=!1))}),isInPhase)routes.push(...newRoutes);else if(phase===null){let lastPhase=routes.findIndex(r=>(0,import_index.isHandler)(r)&&r.handle);lastPhase===-1?routes.push(...newRoutes):routes.splice(lastPhase,0,...newRoutes)}else insertIndex>-1?routes.splice(insertIndex,0,...newRoutes):(routes.push({handle:phase}),routes.push(...newRoutes));return routes}}});var require_merge=__commonJS({"../routing-utils/dist/merge.js"(exports,module){"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),merge_exports={};__export(merge_exports,{mergeRoutes:()=>mergeRoutes2});module.exports=__toCommonJS(merge_exports);var import_index=require_dist4();function getBuilderRoutesMapping(builds){let builderRoutes={};for(let{entrypoint,routes,use}of builds)routes&&(builderRoutes[entrypoint]||(builderRoutes[entrypoint]={}),builderRoutes[entrypoint][use]=routes);return builderRoutes}function addToHandleMap(path,routesMapping,handleMap){let br=routesMapping[path];Object.keys(br).sort().forEach(use=>{let prevHandle=null;br[use].forEach(route=>{if((0,import_index.isHandler)(route))prevHandle=route.handle;else{let routes=handleMap.get(prevHandle);routes?routes.push(route):handleMap.set(prevHandle,[route])}})})}function getCheckAndContinue(routes){let checks=[],continues=[],others=[];for(let route of routes){if((0,import_index.isHandler)(route))throw new Error(`Unexpected route found in getCheckAndContinue(): ${JSON.stringify(route)}`);route.check&&!route.override?checks.push(route):route.continue&&!route.override?continues.push(route):others.push(route)}return{checks,continues,others}}function mergeRoutes2({userRoutes,builds}){let userHandleMap=new Map,userPrevHandle=null;(userRoutes||[]).forEach(route=>{if((0,import_index.isHandler)(route))userPrevHandle=route.handle;else{let routes=userHandleMap.get(userPrevHandle);routes?routes.push(route):userHandleMap.set(userPrevHandle,[route])}});let projectHandleMap=new Map,projectMiddlewareRoutes=getBuilderRoutesMapping(builds.filter(b=>b.projectMiddleware));Object.keys(projectMiddlewareRoutes).sort().forEach(path=>addToHandleMap(path,projectMiddlewareRoutes,projectHandleMap));let builderHandleMap=new Map,builderRoutes=getBuilderRoutesMapping(builds.filter(b=>!b.projectMiddleware));Object.keys(builderRoutes).sort().forEach(path=>addToHandleMap(path,builderRoutes,builderHandleMap));let outputRoutes=[],uniqueHandleValues=new Set([null,...userHandleMap.keys(),...projectHandleMap.keys(),...builderHandleMap.keys()]);for(let handle of uniqueHandleValues){let userRoutes2=userHandleMap.get(handle)||[],projectRoutes=projectHandleMap.get(handle)||[],builderRoutes2=builderHandleMap.get(handle)||[],builderSorted=getCheckAndContinue(builderRoutes2);handle!==null&&(userRoutes2.length>0||projectRoutes.length>0||builderRoutes2.length>0)&&outputRoutes.push({handle}),outputRoutes.push(...builderSorted.continues),outputRoutes.push(...userRoutes2),outputRoutes.push(...projectRoutes),outputRoutes.push(...builderSorted.checks),outputRoutes.push(...builderSorted.others)}return outputRoutes}}});var require_service_route_ownership=__commonJS({"../routing-utils/dist/service-route-ownership.js"(exports,module){"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),service_route_ownership_exports={};__export(service_route_ownership_exports,{getOwnershipGuard:()=>getOwnershipGuard2,normalizeRoutePrefix:()=>normalizeRoutePrefix2,scopeRouteSourceToOwnership:()=>scopeRouteSourceToOwnership2});module.exports=__toCommonJS(service_route_ownership_exports);function normalizeRoutePrefix2(routePrefix){let normalized=routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`;return normalized!=="/"&&normalized.endsWith("/")&&(normalized=normalized.slice(0,-1)),normalized||"/"}function escapeForRegex(value){return value.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function toPrefixMatcher(routePrefix){return`${escapeForRegex(routePrefix)}(?:/|$)`}function isDescendantPrefix(candidate,prefix){return candidate!==prefix&&candidate.startsWith(`${prefix}/`)}function getOwnershipGuard2(ownerPrefix,allRoutePrefixes){let owner=normalizeRoutePrefix2(ownerPrefix),nonRootPrefixes=Array.from(new Set(allRoutePrefixes.map(normalizeRoutePrefix2))).filter(prefix=>prefix!=="/").sort((a,b)=>b.length-a.length);if(owner==="/")return nonRootPrefixes.map(prefix=>`(?!${toPrefixMatcher(prefix)})`).join("");let descendants=nonRootPrefixes.filter(prefix=>isDescendantPrefix(prefix,owner)),positive=`(?=${toPrefixMatcher(owner)})`,negative=descendants.map(prefix=>`(?!${toPrefixMatcher(prefix)})`).join("");return`${positive}${negative}`}function scopeRouteSourceToOwnership2(source,ownershipGuard){if(!ownershipGuard)return source;let inner=source.startsWith("^")?source.slice(1):source;return`^${ownershipGuard}(?:${inner})`}}});var require_schemas=__commonJS({"../routing-utils/dist/schemas.js"(exports,module){"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),schemas_exports={};__export(schemas_exports,{cleanUrlsSchema:()=>cleanUrlsSchema,hasSchema:()=>hasSchema,headersSchema:()=>headersSchema,redirectsSchema:()=>redirectsSchema,rewritesSchema:()=>rewritesSchema,routesSchema:()=>routesSchema,trailingSlashSchema:()=>trailingSlashSchema,transformsSchema:()=>transformsSchema});module.exports=__toCommonJS(schemas_exports);var mitigateSchema={description:"Mitigation action to take on a route",type:"object",additionalProperties:!1,required:["action"],properties:{action:{description:"The mitigation action to take",type:"string",enum:["challenge","deny"]}}},serviceNameSchema={description:"A service name identifier.",type:"string",minLength:1,maxLength:64,pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"},serviceDestinationSchema={description:"A service-targeted destination that delegates routing into a named service from `services`. Identified by the presence of `service`.",type:"object",additionalProperties:!1,required:["service"],properties:{type:{description:"Optional explicit format marker. The destination shape is identified by the `service` property, so `type` is no longer required. When present it must be `service`.",type:"string",enum:["service"]},service:serviceNameSchema,path:{description:"Routing-only path used to select a route inside the target service. It does not mutate the URL observed by user code.",type:"string",maxLength:4096}}},matchableValueSchema={description:"A value to match against. Can be a string (regex) or a condition operation object",anyOf:[{description:"A regular expression used to match thev value. Named groups can be used in the destination.",type:"string",maxLength:4096},{description:"A condition operation object",type:"object",additionalProperties:!1,minProperties:1,properties:{eq:{description:"Equal to",anyOf:[{type:"string",maxLength:4096},{type:"number"}]},neq:{description:"Not equal",type:"string",maxLength:4096},inc:{description:"In array",type:"array",items:{type:"string",maxLength:4096}},ninc:{description:"Not in array",type:"array",items:{type:"string",maxLength:4096}},pre:{description:"Starts with",type:"string",maxLength:4096},suf:{description:"Ends with",type:"string",maxLength:4096},re:{description:"Regex",type:"string",maxLength:4096},gt:{description:"Greater than",type:"number"},gte:{description:"Greater than or equal to",type:"number"},lt:{description:"Less than",type:"number"},lte:{description:"Less than or equal to",type:"number"}}}]},hasSchema={description:"An array of requirements that are needed to match",type:"array",maxItems:16,items:{anyOf:[{type:"object",additionalProperties:!1,required:["type","value"],properties:{type:{description:"The type of request element to check",type:"string",enum:["host"]},value:matchableValueSchema}},{type:"object",additionalProperties:!1,required:["type","key"],properties:{type:{description:"The type of request element to check",type:"string",enum:["header","cookie","query"]},key:{description:"The name of the element contained in the particular type",type:"string",maxLength:4096},value:matchableValueSchema}}]}},transformsSchema={description:"A list of transform rules to adjust a request path, request query parameters, or request/response headers",type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["type","op"],properties:{type:{description:"The scope of the transform to apply",type:"string",enum:["request.headers","request.query","response.headers","request.path"]},op:{description:"The operation to perform on the target",type:"string",enum:["append","set","delete"]},target:{description:"The target of the transform",type:"object",required:["key"],properties:{key:{description:"A value to match against. Can be a string or a condition operation object (without regex support)",anyOf:[{description:"A valid header name (letters, numbers, hyphens, underscores)",type:"string",maxLength:4096},{description:"A condition operation object",type:"object",additionalProperties:!1,minProperties:1,properties:{eq:{description:"Equal to",anyOf:[{type:"string",maxLength:4096},{type:"number"}]},neq:{description:"Not equal",type:"string",maxLength:4096},inc:{description:"In array",type:"array",items:{type:"string",maxLength:4096}},ninc:{description:"Not in array",type:"array",items:{type:"string",maxLength:4096}},pre:{description:"Starts with",type:"string",maxLength:4096},suf:{description:"Ends with",type:"string",maxLength:4096},gt:{description:"Greater than",type:"number"},gte:{description:"Greater than or equal to",type:"number"},lt:{description:"Less than",type:"number"},lte:{description:"Less than or equal to",type:"number"}}}]}}},args:{description:"The arguments to the operation",anyOf:[{type:"string",maxLength:4096},{type:"array",minItems:1,items:{type:"string",maxLength:4096}}]},env:{description:"An array of environment variable names that should be replaced at runtime in the args value",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}}},allOf:[{if:{properties:{op:{enum:["append","set"]}}},then:{required:["args"]}},{if:{allOf:[{properties:{type:{enum:["request.headers","response.headers"]}}},{properties:{op:{enum:["set","append"]}}}]},then:{properties:{target:{properties:{key:{if:{type:"string"},then:{pattern:"^[a-zA-Z0-9_-]+$"}}}},args:{anyOf:[{type:"string",pattern:"^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"},{type:"array",items:{type:"string",pattern:"^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"}}]}}}},{if:{required:["type"],properties:{type:{enum:["request.headers","request.query","response.headers"]}}},then:{required:["target"]}},{if:{required:["type"],properties:{type:{enum:["request.path"]}}},then:{required:["args"],not:{required:["target"]},properties:{op:{enum:["set"]},args:{description:"The runtime-visible request path. Must be an origin-form path without query or fragment.",type:"string",maxLength:2048,pattern:"^/(?!/)(?!.*[?#\\s\\x00-\\x1F\\x7F]).*$"}}}}]}},rewriteTransformsSchema={description:"A list of request path transforms using path-to-regexp parameters.",type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["type","op","args"],properties:{type:{description:"The request path to expose to the target runtime",type:"string",enum:["request.path"]},op:{description:"Replace the runtime-visible request path",type:"string",enum:["set"]},args:{description:"An origin-form request path. Route parameters use path-to-regexp syntax such as `/:path*`.",type:"string",maxLength:2048,pattern:"^/(?!/)(?!.*[?#\\s\\x00-\\x1F\\x7F]).*$"},env:{description:"An array of environment variable names that should be replaced at runtime in the args value",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}}}}},routesSchema={type:"array",description:"A list of routes objects used to rewrite paths to point towards other internal or external paths",example:[{dest:"https://docs.example.com",src:"/docs"}],items:{anyOf:[{type:"object",anyOf:[{required:["src"]},{required:["source"]}],additionalProperties:!1,properties:{src:{type:"string",maxLength:4096},source:{type:"string",maxLength:4096},dest:{type:"string",maxLength:4096},destination:{anyOf:[{type:"string",maxLength:4096},serviceDestinationSchema]},headers:{type:"object",additionalProperties:!1,minProperties:1,maxProperties:100,patternProperties:{"^.{1,256}$":{type:"string",maxLength:32768}}},methods:{type:"array",maxItems:10,items:{type:"string",maxLength:32}},caseSensitive:{type:"boolean"},important:{deprecated:!0,type:"boolean"},user:{type:"boolean"},continue:{type:"boolean"},override:{deprecated:!0,type:"boolean"},check:{type:"boolean"},isInternal:{type:"boolean"},status:{type:"integer",minimum:100,maximum:999},statusCode:{type:"integer",minimum:100,maximum:999},locale:{type:"object",additionalProperties:!1,minProperties:1,properties:{redirect:{type:"object",additionalProperties:!1,minProperties:1,maxProperties:100,patternProperties:{"^.{1,256}$":{type:"string",maxLength:4096}}},value:{type:"string",maxLength:4096},path:{type:"string",maxLength:4096},cookie:{type:"string",maxLength:4096},default:{type:"string",maxLength:4096}}},middleware:{type:"number"},middlewarePath:{type:"string"},middlewareRawSrc:{type:"array",items:{type:"string"}},has:hasSchema,missing:hasSchema,mitigate:mitigateSchema,transforms:transformsSchema,env:{description:"An array of environment variable names that should be replaced at runtime in the destination or headers",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},respectOriginCacheControl:{description:"When set to true (default), external rewrites will respect the Cache-Control header from the origin. When false, caching is disabled for this rewrite.",type:"boolean"}}},{type:"object",deprecated:!0,required:["handle"],additionalProperties:!1,properties:{handle:{type:"string",maxLength:32,enum:["error","filesystem","hit","miss","resource","rewrite"]}}}]}},rewritesSchema={type:"array",maxItems:2048,description:"A list of rewrite definitions.",items:{type:"object",additionalProperties:!1,required:["source","destination"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring).",type:"string",maxLength:4096},destination:{description:"An absolute pathname to an existing resource, an external URL, or a service-targeted destination object.",anyOf:[{type:"string",maxLength:4096},serviceDestinationSchema]},transforms:rewriteTransformsSchema,has:hasSchema,missing:hasSchema,statusCode:{description:"An optional integer to override the status code of the response.",type:"integer",minimum:100,maximum:999},env:{description:"An array of environment variable names that should be replaced at runtime in the destination",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},respectOriginCacheControl:{description:"When set to true (default), external rewrites will respect the Cache-Control header from the origin. When false, caching is disabled for this rewrite.",type:"boolean"}}}},redirectsSchema={title:"Redirects",type:"array",maxItems:2048,description:"A list of redirect definitions.",items:{type:"object",additionalProperties:!1,required:["source","destination"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring) or a full URL including domain.",type:"string",maxLength:4096},destination:{description:"A location destination defined as an absolute pathname or external URL.",type:"string",maxLength:4096},permanent:{description:"A boolean to toggle between permanent and temporary redirect. When `true`, the status code is `308`. When `false` the status code is `307`.",type:"boolean"},statusCode:{description:"An optional integer to define the status code of the redirect.",private:!0,type:"integer",minimum:100,maximum:999},has:hasSchema,missing:hasSchema,env:{description:"An array of environment variable names that should be replaced at runtime in the destination",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}}}}},headersSchema={type:"array",maxItems:2048,description:"A list of header definitions.",items:{type:"object",additionalProperties:!1,required:["source","headers"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring)",type:"string",maxLength:4096},headers:{description:"An array of key/value pairs representing each response header.",type:"array",maxItems:1024,items:{type:"object",additionalProperties:!1,required:["key","value"],properties:{key:{type:"string",maxLength:4096},value:{type:"string",maxLength:32768}}}},has:hasSchema,missing:hasSchema}}},cleanUrlsSchema={description:"When set to `true`, all HTML files and Serverless Functions will have their extension removed. When visiting a path that ends with the extension, a 308 response will redirect the client to the extensionless path.",type:"boolean"},trailingSlashSchema={description:"When `false`, visiting a path that ends with a forward slash will respond with a `308` status code and redirect to the path without the trailing slash.",type:"boolean"}}});var require_types=__commonJS({"../routing-utils/dist/types.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__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={};module.exports=__toCommonJS(types_exports)}});var require_dist4=__commonJS({"../routing-utils/dist/index.js"(exports,module){"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,{appendRoutesToPhase:()=>import_append.appendRoutesToPhase,compilePathToRegexpTemplate:()=>import_superstatic2.compilePathToRegexpTemplate,convertRewrites:()=>import_superstatic2.convertRewrites,getCleanUrls:()=>import_superstatic2.getCleanUrls,getOwnershipGuard:()=>import_service_route_ownership.getOwnershipGuard,getTransformedRoutes:()=>getTransformedRoutes,isHandler:()=>isHandler,isValidHandleValue:()=>isValidHandleValue,mergeRoutes:()=>import_merge.mergeRoutes,normalizeRoutePrefix:()=>import_service_route_ownership.normalizeRoutePrefix,normalizeRoutes:()=>normalizeRoutes,pathToRegexp:()=>import_superstatic2.pathToRegexp,scopeRouteSourceToOwnership:()=>import_service_route_ownership.scopeRouteSourceToOwnership,sourceToRegex:()=>import_superstatic2.sourceToRegex});module.exports=__toCommonJS(src_exports);var import_url=__require("url"),import_superstatic=require_superstatic(),import_append=require_append(),import_merge=require_merge(),import_service_route_ownership=require_service_route_ownership();__reExport(src_exports,require_schemas(),module.exports);var import_superstatic2=require_superstatic();__reExport(src_exports,require_types(),module.exports);var VALID_HANDLE_VALUES=["filesystem","hit","miss","rewrite","error","resource"],validHandleValues=new Set(VALID_HANDLE_VALUES);function isHandler(route){return typeof route.handle<"u"}function isValidHandleValue(handle){return validHandleValues.has(handle)}function convertRouteAliases(route,index){if(route.source!==void 0){if(route.src!==void 0)throw new Error(`Route at index ${index} cannot define both \`src\` and \`source\`. Please use only one.`);route.src=route.source,delete route.source}if(route.destination!==void 0){if(route.dest!==void 0)throw new Error(`Route at index ${index} cannot define both \`dest\` and \`destination\`. Please use only one.`);typeof route.destination=="string"?(route.dest=route.destination,delete route.destination):typeof route.destination.service=="string"&&(route.destination={...route.destination,type:"service"})}if(route.statusCode!==void 0){if(route.status!==void 0)throw new Error(`Route at index ${index} cannot define both \`status\` and \`statusCode\`. Please use only one.`);route.status=route.statusCode,delete route.statusCode}}function normalizeRoutes(inputRoutes){if(!inputRoutes||inputRoutes.length===0)return{routes:inputRoutes,error:null};let routes=[],handling=[],errors=[];inputRoutes.forEach((r,i)=>{let route={...r};if(routes.push(route),!isHandler(route))try{convertRouteAliases(route,i)}catch(err){errors.push(err.message)}let keys=Object.keys(route);if(isHandler(route)){let{handle}=route;if(keys.length!==1){let unknownProp=keys.find(prop=>prop!=="handle");errors.push(`Route at index ${i} has unknown property \`${unknownProp}\`.`)}else isValidHandleValue(handle)?handling.includes(handle)?errors.push(`Route at index ${i} is a duplicate. Please use one \`handle: ${handle}\` at most.`):handling.push(handle):errors.push(`Route at index ${i} has unknown handle value \`handle: ${handle}\`.`)}else if(route.src){route.src.startsWith("^")||(route.src=`^${route.src}`),route.src.endsWith("$")||(route.src=`${route.src}$`),route.src=route.src.replace(/\\\//g,"/");let regError=checkRegexSyntax("Route",i,route.src);regError&&errors.push(regError),route.destination&&typeof route.destination=="object"&&route.continue&&errors.push(`Route at index ${i} cannot define \`continue: true\` with a service \`destination\`. The service handoff is terminal.`);let handleValue=handling[handling.length-1];handleValue==="hit"?(route.dest&&errors.push(`Route at index ${i} cannot define \`dest\`/\`destination\` after \`handle: hit\`.`),route.status&&errors.push(`Route at index ${i} cannot define \`status\`/\`statusCode\` after \`handle: hit\`.`),route.continue||errors.push(`Route at index ${i} must define \`continue: true\` after \`handle: hit\`.`)):handleValue==="miss"&&(route.dest&&!route.check?errors.push(`Route at index ${i} must define \`check: true\` after \`handle: miss\`.`):!route.dest&&!route.continue&&errors.push(`Route at index ${i} must define \`continue: true\` after \`handle: miss\`.`))}else errors.push(`Route at index ${i} must define either \`src\` or \`source\` property.`)});let error=errors.length>0?createError("invalid_route",errors,"https://vercel.link/routes-json","Learn More"):null;return{routes,error}}function checkRegexSyntax(type,index,src){try{new RegExp(src)}catch{return`${type} at index ${index} has invalid \`${type==="Route"?"src`/`source":"source"}\` regular expression "${src}".`}return null}function checkPatternSyntax(type,index,{source,destination,has,transforms}){let sourceSegments=new Set,destinationSegments=new Set;try{sourceSegments=new Set((0,import_superstatic.sourceToRegex)(source).segments)}catch{return{message:`${type} at index ${index} has invalid \`source\` pattern "${source}".`,link:"https://vercel.link/invalid-route-source-pattern"}}let destinationString=typeof destination=="string"?destination:typeof destination?.path=="string"?destination.path:void 0;if(destinationString!==void 0){try{let{hostname,pathname,query}=(0,import_url.parse)(destinationString,!0);(0,import_superstatic.sourceToRegex)(hostname||"").segments.forEach(name=>destinationSegments.add(name)),(0,import_superstatic.sourceToRegex)(pathname||"").segments.forEach(name=>destinationSegments.add(name));for(let strOrArray of Object.values(query)){let value=Array.isArray(strOrArray)?strOrArray[0]:strOrArray;(0,import_superstatic.sourceToRegex)(value||"").segments.forEach(name=>destinationSegments.add(name))}}catch{}let hasSegments=(0,import_superstatic.collectHasSegments)(has);for(let segment of destinationSegments)if(!sourceSegments.has(segment)&&!hasSegments.includes(segment))return{message:`${type} at index ${index} has segment ":${segment}" in \`destination\` property but not in \`source\` or \`has\` property.`,link:"https://vercel.link/invalid-route-destination-segment"}}for(let transform of transforms||[])if(transform.type==="request.path")try{(0,import_superstatic.compilePathToRegexpTemplate)(source,transform.args,has,transform.env)}catch(error){return{message:`${type} at index ${index} has an invalid \`request.path\` transform: ${error instanceof Error?error.message:String(error)}`,link:"https://vercel.link/invalid-route-destination-segment"}}return null}function checkRedirect(r,index){return typeof r.permanent<"u"&&typeof r.statusCode<"u"?`Redirect at index ${index} cannot define both \`permanent\` and \`statusCode\` properties.`:null}function createError(code,allErrors,link,action){let errors=Array.isArray(allErrors)?allErrors:[allErrors],message=errors[0];return{name:"RouteApiError",code,message,link,action,errors}}function notEmpty(value){return value!=null}function getTransformedRoutes(vercelConfig){let{cleanUrls,rewrites,redirects,headers,trailingSlash}=vercelConfig,{routes:userRoutes=null}=vercelConfig,routes=null;if(typeof cleanUrls<"u"){let normalized=normalizeRoutes((0,import_superstatic.convertCleanUrls)(cleanUrls,trailingSlash));if(normalized.error)return normalized.error.code="invalid_clean_urls",{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof trailingSlash<"u"){let normalized=normalizeRoutes((0,import_superstatic.convertTrailingSlash)(trailingSlash));if(normalized.error)return normalized.error.code="invalid_trailing_slash",{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(userRoutes){let normalized=normalizeRoutes(userRoutes);if(normalized.error)return{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof redirects<"u"){let code="invalid_redirect",regexErrorMessage=redirects.map((r,i)=>checkRegexSyntax("Redirect",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError("invalid_redirect",regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=redirects.map((r,i)=>checkPatternSyntax("Redirect",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let redirectErrorMessage=redirects.map(checkRedirect).find(notEmpty);if(redirectErrorMessage)return{routes,error:createError(code,redirectErrorMessage,"https://vercel.link/redirects-json","Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertRedirects)(redirects));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof headers<"u"){let code="invalid_header",regexErrorMessage=headers.map((r,i)=>checkRegexSyntax("Header",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError(code,regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=headers.map((r,i)=>checkPatternSyntax("Header",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertHeaders)(headers));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof rewrites<"u"){let code="invalid_rewrite",regexErrorMessage=rewrites.map((r,i)=>checkRegexSyntax("Rewrite",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError(code,regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=rewrites.map((r,i)=>checkPatternSyntax("Rewrite",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertRewrites)(rewrites));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push({handle:"filesystem"}),routes.push(...normalized.routes||[])}return{routes,error:null}}}});var require_constants2=__commonJS({"../fs-detectors/dist/services/runtimes/constants.js"(exports,module){"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),constants_exports={};__export(constants_exports,{CONTAINER_ENTRYPOINT_CANDIDATES:()=>CONTAINER_ENTRYPOINT_CANDIDATES,ENTRYPOINT_EXTENSIONS:()=>ENTRYPOINT_EXTENSIONS,ROUTE_OWNING_BUILDERS:()=>ROUTE_OWNING_BUILDERS,RUNTIME_BUILDERS:()=>RUNTIME_BUILDERS,RUNTIME_MANIFESTS:()=>RUNTIME_MANIFESTS,STATIC_BUILDERS:()=>STATIC_BUILDERS});module.exports=__toCommonJS(constants_exports);var RUNTIME_BUILDERS={node:"@vercel/backends",python:"@vercel/python",go:"@vercel/go",rust:"@vercel/rust",ruby:"@vercel/ruby",container:"@vercel/container"},RUNTIME_MANIFESTS={node:["package.json"],python:["pyproject.toml","requirements.txt","Pipfile","pylock.yml","uv.lock","setup.py"],go:["go.mod"],ruby:["Gemfile"],rust:["Cargo.toml"]},ENTRYPOINT_EXTENSIONS={".ts":"node",".mts":"node",".js":"node",".mjs":"node",".cjs":"node",".py":"python",".go":"go",".rs":"rust",".rb":"ruby",".ru":"ruby"},STATIC_BUILDERS=new Set(["@vercel/static-build","@vercel/static"]),ROUTE_OWNING_BUILDERS=new Set(["@vercel/next","@vercel/backends"]),CONTAINER_ENTRYPOINT_CANDIDATES=["Dockerfile.vercel","Containerfile.vercel","Dockerfile","Containerfile"]}});var require_framework2=__commonJS({"../fs-detectors/dist/services/runtimes/framework.js"(exports,module){"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),framework_exports={};__export(framework_exports,{DETECTION_FRAMEWORKS:()=>DETECTION_FRAMEWORKS,filterFrameworksByRuntime:()=>filterFrameworksByRuntime,inferRuntimeFromFramework:()=>inferRuntimeFromFramework,isBFFFramework:()=>isBFFFramework,isFrontendFramework:()=>isFrontendFramework});module.exports=__toCommonJS(framework_exports);var import_build_utils=__require("@vercel/build-utils"),import_frameworks=require_frameworks(),import_constants=require_constants2(),DETECTION_FRAMEWORKS=import_frameworks.frameworkList.filter(framework=>!framework.experimental||framework.runtimeFramework);function inferRuntimeFromFramework(framework){if(framework){if(framework in import_constants.RUNTIME_BUILDERS)return framework;if((0,import_build_utils.isPythonFramework)(framework))return"python";if((0,import_build_utils.isBackendFramework)(framework))return"node"}}function isFrontendFramework(framework){return!!framework&&!inferRuntimeFromFramework(framework)}var BFF_FRAMEWORKS=new Set(["nextjs","nuxtjs","sveltekit","remix","solidstart"]);function isBFFFramework(framework){return!!framework&&BFF_FRAMEWORKS.has(framework)}function filterFrameworksByRuntime(frameworks,runtime){return runtime?frameworks.filter(f=>inferRuntimeFromFramework(f.slug)===runtime):[...frameworks]}}});var require_utils=__commonJS({"../fs-detectors/dist/services/utils.js"(exports,module){"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),utils_exports={};__export(utils_exports,{INTERNAL_QUEUES_PREFIX:()=>INTERNAL_QUEUES_PREFIX,INTERNAL_SERVICE_PREFIX:()=>import_build_utils.INTERNAL_SERVICE_PREFIX,assignMountPaths:()=>assignMountPaths,combineBuildCommand:()=>combineBuildCommand,getInternalServiceCronPath:()=>import_build_utils.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_build_utils.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_build_utils.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_build_utils.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_build_utils.getInternalServiceWorkerPathPrefix,hasFile:()=>hasFile,isRouteOwningBuilder:()=>isRouteOwningBuilder2,isStaticBuild:()=>isStaticBuild2,readVercelConfig:()=>readVercelConfig});module.exports=__toCommonJS(utils_exports);var import_build_utils=__require("@vercel/build-utils"),import_constants=require_constants2(),import_framework=require_framework2();async function hasFile(fs,filePath){try{return await fs.isFile(filePath)}catch{return!1}}var INTERNAL_QUEUES_PREFIX="/_svc/_queues";function isStaticBuild2(service){return import_constants.STATIC_BUILDERS.has(service.builder.use)}function isRouteOwningBuilder2(service){return import_constants.ROUTE_OWNING_BUILDERS.has(service.builder.use)}async function readVercelConfig(fs){if(await fs.hasPath("vercel.json"))try{let content=await fs.readFile("vercel.json");return{config:JSON.parse(content.toString()),error:null}}catch{return{config:null,error:{code:"INVALID_VERCEL_JSON",message:"Failed to parse vercel.json. Ensure it contains valid JSON."}}}if(await fs.hasPath("vercel.toml"))try{let{parse:tomlParse}=await import("smol-toml"),content=await fs.readFile("vercel.toml");return{config:tomlParse(content.toString()),error:null}}catch{return{config:null,error:{code:"INVALID_VERCEL_TOML",message:"Failed to parse vercel.toml. Ensure it contains valid TOML."}}}return{config:null,error:null}}function assignMountPaths(services){let warnings=[],names=Object.keys(services);if(names.length===1)return services[names[0]].mountPath="/",warnings;let frontendNames=names.filter(name=>(0,import_framework.isFrontendFramework)(services[name].framework)),rootName=null;frontendNames.length===1?rootName=frontendNames[0]:frontendNames.length>1&&(rootName=frontendNames.find(n=>n==="frontend"||n==="web")??frontendNames.sort()[0],warnings.push({code:"MULTIPLE_FRONTENDS",message:`Multiple frontend services detected (${frontendNames.join(", ")}). "${rootName}" was assigned mount path "/". Adjust manually if a different service should be the root.`}));let rootFramework=rootName?services[rootName].framework:void 0,isBFF=rootFramework?(0,import_framework.isBFFFramework)(rootFramework):!1,nonRootNames=names.filter(n=>n!==rootName),needsNamespace=isBFF||nonRootNames.length>1;for(let name of names)name===rootName?services[name].mountPath="/":services[name].mountPath=needsNamespace?`/api/${name}`:"/api";return warnings}function combineBuildCommand(buildCommand,preDeployCommand){let preDeploy=Array.isArray(preDeployCommand)?preDeployCommand.join(" && "):preDeployCommand;return preDeploy&&buildCommand?`${buildCommand} && ${preDeploy}`:preDeploy||buildCommand}}});var require_runtime=__commonJS({"../fs-detectors/dist/services/runtimes/runtime.js"(exports,module){"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),runtime_exports={};__export(runtime_exports,{getBuilderForRuntime:()=>getBuilderForRuntime,inferRuntime:()=>inferRuntime});module.exports=__toCommonJS(runtime_exports);var import_constants=require_constants2(),import_framework=require_framework2();function getBuilderForRuntime(runtime){let builder=import_constants.RUNTIME_BUILDERS[runtime];if(!builder)throw new Error(`Unknown runtime: ${runtime}`);return builder}function inferRuntime(config){if(config.runtime&&config.runtime in import_constants.RUNTIME_BUILDERS)return config.runtime;let frameworkRuntime=(0,import_framework.inferRuntimeFromFramework)(config.framework);if(frameworkRuntime)return frameworkRuntime;if(config.builder){for(let[runtime,builderName]of Object.entries(import_constants.RUNTIME_BUILDERS))if(config.builder===builderName)return runtime}if(config.entrypoint){if(config.entrypoint==="pyproject.toml"||config.entrypoint.endsWith("/pyproject.toml"))return"python";for(let[ext,runtime]of Object.entries(import_constants.ENTRYPOINT_EXTENSIONS))if(config.entrypoint.endsWith(ext))return runtime}}}});var require_entrypoint=__commonJS({"../fs-detectors/dist/services/runtimes/entrypoint.js"(exports,module){"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),entrypoint_exports={};__export(entrypoint_exports,{isDockerfileEntrypoint:()=>isDockerfileEntrypoint,parsePyModuleAttrEntrypoint:()=>parsePyModuleAttrEntrypoint,stripTrailingSlash:()=>stripTrailingSlash});module.exports=__toCommonJS(entrypoint_exports);var import_path=__require("path"),import_constants=require_constants2(),PYTHON_MODULE_ATTR_RE=/^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;function parsePyModuleAttrEntrypoint(entrypoint){let match=PYTHON_MODULE_ATTR_RE.exec(entrypoint);if(!match)return null;let[,modulePart,attrName]=match;return!modulePart||!attrName?null:{attrName,filePath:modulePart.replace(/\./g,"/")+".py"}}var CONTAINER_ENTRYPOINT_BASENAMES=new Set(import_constants.CONTAINER_ENTRYPOINT_CANDIDATES.map(name=>name.toLowerCase()));function isDockerfileEntrypoint(entrypoint){return CONTAINER_ENTRYPOINT_BASENAMES.has(import_path.posix.basename(entrypoint).toLowerCase())}function stripTrailingSlash(p){let stripped=p.replace(/\/+$/,"");return stripped===""?".":stripped}}});var require_detect_framework=__commonJS({"../fs-detectors/dist/detect-framework.js"(exports,module){"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),detect_framework_exports={};__export(detect_framework_exports,{detectFramework:()=>detectFramework2,detectFrameworkRecord:()=>detectFrameworkRecord2,detectFrameworkVersion:()=>detectFrameworkVersion2,detectFrameworks:()=>detectFrameworks2,removeSupersededFrameworks:()=>removeSupersededFrameworks});module.exports=__toCommonJS(detect_framework_exports);var import_build_utils=__require("@vercel/build-utils"),import_child_process=__require("child_process"),import_buildpack_runtimes=require_buildpack_runtimes();function shouldIncludeExperimentalFrameworks(useExperimentalFrameworks){if(typeof useExperimentalFrameworks=="boolean")return useExperimentalFrameworks;let experimentalEnv=process.env.VERCEL_USE_EXPERIMENTAL_FRAMEWORKS;return(val=>val==="1"||typeof val=="string"&&val.toLowerCase()==="true")(experimentalEnv)}function filterFrameworkList(frameworkList,useExperimentalFrameworks){return shouldIncludeExperimentalFrameworks(useExperimentalFrameworks)?frameworkList:frameworkList.filter(f=>f.experimental?(0,import_buildpack_runtimes.toBuildpackRuntime)(f.slug)!==void 0:!0)}async function matches(fs,framework){let{detectors}=framework;if(!detectors)return;let{every,some}=detectors;if(every!==void 0&&!Array.isArray(every)||some!==void 0&&!Array.isArray(some))return;let check=async({path,matchContent,matchPackage})=>{if(matchPackage&&matchContent)throw new Error(`Cannot specify "matchPackage" and "matchContent" in the same detector for "${framework.slug}"`);if(matchPackage&&path)throw new Error(`Cannot specify "matchPackage" and "path" in the same detector for "${framework.slug}" because "path" is assumed to be "package.json".`);if(!path&&!matchPackage)throw new Error(`Must specify either "path" or "matchPackage" in detector for "${framework.slug}".`);if(path||(path="package.json"),matchPackage&&(matchContent=`"(dev)?(d|D)ependencies":\\s*{[^}]*"${matchPackage}":\\s*"(.+?)"[^}]*}`),await fs.hasPath(path)!==!1){if(matchContent){if(await fs.isFile(path)===!1)return;let regex=new RegExp(matchContent,"m"),match=(await fs.readFile(path)).toString().match(regex);if(!match)return;if(matchPackage&&match[3])return{framework,detectedVersion:match[3]}}return{framework}}},result=[];if(every){let everyResult=await Promise.all(every.map(item=>check(item)));result.push(...everyResult)}if(some){let someResult;for(let item of some){let itemResult=await check(item);if(itemResult){someResult=itemResult;break}}result.push(someResult)}if(!result.every(res=>!!res))return;let detectedVersion=result.find(r=>typeof r=="object"&&r.detectedVersion)?.detectedVersion;return{framework,detectedVersion}}function removeSupersededFramework(matches2,slug){let index=matches2.findIndex(f=>f?.slug===slug),framework=matches2[index];if(framework){if(framework.supersedes)for(let slug2 of framework.supersedes)removeSupersededFramework(matches2,slug2);matches2.splice(index,1)}}function removeSupersededFrameworks(matches2){for(let match of matches2.slice())if(match?.supersedes)for(let slug of match.supersedes)removeSupersededFramework(matches2,slug)}async function detectFramework2({fs,frameworkList,useExperimentalFrameworks}){let filteredList=filterFrameworkList(frameworkList,useExperimentalFrameworks),result=await Promise.all(filteredList.map(async frameworkMatch=>await matches(fs,frameworkMatch)?frameworkMatch:null));return removeSupersededFrameworks(result),result.find(res=>res!==null)?.slug??null}async function detectFrameworks2({fs,frameworkList,useExperimentalFrameworks}){let filteredList=filterFrameworkList(frameworkList,useExperimentalFrameworks),result=await Promise.all(filteredList.map(async frameworkMatch=>await matches(fs,frameworkMatch)?frameworkMatch:null));return removeSupersededFrameworks(result),result.filter(res=>res!==null)}async function detectFrameworkRecord2({fs,frameworkList,useExperimentalFrameworks}){let filteredList=filterFrameworkList(frameworkList,useExperimentalFrameworks),result=await Promise.all(filteredList.map(async frameworkMatch=>{let matchResult=await matches(fs,frameworkMatch);return matchResult?{...frameworkMatch,detectedVersion:matchResult?.detectedVersion}:null}));return removeSupersededFrameworks(result),result.find(res=>res!==null)??null}function detectFrameworkVersion2(frameworkRecord){let firstMatchPackage=[...frameworkRecord.detectors?.every||[],...frameworkRecord.detectors?.some||[]].find(d=>d.matchPackage);if(firstMatchPackage?.matchPackage)return lookupInstalledVersion(firstMatchPackage.matchPackage)}function lookupInstalledVersion(packageName){try{let script=`require('${packageName}/package.json').version`;return(0,import_child_process.spawnSync)((0,import_build_utils.getNodeExecPath)(),["-p",script],{encoding:"utf-8"}).stdout.trim()}catch(error){console.debug(`Error looking up version of installed package "${packageName}": ${error}`)}}}});var require_resolve=__commonJS({"../fs-detectors/dist/services/resolve.js"(exports,module){"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),resolve_exports={};__export(resolve_exports,{detectFrameworkFromWorkspace:()=>detectFrameworkFromWorkspace,getServiceFs:()=>getServiceFs,inferWorkspaceFromNearestManifest:()=>inferWorkspaceFromNearestManifest,resolveAllConfiguredServices:()=>resolveAllConfiguredServices2,resolveConfiguredService:()=>resolveConfiguredService,resolveEntrypointPath:()=>resolveEntrypointPath,validateServiceConfig:()=>validateServiceConfig,validateServiceEntrypoint:()=>validateServiceEntrypoint});module.exports=__toCommonJS(resolve_exports);var import_path=__require("path"),import_build_utils=__require("@vercel/build-utils"),import_constants=require_constants2(),import_buildpack_runtimes=require_buildpack_runtimes(),import_framework=require_framework2(),import_runtime=require_runtime(),import_entrypoint=require_entrypoint(),import_utils=require_utils(),import_frameworks=require_frameworks(),import_detect_framework=require_detect_framework(),import_routing_utils=require_dist4(),import_build_utils2=__require("@vercel/build-utils"),frameworksBySlug=new Map(import_frameworks.frameworkList.map(f=>[f.slug,f])),SERVICE_NAME_REGEX=/^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$/,DNS_LABEL_RE=/^(?!-)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i,ENV_VAR_NAME_RE=/^[A-Za-z_][A-Za-z0-9_]*$/,ENTRYPOINT_REQUIRED_RUNTIMES=new Set(["node","python","go"]);function isContainerRuntime(config){return config.runtime==="container"}function normalizeContainerCommand(command){return Array.isArray(command)?command:[command]}async function getServiceFs(fs,serviceName,root){if(!root)return{fs};let normalizedRoot=(0,import_entrypoint.stripTrailingSlash)(import_path.posix.normalize(root));return await fs.hasPath(normalizedRoot)?await fs.isFile(normalizedRoot)?{fs,error:{code:"ROOT_NOT_DIRECTORY",message:`Service "${serviceName}" has root "${root}" but that path is a file, not a directory.`,serviceName}}:{fs:fs.chdir(normalizedRoot)}:{fs,error:{code:"ROOT_NOT_FOUND",message:`Service "${serviceName}" has root "${root}" but that directory does not exist.`,serviceName}}}function normalizeServiceEntrypoint(entrypoint){let normalized=import_path.posix.normalize(entrypoint);return normalized===""?".":normalized}function getEffectiveServiceTrigger(config){if(config.type==="cron")return"schedule";if(config.type==="worker")return"queue";if(config.type==="job")return config.trigger}function getEntrypointRequiredRuntime(config){return config.runtime&&config.runtime in import_constants.RUNTIME_BUILDERS?config.runtime:(0,import_framework.inferRuntimeFromFramework)(config.framework)}function validateBackendFileEntrypoint(name,config,resolvedEntrypoint,options){if(!options.requireFileEntrypointForBackendRuntimes||!resolvedEntrypoint?.isDirectory)return null;let runtime=getEntrypointRequiredRuntime(config);return!runtime||!ENTRYPOINT_REQUIRED_RUNTIMES.has(runtime)?null:{code:"INVALID_ENTRYPOINT",message:`Service "${name}" must specify a file "entrypoint" when using "${config.runtime?"runtime":"framework"}" "${config.runtime||config.framework}".`,serviceName:name}}async function resolveEntrypointPath({fs,serviceName,entrypoint}){let normalized=normalizeServiceEntrypoint(entrypoint);return await fs.hasPath(normalized)?{entrypoint:{normalized,isDirectory:!await fs.isFile(normalized)}}:{error:{code:"ENTRYPOINT_NOT_FOUND",message:`Service "${serviceName}" has entrypoint "${entrypoint}" but that path does not exist.`,serviceName}}}function toWorkspaceRelativeEntrypoint(entrypoint,workspace){let normalizedEntrypoint=import_path.posix.normalize(entrypoint);if(workspace===".")return normalizedEntrypoint;let workspacePrefix=`${workspace}/`;if(normalizedEntrypoint.startsWith(workspacePrefix))return normalizedEntrypoint.slice(workspacePrefix.length);let relativeEntrypoint=import_path.posix.relative(workspace,normalizedEntrypoint);return relativeEntrypoint===""||relativeEntrypoint.startsWith("..")?normalizedEntrypoint:relativeEntrypoint}async function inferWorkspaceFromNearestManifest({fs,entrypoint,runtime}){if(!entrypoint||!runtime)return;let manifests=import_constants.RUNTIME_MANIFESTS[runtime];if(!manifests||manifests.length===0)return;let dir=import_path.posix.dirname(import_path.posix.normalize(entrypoint))||".";dir===""&&(dir=".");let reachedRoot=!1;for(;!reachedRoot;){for(let manifest of manifests){let manifestPath=dir==="."?manifest:import_path.posix.join(dir,manifest);if(await(0,import_utils.hasFile)(fs,manifestPath))return dir}if(dir==="."||dir==="/")reachedRoot=!0;else{let parent=import_path.posix.dirname(dir);!parent||parent===dir?reachedRoot=!0:dir=parent}}}async function detectFrameworkFromWorkspace({fs,workspace,serviceName,runtime}){let serviceFs=workspace==="."?fs:fs.chdir(workspace),frameworkCandidates=(0,import_framework.filterFrameworksByRuntime)(import_frameworks.frameworkList,runtime),frameworks=await(0,import_detect_framework.detectFrameworks)({fs:serviceFs,frameworkList:frameworkCandidates});if(frameworks.length>1){let frameworkNames=frameworks.map(f=>f.name).join(", ");return{error:{code:"MULTIPLE_FRAMEWORKS_SERVICE",message:`Multiple frameworks detected in ${workspace==="."?"project root":`${workspace}/`}: ${frameworkNames}. Specify "framework" explicitly in services.`,serviceName}}}return frameworks.length===1?{framework:frameworks[0].slug??void 0}:{}}function isReservedServiceRoutePrefix(routePrefix){let normalized=(0,import_routing_utils.normalizeRoutePrefix)(routePrefix);return normalized===import_utils.INTERNAL_SERVICE_PREFIX||normalized.startsWith(`${import_utils.INTERNAL_SERVICE_PREFIX}/`)}function resolveServiceRoutingConfig(name,config){let hasLegacyRoutePrefix=typeof config.routePrefix=="string",hasLegacySubdomain=typeof config.subdomain=="string";if(config.mount===void 0)return{routing:{routePrefix:config.routePrefix,subdomain:config.subdomain,routePrefixConfigured:hasLegacyRoutePrefix}};if(hasLegacyRoutePrefix||hasLegacySubdomain)return{error:{code:"CONFLICTING_MOUNT_CONFIG",message:`Service "${name}" cannot mix "mount" with "routePrefix" or "subdomain". Use only one routing configuration style.`,serviceName:name}};if(typeof config.mount=="string")return{routing:{routePrefix:config.mount,routePrefixConfigured:!0}};if(!config.mount||typeof config.mount!="object"||Array.isArray(config.mount))return{error:{code:"INVALID_MOUNT",message:`Service "${name}" has invalid "mount" config. Use a string path such as "/api" or an object like { path: "/api", subdomain: "api" }.`,serviceName:name}};if(Object.keys(config.mount).some(key=>key!=="path"&&key!=="subdomain"))return{error:{code:"INVALID_MOUNT",message:`Service "${name}" has invalid "mount" config. Only "path" and "subdomain" are supported.`,serviceName:name}};let mountPath=config.mount.path,mountSubdomain=config.mount.subdomain;return mountPath!==void 0&&typeof mountPath!="string"||mountSubdomain!==void 0&&typeof mountSubdomain!="string"?{error:{code:"INVALID_MOUNT",message:`Service "${name}" has invalid "mount" config. "path" and "subdomain" must be strings when provided.`,serviceName:name}}:typeof mountPath!="string"&&typeof mountSubdomain!="string"?{error:{code:"INVALID_MOUNT",message:`Service "${name}" has invalid "mount" config. Specify at least one of "mount.path" or "mount.subdomain".`,serviceName:name}}:{routing:{routePrefix:mountPath,subdomain:mountSubdomain,routePrefixConfigured:typeof mountPath=="string"}}}function validateServiceConfig(name,config,options={}){if(!SERVICE_NAME_REGEX.test(name))return{code:"INVALID_SERVICE_NAME",message:`Service name "${name}" is invalid. Names must start with a letter, end with an alphanumeric character, and contain only alphanumeric characters, hyphens, and underscores.`,serviceName:name};if(!config||typeof config!="object")return{code:"INVALID_SERVICE_CONFIG",message:`Service "${name}" has an invalid configuration. Expected an object.`,serviceName:name};let serviceType=config.type||"web",effectiveTrigger=getEffectiveServiceTrigger(config),effectiveService={type:serviceType,trigger:effectiveTrigger},isJobService=serviceType==="job"||serviceType==="cron",isScheduleJobService=(0,import_build_utils.isScheduleTriggeredService)(effectiveService),isQueueJobService=serviceType==="job"&&(0,import_build_utils.isQueueTriggeredService)(effectiveService),isWorkflowService=serviceType==="job"&&effectiveTrigger==="workflow",isNonWebService=serviceType==="worker"||isJobService,serviceTypeLabel=isJobService?"Job":serviceType==="worker"?"Worker":"Web",routingResult=resolveServiceRoutingConfig(name,config);if(routingResult.error)return routingResult.error;let configuredRoutePrefix=routingResult.routing?.routePrefix,configuredSubdomain=routingResult.routing?.subdomain,hasRoutePrefix=typeof configuredRoutePrefix=="string",hasSubdomain=typeof configuredSubdomain=="string";if(hasSubdomain&&!DNS_LABEL_RE.test(configuredSubdomain))return{code:"INVALID_SUBDOMAIN",message:`Web service "${name}" has invalid subdomain "${configuredSubdomain}". Use a single DNS label such as "api".`,serviceName:name};if(serviceType==="web"&&!hasRoutePrefix&&!hasSubdomain)return{code:"MISSING_ROUTE_PREFIX",message:`Web service "${name}" must specify at least one of "mount", "routePrefix", or "subdomain".`,serviceName:name};if(serviceType==="web"&&configuredRoutePrefix&&isReservedServiceRoutePrefix(configuredRoutePrefix))return{code:"RESERVED_ROUTE_PREFIX",message:`Web service "${name}" cannot use routePrefix "${configuredRoutePrefix}". The "${import_utils.INTERNAL_SERVICE_PREFIX}" prefix is reserved for internal services routing.`,serviceName:name};if(isNonWebService&&configuredRoutePrefix)return{code:"INVALID_ROUTE_PREFIX",message:`${serviceTypeLabel} service "${name}" cannot have "routePrefix" or "mount". Only web services should specify path-based routing.`,serviceName:name};if(isNonWebService&&hasSubdomain)return{code:"INVALID_HOST_ROUTING_CONFIG",message:`${serviceTypeLabel} service "${name}" cannot have "subdomain" or "mount.subdomain". Only web services should specify subdomain routing.`,serviceName:name};if(serviceType==="job"&&effectiveTrigger===void 0)return{code:"MISSING_JOB_TRIGGER",message:`Job service "${name}" is missing required "trigger" field.`,serviceName:name};if(serviceType==="job"&&effectiveTrigger&&!import_build_utils.JOB_TRIGGERS.includes(effectiveTrigger))return{code:"INVALID_JOB_TRIGGER",message:`Job service "${name}" has invalid trigger "${effectiveTrigger}". Expected ${import_build_utils.JOB_TRIGGERS.map(t=>`"${t}"`).join(", ")}.`,serviceName:name};if(isScheduleJobService&&!config.schedule)return{code:serviceType==="cron"?"MISSING_CRON_SCHEDULE":"MISSING_JOB_SCHEDULE",message:`${serviceTypeLabel} service "${name}" is missing required "schedule" field.`,serviceName:name};if(isQueueJobService&&(!Array.isArray(config.topics)||config.topics.length===0))return{code:"MISSING_QUEUE_TOPICS",message:`${serviceTypeLabel} service "${name}" is missing required "topics" field.`,serviceName:name};if(isWorkflowService&&typeof config.entrypoint!="string")return{code:"MISSING_ENTRYPOINT",message:`Job service "${name}" with "workflow" trigger must specify "entrypoint".`,serviceName:name};if(config.root!==void 0){let normalizedRoot=import_path.posix.normalize(config.root);if(normalizedRoot.startsWith("/"))return{code:"INVALID_ROOT",message:`Service "${name}" has invalid "root" "${config.root}". Must be a relative path.`,serviceName:name};if(normalizedRoot===".."||normalizedRoot.startsWith("../"))return{code:"INVALID_ROOT",message:`Service "${name}" has invalid "root" "${config.root}". Must not escape the project root.`,serviceName:name}}if(config.env!==void 0){if(typeof config.env!="object"||Array.isArray(config.env))return{code:"INVALID_ENV_VARS",message:`Service "${name}" has invalid "env". Must be an object keyed by environment variable name.`,serviceName:name};for(let[envVarName,envVar]of Object.entries(config.env)){if(!ENV_VAR_NAME_RE.test(envVarName))return{code:"INVALID_ENV_VAR_NAME",message:`Service "${name}" has invalid env key "${envVarName}". Must match /^[A-Za-z_][A-Za-z0-9_]*$/.`,serviceName:name};if(!envVar||typeof envVar!="object"||Array.isArray(envVar))return{code:"INVALID_ENV_VAR",message:`Service "${name}" has invalid env["${envVarName}"]. Must be an object with a "type" discriminator.`,serviceName:name};let envVarType=envVar.type;if(envVarType!=="service-ref")return{code:"INVALID_ENV_VAR_TYPE",message:`Service "${name}" env["${envVarName}"] has unknown type "${envVarType}".`,serviceName:name};let refService=envVar.service;if(typeof refService!="string"||refService.length===0)return{code:"INVALID_ENV_VAR_REF",message:`Service "${name}" env["${envVarName}"] must specify "service" as a non-empty string.`,serviceName:name}}}if(config.runtime&&!(config.runtime in import_constants.RUNTIME_BUILDERS))return{code:"INVALID_RUNTIME",message:`Service "${name}" has invalid runtime "${config.runtime}".`,serviceName:name};if(config.framework&&!frameworksBySlug.has(config.framework))return{code:"INVALID_FRAMEWORK",message:`Service "${name}" has invalid framework "${config.framework}".`,serviceName:name};if(config.runtime&&config.framework){let frameworkRuntime=(0,import_framework.inferRuntimeFromFramework)(config.framework);if(frameworkRuntime&&frameworkRuntime!==config.runtime)return{code:"RUNTIME_FRAMEWORK_MISMATCH",message:`Service "${name}" has conflicting runtime/framework: runtime "${config.runtime}" is incompatible with framework "${config.framework}" (runtime "${frameworkRuntime}").`,serviceName:name}}let hasFramework=!!config.framework,hasBuilderOrRuntime=!!(config.builder||config.runtime),hasEntrypoint=!!config.entrypoint,entrypointRequiredRuntime=getEntrypointRequiredRuntime(config);if(!hasFramework&&!hasBuilderOrRuntime&&!hasEntrypoint)return{code:"MISSING_SERVICE_CONFIG",message:`Service "${name}" must specify "framework", "entrypoint", or both "builder"/"runtime" with "entrypoint".`,serviceName:name};if(options.requireFileEntrypointForBackendRuntimes&&!hasEntrypoint&&entrypointRequiredRuntime&&ENTRYPOINT_REQUIRED_RUNTIMES.has(entrypointRequiredRuntime))return{code:"MISSING_ENTRYPOINT",message:`Service "${name}" must specify "entrypoint" when using "${config.runtime?"runtime":"framework"}" "${config.runtime||config.framework}".`,serviceName:name};if(hasBuilderOrRuntime&&!hasFramework&&!hasEntrypoint){let buildpackRuntime=config.builder?void 0:(0,import_buildpack_runtimes.toBuildpackRuntime)(config.runtime);if(buildpackRuntime){let markers=import_buildpack_runtimes.BUILDPACK_PROJECT_MARKERS.get(buildpackRuntime)??[];return{code:"BUILDPACK_REQUIRES_SERVICES",message:`Service "${name}" must specify "entrypoint" when using "runtime" with "experimentalServices". Move it to "services" to build without an "entrypoint" from a ${markers.join(" or ")} at the service root.`,serviceName:name}}return{code:"MISSING_ENTRYPOINT",message:`Service "${name}" must specify "entrypoint" when using "${config.builder?"builder":"runtime"}".`,serviceName:name}}return config.command!==void 0&&!isContainerRuntime(config)?{code:"INVALID_COMMAND",message:`Service "${name}" can only specify "command" when using runtime "container".`,serviceName:name}:null}function validateServiceEntrypoint(name,config,resolvedEntrypoint){if(!resolvedEntrypoint.isDirectory&&!config.builder&&!config.runtime&&!config.framework&&!(0,import_runtime.inferRuntime)({...config,entrypoint:resolvedEntrypoint.normalized})){let supported=Object.keys(import_constants.ENTRYPOINT_EXTENSIONS).join(", ");return{code:"UNSUPPORTED_ENTRYPOINT",message:`Service "${name}" has unsupported entrypoint "${config.entrypoint}". Use a supported extension (${supported}) or specify "builder", "framework", or "runtime".`,serviceName:name}}return null}async function resolveConfiguredService(options){let{name,config,serviceFs,root,group,resolvedEntrypoint,routePrefixSource="configured"}=options,type=config.type||"web",trigger=getEffectiveServiceTrigger(config),rawEntrypoint=config.entrypoint,moduleAttrParsed=typeof rawEntrypoint=="string"?(0,import_entrypoint.parsePyModuleAttrEntrypoint)(rawEntrypoint):null,routingResult=resolveServiceRoutingConfig(name,config);if(routingResult.error)throw new Error(routingResult.error.message);let configuredRoutePrefix=routingResult.routing?.routePrefix,configuredSubdomain=routingResult.routing?.subdomain,routePrefixWasConfigured=routingResult.routing?.routePrefixConfigured??!1,containerEntrypoint=isContainerRuntime(config)&&typeof rawEntrypoint=="string"?rawEntrypoint:void 0,containerDockerfile=containerEntrypoint&&(0,import_entrypoint.isDockerfileEntrypoint)(containerEntrypoint)?import_path.posix.normalize(containerEntrypoint):void 0,containerImage=containerEntrypoint&&!containerDockerfile?containerEntrypoint:void 0,resolvedEntrypointPath=resolvedEntrypoint;if(!containerEntrypoint&&!resolvedEntrypointPath&&typeof rawEntrypoint=="string"){let entrypointToResolve=moduleAttrParsed?moduleAttrParsed.filePath:rawEntrypoint;resolvedEntrypointPath=(await resolveEntrypointPath({fs:serviceFs,serviceName:name,entrypoint:entrypointToResolve})).entrypoint}if(!containerEntrypoint&&typeof rawEntrypoint=="string"&&!resolvedEntrypointPath)throw new Error(`Failed to resolve entrypoint "${rawEntrypoint}" for service "${name}".`);let normalizedEntrypoint=resolvedEntrypointPath?.normalized,entrypointIsDirectory=!!resolvedEntrypointPath?.isDirectory,inferredRuntime=(0,import_runtime.inferRuntime)({...config,entrypoint:entrypointIsDirectory?void 0:normalizedEntrypoint}),workspace=".",resolvedEntrypointFile=entrypointIsDirectory||!normalizedEntrypoint?void 0:normalizedEntrypoint;if(entrypointIsDirectory&&normalizedEntrypoint)workspace=normalizedEntrypoint;else{let inferredWorkspace=await inferWorkspaceFromNearestManifest({fs:serviceFs,entrypoint:resolvedEntrypointFile,runtime:inferredRuntime});inferredWorkspace&&(workspace=inferredWorkspace,resolvedEntrypointFile&&(resolvedEntrypointFile=toWorkspaceRelativeEntrypoint(resolvedEntrypointFile,inferredWorkspace)))}if(root){let normalizedRoot=import_path.posix.normalize(root);normalizedRoot!=="."&&(workspace=workspace==="."?normalizedRoot:import_path.posix.join(normalizedRoot,workspace))}let topics=type==="worker"?(0,import_build_utils.getServiceQueueTopics)({type,topics:config.topics}):trigger==="queue"?config.topics:trigger==="workflow"?["__wkf_*"]:void 0,builderUse,builderSrc,frameworkDefinition=config.framework?frameworksBySlug.get(config.framework):void 0;if(config.builder)builderUse=config.builder,builderSrc=resolvedEntrypointFile||frameworkDefinition?.useRuntime?.src||"package.json";else if(config.framework){let isCronService=(0,import_build_utils.isScheduleTriggeredService)({type,trigger});(0,import_build_utils2.isNodeBackendFramework)(config.framework)&&(type==="web"||isCronService)?builderUse="@vercel/backends":builderUse=frameworkDefinition?.useRuntime?.use||"@vercel/static-build",builderSrc=resolvedEntrypointFile||frameworkDefinition?.useRuntime?.src||"package.json"}else{if(!inferredRuntime)throw new Error(`Could not infer runtime for service "${name}" and no builder or framework were provided.`);if(inferredRuntime==="node"){let isCronService=(0,import_build_utils.isScheduleTriggeredService)({type,trigger});builderUse=type==="web"||isCronService?"@vercel/backends":"@vercel/node"}else builderUse=(0,import_runtime.getBuilderForRuntime)(inferredRuntime);builderSrc=inferredRuntime==="container"&&typeof containerEntrypoint=="string"?containerEntrypoint:resolvedEntrypointFile}let normalizedSubdomain=type==="web"&&typeof configuredSubdomain=="string"?configuredSubdomain.toLowerCase():void 0,defaultRoutePrefix=type==="web"&&normalizedSubdomain?`/_/${name}`:void 0,routePrefix=type==="web"&&(configuredRoutePrefix||defaultRoutePrefix)?(configuredRoutePrefix||defaultRoutePrefix).startsWith("/")?configuredRoutePrefix||defaultRoutePrefix:`/${configuredRoutePrefix||defaultRoutePrefix}`:void 0,resolvedRoutePrefixSource=type==="web"&&typeof routePrefix=="string"?routePrefixWasConfigured?routePrefixSource:"generated":void 0;workspace==="."||(builderSrc=import_path.posix.join(workspace,builderSrc));let builderConfig={zeroConfig:!0};builderUse==="@vercel/backends"&&(builderConfig.serviceName=name),config.memory&&(builderConfig.memory=config.memory),config.maxDuration&&(builderConfig.maxDuration=config.maxDuration),config.includeFiles&&(builderConfig.includeFiles=config.includeFiles),config.excludeFiles&&(builderConfig.excludeFiles=config.excludeFiles);let runtime=import_constants.STATIC_BUILDERS.has(builderUse)?void 0:inferredRuntime;if(routePrefix){let stripped=routePrefix.startsWith("/")?routePrefix.slice(1):routePrefix;builderConfig.routePrefix=stripped||"."}return workspace&&workspace!=="."&&(builderConfig.workspace=workspace),config.framework&&(builderConfig.framework=config.framework),containerImage&&(builderConfig.handler=containerImage),config.command!==void 0&&(builderConfig.command=normalizeContainerCommand(config.command)),moduleAttrParsed&&(builderConfig.handlerFunction=moduleAttrParsed.attrName),{schema:"experimentalServices",name,type,trigger,group,workspace,entrypoint:containerImage??containerDockerfile??resolvedEntrypointFile,routePrefix,routePrefixSource:resolvedRoutePrefixSource,subdomain:normalizedSubdomain,framework:config.framework,builder:{src:builderSrc,use:builderUse,config:Object.keys(builderConfig).length>0?builderConfig:void 0},runtime,buildCommand:config.buildCommand,installCommand:config.installCommand,preDeployCommand:config.preDeployCommand,schedule:config.schedule,handlerFunction:moduleAttrParsed?.attrName,topics,env:config.env}}async function resolveAllConfiguredServices2(services,fs,routePrefixSource="configured",options={}){let resolved=[],errors=[],webServicesByRoutePrefix=new Map;for(let name of Object.keys(services)){let serviceConfig=services[name],validationError=validateServiceConfig(name,serviceConfig,options);if(validationError){errors.push(validationError);continue}let root=serviceConfig.root,serviceFsResult=await getServiceFs(fs,name,root);if(serviceFsResult.error){errors.push(serviceFsResult.error);continue}let serviceFs=serviceFsResult.fs,resolvedEntrypoint;if(typeof serviceConfig.entrypoint=="string"&&!isContainerRuntime(serviceConfig)){let entrypointToResolve=(0,import_entrypoint.parsePyModuleAttrEntrypoint)(serviceConfig.entrypoint)?.filePath??serviceConfig.entrypoint,resolvedPath=await resolveEntrypointPath({fs:serviceFs,serviceName:name,entrypoint:entrypointToResolve});if(resolvedPath.error){errors.push(resolvedPath.error);continue}resolvedEntrypoint=resolvedPath.entrypoint}if(resolvedEntrypoint){let entrypointError=validateServiceEntrypoint(name,serviceConfig,resolvedEntrypoint);if(entrypointError){errors.push(entrypointError);continue}}let explicitBackendEntrypointError=validateBackendFileEntrypoint(name,serviceConfig,resolvedEntrypoint,options);if(explicitBackendEntrypointError){errors.push(explicitBackendEntrypointError);continue}let resolvedConfig=serviceConfig;if(!serviceConfig.framework&&resolvedEntrypoint)if(resolvedEntrypoint.isDirectory){let inferredRuntime=(0,import_runtime.inferRuntime)({...serviceConfig}),workspace=resolvedEntrypoint.normalized,{framework,error}=await detectFrameworkFromWorkspace({fs:serviceFs,workspace,runtime:inferredRuntime,serviceName:name});if(error){errors.push(error);continue}if(!framework){errors.push({code:"MISSING_SERVICE_FRAMEWORK",message:`Service "${name}" uses directory entrypoint "${serviceConfig.entrypoint}" but no framework could be detected in "${workspace}". Specify "framework" explicitly or use a file entrypoint.`,serviceName:name});continue}resolvedConfig={...resolvedConfig,framework}}else{let inferredRuntime=(0,import_runtime.inferRuntime)({...serviceConfig,entrypoint:resolvedEntrypoint.normalized});if(inferredRuntime){let workspace=await inferWorkspaceFromNearestManifest({fs:serviceFs,entrypoint:resolvedEntrypoint.normalized,runtime:inferredRuntime})??import_path.posix.dirname(resolvedEntrypoint.normalized),detection=await detectFrameworkFromWorkspace({fs:serviceFs,workspace,serviceName:name,runtime:inferredRuntime});!detection.error&&detection.framework&&(resolvedConfig={...resolvedConfig,framework:detection.framework})}}let backendEntrypointError=validateBackendFileEntrypoint(name,resolvedConfig,resolvedEntrypoint,options);if(backendEntrypointError){errors.push(backendEntrypointError);continue}let service=await resolveConfiguredService({name,config:resolvedConfig,serviceFs,root,resolvedEntrypoint,routePrefixSource});if(service.type==="web"&&typeof service.routePrefix=="string"){let normalizedRoutePrefix=(0,import_routing_utils.normalizeRoutePrefix)(service.routePrefix),existingServiceName=webServicesByRoutePrefix.get(normalizedRoutePrefix);if(existingServiceName){errors.push({code:"DUPLICATE_ROUTE_PREFIX",message:`Web services "${existingServiceName}" and "${name}" cannot share routePrefix "${normalizedRoutePrefix}".`,serviceName:name});continue}webServicesByRoutePrefix.set(normalizedRoutePrefix,name)}resolved.push(service)}let servicesByName=new Map(resolved.map(s=>[s.name,s]));for(let service of resolved)service.env&&validateEnvRefs(service.env,service.name,servicesByName,errors);return{services:resolved,errors}}function validateEnvRefs(env,serviceName,servicesByName,errors){let pathPrefix=`Service "${serviceName}" env`;for(let[envVarName,envVar]of Object.entries(env)){if(envVar.type!=="service-ref")continue;let refName=envVar.service,target=servicesByName.get(refName);if(!target){errors.push({code:"UNKNOWN_SERVICE_REF",message:`${pathPrefix}["${envVarName}"] references unknown service "${refName}".`,serviceName});continue}target.type!=="web"&&errors.push({code:"INVALID_SERVICE_REF_TYPE",message:`${pathPrefix}["${envVarName}"] references service "${refName}" which is a ${target.type} service and has no URL. Only web services can be referenced.`,serviceName})}}}});var require_resolve_v2=__commonJS({"../fs-detectors/dist/services/resolve-v2.js"(exports,module){"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),resolve_v2_exports={};__export(resolve_v2_exports,{resolveAllConfiguredServicesV2:()=>resolveAllConfiguredServicesV22,resolveConfiguredServiceV2:()=>resolveConfiguredServiceV22,validateServiceConfigV2:()=>validateServiceConfigV22});module.exports=__toCommonJS(resolve_v2_exports);var import_path=__require("path"),import_build_utils=__require("@vercel/build-utils"),import_frameworks=require_frameworks(),import_constants=require_constants2(),import_framework=require_framework2(),import_runtime=require_runtime(),import_entrypoint=require_entrypoint(),import_buildpack_runtimes=require_buildpack_runtimes(),import_resolve=require_resolve(),import_utils=require_utils(),frameworksBySlug=new Map(import_frameworks.frameworkList.map(f=>[f.slug,f])),MAX_SERVICE_NAME_LENGTH=64,SERVICE_NAME_REGEX=/^[a-z]([a-z_-]*[a-z])?$/;function isValidServiceName(name){return name.length<=MAX_SERVICE_NAME_LENGTH&&SERVICE_NAME_REGEX.test(name)}function getInvalidServiceNameMessage(name){return`Service name "${name}" is invalid. Names must be 1-${MAX_SERVICE_NAME_LENGTH} characters, start and end with a lowercase letter, and contain only lowercase letters, hyphens, and underscores.`}async function detectContainerEntrypoint(serviceFs){for(let candidate of import_constants.CONTAINER_ENTRYPOINT_CANDIDATES)if(await serviceFs.hasPath(candidate))return candidate}function normalizeContainerCommand(command){if(command!==void 0)return Array.isArray(command)?command:[command]}async function resolveContainerServiceV2(name,config,normalizedRoot,serviceFs){let isRoot=normalizedRoot===".",entrypoint=config.entrypoint,dockerfile;if(typeof entrypoint=="string"){if(!(0,import_entrypoint.isDockerfileEntrypoint)(entrypoint))return{error:{code:"INVALID_SERVICE_CONFIG",message:`Container service "${name}" has invalid "entrypoint" "${entrypoint}". It must name a Dockerfile or Containerfile.`,serviceName:name}};dockerfile=import_path.posix.normalize(entrypoint)}else if(dockerfile=await detectContainerEntrypoint(serviceFs),!dockerfile)return{error:{code:"MISSING_SERVICE_CONFIG",message:`Container service "${name}" has no "entrypoint" and no ${import_constants.CONTAINER_ENTRYPOINT_CANDIDATES.join(", ")} was found in "${normalizedRoot}".`,serviceName:name}};let builderSrc=isRoot?dockerfile:import_path.posix.join(normalizedRoot,dockerfile),builderConfig={zeroConfig:!0};isRoot||(builderConfig.workspace=normalizedRoot);let command=normalizeContainerCommand(config.command);return command&&(builderConfig.command=command),{service:{schema:"experimentalServicesV2",name,root:normalizedRoot,runtime:"container",entrypoint:dockerfile,command,builder:{src:builderSrc,use:"@vercel/container",config:builderConfig},bindings:config.bindings,functions:config.functions,headers:config.headers,redirects:config.redirects,rewrites:config.rewrites,routes:config.routes,cleanUrls:config.cleanUrls,trailingSlash:config.trailingSlash}}}function validateServiceConfigV22(name,config){if(!isValidServiceName(name))return{code:"INVALID_SERVICE_NAME",message:getInvalidServiceNameMessage(name),serviceName:name};if(!config||typeof config!="object")return{code:"INVALID_SERVICE_CONFIG",message:`Service "${name}" has an invalid configuration. Expected an object.`,serviceName:name};if(typeof config.root!="string"||config.root.length===0)return{code:"MISSING_ROOT",message:`Service "${name}" must specify a "root".`,serviceName:name};let normalizedRoot=import_path.posix.normalize(config.root);if(normalizedRoot.startsWith("/"))return{code:"INVALID_ROOT",message:`Service "${name}" has invalid "root" "${config.root}". Must be a relative path.`,serviceName:name};if(normalizedRoot===".."||normalizedRoot.startsWith("../"))return{code:"INVALID_ROOT",message:`Service "${name}" has invalid "root" "${config.root}". Must not escape the project root.`,serviceName:name};if(config.runtime&&!(config.runtime in import_constants.RUNTIME_BUILDERS))return{code:"INVALID_RUNTIME",message:`Service "${name}" has invalid runtime "${config.runtime}".`,serviceName:name};if(config.framework&&!frameworksBySlug.has(config.framework))return{code:"INVALID_FRAMEWORK",message:`Service "${name}" has invalid framework "${config.framework}".`,serviceName:name};if(config.runtime&&config.framework){let frameworkRuntime=(0,import_framework.inferRuntimeFromFramework)(config.framework);if(frameworkRuntime&&frameworkRuntime!==config.runtime)return{code:"RUNTIME_FRAMEWORK_MISMATCH",message:`Service "${name}" has conflicting runtime/framework: runtime "${config.runtime}" is incompatible with framework "${config.framework}" (runtime "${frameworkRuntime}").`,serviceName:name}}return null}async function resolveConfiguredServiceV22(name,config,fs){let normalizedRoot=(0,import_entrypoint.stripTrailingSlash)(import_path.posix.normalize(config.root)),serviceFsResult=normalizedRoot==="."?{fs}:await(0,import_resolve.getServiceFs)(fs,name,normalizedRoot);if(serviceFsResult.error)return{error:serviceFsResult.error};let serviceFs=serviceFsResult.fs;if(config.runtime==="container"||typeof config.entrypoint=="string"&&(0,import_entrypoint.isDockerfileEntrypoint)(config.entrypoint))return resolveContainerServiceV2(name,config,normalizedRoot,serviceFs);let rawEntrypoint=config.entrypoint,moduleAttr=typeof rawEntrypoint=="string"?(0,import_entrypoint.parsePyModuleAttrEntrypoint)(rawEntrypoint):null,normalizedEntrypoint,entrypointIsDirectory=!1;if(typeof rawEntrypoint=="string"){let entrypointToResolve=moduleAttr?moduleAttr.filePath:rawEntrypoint,resolved=await(0,import_resolve.resolveEntrypointPath)({fs:serviceFs,serviceName:name,entrypoint:entrypointToResolve});if(resolved.error)return{error:resolved.error};normalizedEntrypoint=resolved.entrypoint?.normalized,entrypointIsDirectory=!!resolved.entrypoint?.isDirectory}let entrypointFile=entrypointIsDirectory||!normalizedEntrypoint?void 0:normalizedEntrypoint,inferredRuntime=(0,import_runtime.inferRuntime)({runtime:config.runtime,framework:config.framework,entrypoint:entrypointFile}),framework=config.framework,detectedFramework=!1;if(!framework){let workspace=entrypointIsDirectory&&normalizedEntrypoint?normalizedEntrypoint:".",detection=await(0,import_resolve.detectFrameworkFromWorkspace)({fs:serviceFs,workspace,serviceName:name,runtime:inferredRuntime});if(detection.error)return{error:detection.error};framework=detection.framework,detectedFramework=!!framework,inferredRuntime=(0,import_runtime.inferRuntime)({runtime:config.runtime,framework,entrypoint:entrypointFile})}let flaggedBuildpackRuntime=(0,import_buildpack_runtimes.toBuildpackRuntime)(inferredRuntime);if(flaggedBuildpackRuntime&&config.command!==void 0)return{error:{code:"INVALID_COMMAND",message:`Service "${name}" can only specify "command" when using runtime "container".`,serviceName:name}};let buildpackRuntime=flaggedBuildpackRuntime&&!entrypointFile&&!(0,import_framework.isFrontendFramework)(framework)&&await(0,import_buildpack_runtimes.hasBuildpackProjectMarker)(flaggedBuildpackRuntime,marker=>(0,import_utils.hasFile)(serviceFs,marker))?flaggedBuildpackRuntime:void 0;if(entrypointIsDirectory&&!framework&&!buildpackRuntime)return{error:{code:"MISSING_SERVICE_FRAMEWORK",message:`Service "${name}" uses directory entrypoint "${config.entrypoint}" but no framework could be detected. Specify "framework" explicitly or use a file entrypoint.`,serviceName:name}};let frameworkRuntime=(0,import_framework.inferRuntimeFromFramework)(framework);if(detectedFramework&&frameworkRuntime&&!entrypointFile&&!buildpackRuntime)return{error:{code:"MISSING_SERVICE_CONFIG",message:`Service "${name}" detected framework "${framework}" in "${normalizedRoot}" and must specify an "entrypoint" for runtime "${frameworkRuntime}".`,serviceName:name}};let frameworkDefinition=framework?frameworksBySlug.get(framework):void 0,builderUse,builderSrc;if(buildpackRuntime)builderUse="@vercel/container",builderSrc="<detect>";else if(framework)builderUse=(0,import_build_utils.isNodeBackendFramework)(framework)?"@vercel/backends":frameworkDefinition?.useRuntime?.use||"@vercel/static-build",builderSrc=entrypointFile||frameworkDefinition?.useRuntime?.src||"package.json";else if(!inferredRuntime)config.buildCommand?(builderUse="@vercel/static-build",builderSrc="package.json"):(builderUse="@vercel/static",builderSrc=config.outputDirectory?import_path.posix.join(config.outputDirectory,"**"):"**");else{if(!entrypointFile)return{error:{code:"MISSING_SERVICE_CONFIG",message:`Service "${name}" must specify an "entrypoint" for runtime "${inferredRuntime}".`,serviceName:name}};builderUse=inferredRuntime==="node"?"@vercel/backends":(0,import_runtime.getBuilderForRuntime)(inferredRuntime),builderSrc=entrypointFile}let isRoot=normalizedRoot===".",projectRelativeSrc=isRoot?builderSrc:import_path.posix.join(normalizedRoot,builderSrc),builderConfig={zeroConfig:!0};builderUse==="@vercel/backends"&&(builderConfig.serviceName=name),framework&&(builderConfig.framework=framework),buildpackRuntime&&(builderConfig.buildpack=buildpackRuntime),config.outputDirectory&&(builderConfig.outputDirectory=config.outputDirectory),isRoot||(builderConfig.workspace=normalizedRoot),moduleAttr&&(builderConfig.handlerFunction=moduleAttr.attrName);let runtime=import_constants.STATIC_BUILDERS.has(builderUse)?void 0:inferredRuntime;return{service:{schema:"experimentalServicesV2",name,root:normalizedRoot,framework,runtime,entrypoint:entrypointFile,builder:{src:projectRelativeSrc,use:builderUse,config:builderConfig},installCommand:config.installCommand,buildCommand:config.buildCommand,devCommand:config.devCommand,ignoreCommand:config.ignoreCommand,outputDirectory:config.outputDirectory,bindings:config.bindings,functions:config.functions,headers:config.headers,redirects:config.redirects,rewrites:config.rewrites,routes:config.routes,cleanUrls:config.cleanUrls,trailingSlash:config.trailingSlash}}}async function resolveAllConfiguredServicesV22(services,fs){let resolved=[],errors=[];for(let name of Object.keys(services)){let config=services[name],validationError=validateServiceConfigV22(name,config);if(validationError){errors.push(validationError);continue}let{service,error}=await resolveConfiguredServiceV22(name,config,fs);if(error){errors.push(error);continue}service&&resolved.push(service)}let serviceNames=new Set(Object.keys(services));for(let service of resolved)for(let binding of service.bindings??[]){if(!isValidServiceName(binding.service)){errors.push({code:"INVALID_SERVICE_BINDING_NAME",message:`Service "${service.name}" declares an invalid binding service name "${binding.service}". ${getInvalidServiceNameMessage(binding.service)}`,serviceName:service.name});continue}serviceNames.has(binding.service)||errors.push({code:"UNKNOWN_SERVICE_BINDING",message:`Service "${service.name}" declares a binding to unknown service "${binding.service}".`,serviceName:service.name})}return{services:resolved,errors}}}});var require_auto_detect=__commonJS({"../fs-detectors/dist/services/auto-detect.js"(exports,module){"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),auto_detect_exports={};__export(auto_detect_exports,{autoDetectServices:()=>autoDetectServices2});module.exports=__toCommonJS(auto_detect_exports);var import_detect_framework=require_detect_framework(),import_frameworks=require_frameworks(),import_framework=require_framework2(),import_utils=require_utils(),FRONTEND_DIR="frontend",APPS_WEB_DIR="apps/web",BACKEND_DIR="backend",SERVICES_DIR="services",FRONTEND_LOCATIONS=[FRONTEND_DIR,APPS_WEB_DIR];async function autoDetectServices2(options){let{fs,detectEntrypoint}=options,rootFrameworks=await(0,import_detect_framework.detectFrameworks)({fs,frameworkList:import_frameworks.frameworkList});if(rootFrameworks.length>1){let frameworkNames=rootFrameworks.map(f=>f.name).join(", ");return{services:null,warnings:[],errors:[{code:"MULTIPLE_FRAMEWORKS_ROOT",message:`Multiple frameworks detected at root: ${frameworkNames}. Use explicit services config.`}]}}if(rootFrameworks.length===1)return detectServicesAtRoot(fs,rootFrameworks[0],detectEntrypoint);for(let frontendLocation of FRONTEND_LOCATIONS){if(!await fs.hasPath(frontendLocation))continue;let frontendFs=fs.chdir(frontendLocation),frontendFrameworks=await(0,import_detect_framework.detectFrameworks)({fs:frontendFs,frameworkList:import_frameworks.frameworkList});if(frontendFrameworks.length>1){let frameworkNames=frontendFrameworks.map(f=>f.name).join(", ");return{services:null,warnings:[],errors:[{code:"MULTIPLE_FRAMEWORKS_SERVICE",message:`Multiple frameworks detected in ${frontendLocation}/: ${frameworkNames}. Use explicit services config.`}]}}if(frontendFrameworks.length===1)return detectServicesFrontendSubdir(fs,frontendFrameworks[0],frontendLocation,detectEntrypoint)}return{services:null,warnings:[],errors:[{code:"NO_SERVICES_CONFIGURED",message:"No services detected. Configure `services` in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."}]}}async function detectServicesAtRoot(fs,rootFramework,detectEntrypoint){let services={};services.frontend={root:".",framework:rootFramework.slug??void 0,mountPath:"/"};let backendResult=await detectBackendServices(fs,detectEntrypoint);if(backendResult.error)return{services:null,warnings:[],errors:[backendResult.error]};if(Object.keys(backendResult.services).length===0)return{services:null,warnings:[],errors:[]};Object.assign(services,backendResult.services);let mountWarnings=(0,import_utils.assignMountPaths)(services);return{services,warnings:mountWarnings,errors:[]}}async function detectServicesFrontendSubdir(fs,frontendFramework,frontendLocation,detectEntrypoint){let services={},serviceName=frontendLocation.split("/").pop()||"frontend";services[serviceName]={framework:frontendFramework.slug??void 0,root:frontendLocation,mountPath:"/"};let backendResult=await detectBackendServices(fs,detectEntrypoint);if(backendResult.error)return{services:null,warnings:[],errors:[backendResult.error]};if(Object.keys(backendResult.services).length===0)return{services:null,warnings:[],errors:[{code:"NO_BACKEND_SERVICES",message:`Frontend detected in ${frontendLocation}/ but no backend services found. Add a backend/ or services/ directory with a supported framework.`}]};Object.assign(services,backendResult.services);let mountWarnings=(0,import_utils.assignMountPaths)(services);return{services,warnings:mountWarnings,errors:[]}}async function detectBackendServices(fs,detectEntrypoint){let services={},backendResult=await detectServiceInDir(fs,BACKEND_DIR,"backend",detectEntrypoint);if(backendResult.error)return{services:{},error:backendResult.error};backendResult.service&&(services.backend=backendResult.service);let multiServicesResult=await detectServicesDirectory(fs,detectEntrypoint);if(multiServicesResult.error)return{services:{},error:multiServicesResult.error};for(let serviceName of Object.keys(multiServicesResult.services))if(services[serviceName])return{services:{},error:{code:"SERVICE_NAME_CONFLICT",message:`Service name conflict: "${serviceName}" exists in both ${BACKEND_DIR}/ and ${SERVICES_DIR}/${serviceName}/. Rename one of the directories or use explicit services config.`,serviceName}};return Object.assign(services,multiServicesResult.services),{services}}async function detectServicesDirectory(fs,detectEntrypoint){let services={};if(!await fs.hasPath(SERVICES_DIR))return{services};let entries=await fs.chdir(SERVICES_DIR).readdir("/");for(let entry of entries){if(entry.type!=="dir")continue;let serviceName=entry.name,serviceDir=`${SERVICES_DIR}/${serviceName}`,result=await detectServiceInDir(fs,serviceDir,serviceName,detectEntrypoint);if(result.error)return{services:{},error:result.error};result.service&&(services[serviceName]=result.service)}return{services}}async function detectServiceInDir(fs,dirPath,serviceName,detectEntrypoint){if(!await fs.hasPath(dirPath))return{};let serviceFs=fs.chdir(dirPath),frameworks=await(0,import_detect_framework.detectFrameworks)({fs:serviceFs,frameworkList:import_framework.DETECTION_FRAMEWORKS,useExperimentalFrameworks:!0});if(frameworks.length>1){let frameworkNames=frameworks.map(f=>f.name).join(", ");return{error:{code:"MULTIPLE_FRAMEWORKS_SERVICE",message:`Multiple frameworks detected in ${dirPath}/: ${frameworkNames}. Use explicit services config.`,serviceName}}}if(frameworks.length!==1)return{};let slug=frameworks[0].slug??void 0,mountPath=`/${serviceName}`,detected=detectEntrypoint&&!(0,import_framework.isFrontendFramework)(slug)?await detectEntrypoint({workPath:dirPath,framework:slug}):null;return{service:{framework:slug,root:dirPath,...detected?{entrypoint:detected.entrypoint}:{},mountPath}}}}});var require_detect_railway=__commonJS({"../fs-detectors/dist/services/detect-railway.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),detect_railway_exports={};__export(detect_railway_exports,{detectRailwayServices:()=>detectRailwayServices});module.exports=__toCommonJS(detect_railway_exports);var import_path=__require("path"),import_smol_toml=__toESM(__require("smol-toml")),import_detect_framework=require_detect_framework(),import_framework=require_framework2(),import_utils=require_utils(),RAILWAY_JSON="railway.json",RAILWAY_TOML="railway.toml",MAX_SCAN_DEPTH=5,SKIP_DIRS=new Set([".hg",".git",".svn",".cache",".next",".now",".vercel",".venv",".yarn",".turbo",".output","node_modules","__pycache__","venv","CVS"]);async function detectRailwayServices(options){let{fs,detectEntrypoint}=options,{configs,warnings}=await findRailwayConfigs(fs);if(configs.length===0)return{services:null,errors:[],warnings};let services={},serviceDirs=new Map,errors=[];for(let cf of configs){let serviceFs=cf.dirPath==="."?fs:fs.chdir(cf.dirPath),dirLabel=cf.dirPath==="."?"root":cf.dirPath,frameworks=await(0,import_detect_framework.detectFrameworks)({fs:serviceFs,frameworkList:import_framework.DETECTION_FRAMEWORKS,useExperimentalFrameworks:!0});if(cf.config.deploy?.cronSchedule){let schedule=cf.config.deploy.cronSchedule,runtime=frameworks.length===1?(0,import_framework.inferRuntimeFromFramework)(frameworks[0].slug):void 0,hint={type:"job",trigger:"schedule",schedule,entrypoint:"<path-to-handler>"};runtime&&(hint.runtime=runtime),warnings.push({code:"RAILWAY_CRON_HINT",message:`Found Railway cron in ${dirLabel}/ (schedule: "${schedule}"). Vercel crons work with a file entrypoint. You can add the following to define this scheduled job service:
11
- "${deriveServiceName(cf.dirPath)}": ${JSON.stringify(hint,null,2)}`});continue}let serviceName=deriveServiceName(cf.dirPath),existingDir=serviceDirs.get(serviceName);if(existingDir){errors.push({code:"DUPLICATE_SERVICE",message:`Duplicate service name "${serviceName}" derived from ${existingDir}/ and ${dirLabel}/. Rename one of the directories to avoid conflicts.`,serviceName});continue}if(serviceDirs.set(serviceName,dirLabel),frameworks.length===0){warnings.push({code:"SERVICE_SKIPPED",message:`Skipped service in ${dirLabel}/: no framework detected. Configure it manually in services.`});continue}if(frameworks.length>1){let names=frameworks.map(f=>f.name).join(", ");errors.push({code:"MULTIPLE_FRAMEWORKS_SERVICE",message:`Multiple frameworks detected in ${dirLabel}/: ${names}. Use explicit services config.`,serviceName});continue}let slug=frameworks[0].slug??void 0,serviceConfig={root:cf.dirPath,framework:slug};if(cf.dirPath!=="."&&detectEntrypoint&&!(0,import_framework.isFrontendFramework)(slug)){let detected=await detectEntrypoint({workPath:cf.dirPath,framework:slug});detected&&(serviceConfig.entrypoint=detected.entrypoint)}cf.config.build?.buildCommand&&(serviceConfig.buildCommand=cf.config.build.buildCommand);let railwayPreDeploy=cf.config.deploy?.preDeployCommand;railwayPreDeploy&&(serviceConfig.preDeployCommand=Array.isArray(railwayPreDeploy)?railwayPreDeploy.join(" && "):railwayPreDeploy),services[serviceName]=serviceConfig}return errors.length>0?{services:null,errors,warnings}:Object.keys(services).length===0?{services:null,errors:[],warnings}:(warnings.push(...(0,import_utils.assignMountPaths)(services)),{services,errors:[],warnings})}async function findRailwayConfigs(fs,dirPath=".",depth=0){let configs=[],warnings=[],readResult=await readRailwayConfigRaw(fs,dirPath);warnings.push(...readResult.warnings);let{config,warning}=tryParseRailwayConfig(readResult.raw);if(warning&&warnings.push(warning),config&&configs.push({dirPath,config}),depth>=MAX_SCAN_DEPTH)return{configs,warnings};let readPath=dirPath==="."?"/":dirPath,entries;try{entries=await fs.readdir(readPath)}catch{return{configs,warnings}}for(let entry of entries){if(entry.type!=="dir"||SKIP_DIRS.has(entry.name))continue;let childPath=dirPath==="."?entry.name:import_path.posix.join(dirPath,entry.name),child=await findRailwayConfigs(fs,childPath,depth+1);configs.push(...child.configs),warnings.push(...child.warnings)}return{configs,warnings}}async function readRailwayConfigRaw(fs,dirPath){let warnings=[];for(let filename of[RAILWAY_JSON,RAILWAY_TOML]){let filePath=dirPath==="."?filename:import_path.posix.join(dirPath,filename);try{if(!await fs.isFile(filePath))continue}catch{continue}try{let buf=await fs.readFile(filePath);return{raw:{path:filePath,content:buf.toString("utf-8")},warnings}}catch(err){warnings.push({code:"RAILWAY_CONFIG_ERROR",message:`Failed to read ${filePath}: ${err instanceof Error?err.message:String(err)}`})}}return{raw:null,warnings}}function tryParseRailwayConfig(raw){if(!raw)return{config:null};try{return{config:raw.path.endsWith(".toml")?import_smol_toml.default.parse(raw.content):JSON.parse(raw.content)}}catch(err){return{config:null,warning:{code:"RAILWAY_PARSE_ERROR",message:`Failed to parse ${raw.path}: ${err instanceof Error?err.message:String(err)}`}}}}function deriveServiceName(dirPath){if(dirPath===".")return"web";let segments=dirPath.split("/");return segments[segments.length-1]}}});var require_common=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js"(exports,module){"use strict";function isNothing(subject){return typeof subject>"u"||subject===null}function isObject(subject){return typeof subject=="object"&&subject!==null}function toArray(sequence){return Array.isArray(sequence)?sequence:isNothing(sequence)?[]:[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source)for(sourceKeys=Object.keys(source),index=0,length=sourceKeys.length;index<length;index+=1)key=sourceKeys[index],target[key]=source[key];return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1)result+=string;return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}module.exports.isNothing=isNothing;module.exports.isObject=isObject;module.exports.toArray=toArray;module.exports.repeat=repeat;module.exports.isNegativeZero=isNegativeZero;module.exports.extend=extend}});var require_exception=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js"(exports,module){"use strict";function formatError(exception,compact){var where="",message=exception.reason||"(unknown reason)";return exception.mark?(exception.mark.name&&(where+='in "'+exception.mark.name+'" '),where+="("+(exception.mark.line+1)+":"+(exception.mark.column+1)+")",!compact&&exception.mark.snippet&&(where+=`
12
-
13
- `+exception.mark.snippet),message+" "+where):message}function YAMLException(reason,mark){Error.call(this),this.name="YAMLException",this.reason=reason,this.mark=mark,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function(compact){return this.name+": "+formatError(this,compact)};module.exports=YAMLException}});var require_snippet=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js"(exports,module){"use strict";var common=require_common();function getLine(buffer,lineStart,lineEnd,position,maxLineLength){var head="",tail="",maxHalfLength=Math.floor(maxLineLength/2)-1;return position-lineStart>maxHalfLength&&(head=" ... ",lineStart=position-maxHalfLength+head.length),lineEnd-position>maxHalfLength&&(tail=" ...",lineEnd=position+maxHalfLength-tail.length),{str:head+buffer.slice(lineStart,lineEnd).replace(/\t/g,"\u2192")+tail,pos:position-lineStart+head.length}}function padStart(string,max){return common.repeat(" ",max-string.length)+string}function makeSnippet(mark,options){if(options=Object.create(options||null),!mark.buffer)return null;options.maxLength||(options.maxLength=79),typeof options.indent!="number"&&(options.indent=1),typeof options.linesBefore!="number"&&(options.linesBefore=3),typeof options.linesAfter!="number"&&(options.linesAfter=2);for(var re=/\r?\n|\r|\0/g,lineStarts=[0],lineEnds=[],match,foundLineNo=-1;match=re.exec(mark.buffer);)lineEnds.push(match.index),lineStarts.push(match.index+match[0].length),mark.position<=match.index&&foundLineNo<0&&(foundLineNo=lineStarts.length-2);foundLineNo<0&&(foundLineNo=lineStarts.length-1);var result="",i,line,lineNoLength=Math.min(mark.line+options.linesAfter,lineEnds.length).toString().length,maxLineLength=options.maxLength-(options.indent+lineNoLength+3);for(i=1;i<=options.linesBefore&&!(foundLineNo-i<0);i++)line=getLine(mark.buffer,lineStarts[foundLineNo-i],lineEnds[foundLineNo-i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo-i]),maxLineLength),result=common.repeat(" ",options.indent)+padStart((mark.line-i+1).toString(),lineNoLength)+" | "+line.str+`
14
- `+result;for(line=getLine(mark.buffer,lineStarts[foundLineNo],lineEnds[foundLineNo],mark.position,maxLineLength),result+=common.repeat(" ",options.indent)+padStart((mark.line+1).toString(),lineNoLength)+" | "+line.str+`
15
- `,result+=common.repeat("-",options.indent+lineNoLength+3+line.pos)+`^
16
- `,i=1;i<=options.linesAfter&&!(foundLineNo+i>=lineEnds.length);i++)line=getLine(mark.buffer,lineStarts[foundLineNo+i],lineEnds[foundLineNo+i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo+i]),maxLineLength),result+=common.repeat(" ",options.indent)+padStart((mark.line+i+1).toString(),lineNoLength)+" | "+line.str+`
17
- `;return result.replace(/\n$/,"")}module.exports=makeSnippet}});var require_type=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js"(exports,module){"use strict";var YAMLException=require_exception(),TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};return map!==null&&Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=style})}),result}function Type(tag,options){if(options=options||{},Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1)throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}),this.options=options,this.tag=tag,this.kind=options.kind||null,this.resolve=options.resolve||function(){return!0},this.construct=options.construct||function(data){return data},this.instanceOf=options.instanceOf||null,this.predicate=options.predicate||null,this.represent=options.represent||null,this.representName=options.representName||null,this.defaultStyle=options.defaultStyle||null,this.multi=options.multi||!1,this.styleAliases=compileStyleAliases(options.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}module.exports=Type}});var require_schema=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js"(exports,module){"use strict";var YAMLException=require_exception(),Type=require_type();function compileList(schema,name){var result=[];return schema[name].forEach(function(currentType){var newIndex=result.length;result.forEach(function(previousType,previousIndex){previousType.tag===currentType.tag&&previousType.kind===currentType.kind&&previousType.multi===currentType.multi&&(newIndex=previousIndex)}),result[newIndex]=currentType}),result}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},index,length;function collectType(type){type.multi?(result.multi[type.kind].push(type),result.multi.fallback.push(type)):result[type.kind][type.tag]=result.fallback[type.tag]=type}for(index=0,length=arguments.length;index<length;index+=1)arguments[index].forEach(collectType);return result}function Schema(definition){return this.extend(definition)}Schema.prototype.extend=function(definition){var implicit=[],explicit=[];if(definition instanceof Type)explicit.push(definition);else if(Array.isArray(definition))explicit=explicit.concat(definition);else if(definition&&(Array.isArray(definition.implicit)||Array.isArray(definition.explicit)))definition.implicit&&(implicit=implicit.concat(definition.implicit)),definition.explicit&&(explicit=explicit.concat(definition.explicit));else throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");implicit.forEach(function(type){if(!(type instanceof Type))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(type.loadKind&&type.loadKind!=="scalar")throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(type.multi)throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),explicit.forEach(function(type){if(!(type instanceof Type))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var result=Object.create(Schema.prototype);return result.implicit=(this.implicit||[]).concat(implicit),result.explicit=(this.explicit||[]).concat(explicit),result.compiledImplicit=compileList(result,"implicit"),result.compiledExplicit=compileList(result,"explicit"),result.compiledTypeMap=compileMap(result.compiledImplicit,result.compiledExplicit),result};module.exports=Schema}});var require_str=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js"(exports,module){"use strict";var Type=require_type();module.exports=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}})}});var require_seq=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js"(exports,module){"use strict";var Type=require_type();module.exports=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}})}});var require_map=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js"(exports,module){"use strict";var Type=require_type();module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}})}});var require_failsafe=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js"(exports,module){"use strict";var Schema=require_schema();module.exports=new Schema({explicit:[require_str(),require_seq(),require_map()]})}});var require_null=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js"(exports,module){"use strict";var Type=require_type();function resolveYamlNull(data){if(data===null)return!0;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})}});var require_bool=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js"(exports,module){"use strict";var Type=require_type();function resolveYamlBoolean(data){if(data===null)return!1;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})}});var require_int=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js"(exports,module){"use strict";var common=require_common(),Type=require_type();function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return!1;var max=data.length,index=0,hasDigits=!1,ch;if(!max)return!1;if(ch=data[index],(ch==="-"||ch==="+")&&(ch=data[++index]),ch==="0"){if(index+1===max)return!0;if(ch=data[++index],ch==="b"){for(index++;index<max;index++)if(ch=data[index],ch!=="_"){if(ch!=="0"&&ch!=="1")return!1;hasDigits=!0}return hasDigits&&ch!=="_"}if(ch==="x"){for(index++;index<max;index++)if(ch=data[index],ch!=="_"){if(!isHexCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits&&ch!=="_"}if(ch==="o"){for(index++;index<max;index++)if(ch=data[index],ch!=="_"){if(!isOctCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits&&ch!=="_"}}if(ch==="_")return!1;for(;index<max;index++)if(ch=data[index],ch!=="_"){if(!isDecCode(data.charCodeAt(index)))return!1;hasDigits=!0}return!(!hasDigits||ch==="_")}function constructYamlInteger(data){var value=data,sign=1,ch;if(value.indexOf("_")!==-1&&(value=value.replace(/_/g,"")),ch=value[0],(ch==="-"||ch==="+")&&(ch==="-"&&(sign=-1),value=value.slice(1),ch=value[0]),value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value.slice(2),16);if(value[1]==="o")return sign*parseInt(value.slice(2),8)}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&object%1===0&&!common.isNegativeZero(object)}module.exports=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0o"+obj.toString(8):"-0o"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}});var require_float=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js"(exports,module){"use strict";var common=require_common(),Type=require_type(),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){return!(data===null||!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_")}function constructYamlFloat(data){var value,sign;return value=data.replace(/_/g,"").toLowerCase(),sign=value[0]==="-"?-1:1,"+-".indexOf(value[0])>=0&&(value=value.slice(1)),value===".inf"?sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:value===".nan"?NaN:sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object))switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===object)switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===object)switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(object))return"-0.0";return res=object.toString(10),SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})}});var require_json=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js"(exports,module){"use strict";module.exports=require_failsafe().extend({implicit:[require_null(),require_bool(),require_int(),require_float()]})}});var require_core=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js"(exports,module){"use strict";module.exports=require_json()}});var require_timestamp=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js"(exports,module){"use strict";var Type=require_type(),YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){return data===null?!1:YAML_DATE_REGEXP.exec(data)!==null||YAML_TIMESTAMP_REGEXP.exec(data)!==null}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;if(match=YAML_DATE_REGEXP.exec(data),match===null&&(match=YAML_TIMESTAMP_REGEXP.exec(data)),match===null)throw new Error("Date resolve error");if(year=+match[1],month=+match[2]-1,day=+match[3],!match[4])return new Date(Date.UTC(year,month,day));if(hour=+match[4],minute=+match[5],second=+match[6],match[7]){for(fraction=match[7].slice(0,3);fraction.length<3;)fraction+="0";fraction=+fraction}return match[9]&&(tz_hour=+match[10],tz_minute=+(match[11]||0),delta=(tz_hour*60+tz_minute)*6e4,match[9]==="-"&&(delta=-delta)),date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction)),delta&&date.setTime(date.getTime()-delta),date}function representYamlTimestamp(object){return object.toISOString()}module.exports=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})}});var require_merge2=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js"(exports,module){"use strict";var Type=require_type();function resolveYamlMerge(data){return data==="<<"||data===null}module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})}});var require_binary=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js"(exports,module){"use strict";var Type=require_type(),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
18
- \r`;function resolveYamlBinary(data){if(data===null)return!1;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++)if(code=map.indexOf(data.charAt(idx)),!(code>64)){if(code<0)return!1;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++)idx%4===0&&idx&&(result.push(bits>>16&255),result.push(bits>>8&255),result.push(bits&255)),bits=bits<<6|map.indexOf(input.charAt(idx));return tailbits=max%4*6,tailbits===0?(result.push(bits>>16&255),result.push(bits>>8&255),result.push(bits&255)):tailbits===18?(result.push(bits>>10&255),result.push(bits>>2&255)):tailbits===12&&result.push(bits>>4&255),new Uint8Array(result)}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++)idx%3===0&&idx&&(result+=map[bits>>18&63],result+=map[bits>>12&63],result+=map[bits>>6&63],result+=map[bits&63]),bits=(bits<<8)+object[idx];return tail=max%3,tail===0?(result+=map[bits>>18&63],result+=map[bits>>12&63],result+=map[bits>>6&63],result+=map[bits&63]):tail===2?(result+=map[bits>>10&63],result+=map[bits>>4&63],result+=map[bits<<2&63],result+=map[64]):tail===1&&(result+=map[bits>>2&63],result+=map[bits<<4&63],result+=map[64],result+=map[64]),result}function isBinary(obj){return Object.prototype.toString.call(obj)==="[object Uint8Array]"}module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})}});var require_omap=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js"(exports,module){"use strict";var Type=require_type(),_hasOwnProperty=Object.prototype.hasOwnProperty,_toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return!0;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){if(pair=object[index],pairHasKey=!1,_toString.call(pair)!=="[object Object]")return!1;for(pairKey in pair)if(_hasOwnProperty.call(pair,pairKey))if(!pairHasKey)pairHasKey=!0;else return!1;if(!pairHasKey)return!1;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return!1}return!0}function constructYamlOmap(data){return data!==null?data:[]}module.exports=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})}});var require_pairs=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js"(exports,module){"use strict";var Type=require_type(),_toString=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return!0;var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1){if(pair=object[index],_toString.call(pair)!=="[object Object]"||(keys=Object.keys(pair),keys.length!==1))return!1;result[index]=[keys[0],pair[keys[0]]]}return!0}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1)pair=object[index],keys=Object.keys(pair),result[index]=[keys[0],pair[keys[0]]];return result}module.exports=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})}});var require_set=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js"(exports,module){"use strict";var Type=require_type(),_hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return!0;var key,object=data;for(key in object)if(_hasOwnProperty.call(object,key)&&object[key]!==null)return!1;return!0}function constructYamlSet(data){return data!==null?data:{}}module.exports=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})}});var require_default=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js"(exports,module){"use strict";module.exports=require_core().extend({implicit:[require_timestamp(),require_merge2()],explicit:[require_binary(),require_omap(),require_pairs(),require_set()]})}});var require_loader=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js"(exports,module){"use strict";var common=require_common(),YAMLException=require_exception(),makeSnippet=require_snippet(),DEFAULT_SCHEMA=require_default(),_hasOwnProperty=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(obj){return Object.prototype.toString.call(obj)}function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;return 48<=c&&c<=57?c-48:(lc=c|32,97<=lc&&lc<=102?lc-97+10:-1)}function escapedHexLen(c){return c===120?2:c===117?4:c===85?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return c===48?"\0":c===97?"\x07":c===98?"\b":c===116||c===9?" ":c===110?`
19
- `:c===118?"\v":c===102?"\f":c===114?"\r":c===101?"\x1B":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\x85":c===95?"\xA0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);var i;function State(input,options){this.input=input,this.filename=options.filename||null,this.schema=options.schema||DEFAULT_SCHEMA,this.onWarning=options.onWarning||null,this.legacy=options.legacy||!1,this.json=options.json||!1,this.listener=options.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=input.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(state,message){var mark={name:state.filename,buffer:state.input.slice(0,-1),position:state.position,line:state.line,column:state.position-state.lineStart};return mark.snippet=makeSnippet(mark),new YAMLException(message,mark)}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){state.onWarning&&state.onWarning.call(null,generateError(state,message))}var directiveHandlers={YAML:function(state,name,args){var match,major,minor;state.version!==null&&throwError(state,"duplication of %YAML directive"),args.length!==1&&throwError(state,"YAML directive accepts exactly one argument"),match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]),match===null&&throwError(state,"ill-formed argument of the YAML directive"),major=parseInt(match[1],10),minor=parseInt(match[2],10),major!==1&&throwError(state,"unacceptable YAML version of the document"),state.version=args[0],state.checkLineBreaks=minor<2,minor!==1&&minor!==2&&throwWarning(state,"unsupported YAML version of the document")},TAG:function(state,name,args){var handle,prefix;args.length!==2&&throwError(state,"TAG directive accepts exactly two arguments"),handle=args[0],prefix=args[1],PATTERN_TAG_HANDLE.test(handle)||throwError(state,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty.call(state.tagMap,handle)&&throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle'),PATTERN_TAG_URI.test(prefix)||throwError(state,"ill-formed tag prefix (second argument) of the TAG directive");try{prefix=decodeURIComponent(prefix)}catch{throwError(state,"tag prefix is malformed: "+prefix)}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){if(_result=state.input.slice(start,end),checkJson)for(_position=0,_length=_result.length;_position<_length;_position+=1)_character=_result.charCodeAt(_position),_character===9||32<=_character&&_character<=1114111||throwError(state,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(_result)&&throwError(state,"the stream contains non-printable characters");state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;for(common.isObject(source)||throwError(state,"cannot merge mappings; the provided source object is unacceptable"),sourceKeys=Object.keys(source),index=0,quantity=sourceKeys.length;index<quantity;index+=1)key=sourceKeys[index],_hasOwnProperty.call(destination,key)||(destination[key]=source[key],overridableKeys[key]=!0)}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startLineStart,startPos){var index,quantity;if(Array.isArray(keyNode))for(keyNode=Array.prototype.slice.call(keyNode),index=0,quantity=keyNode.length;index<quantity;index+=1)Array.isArray(keyNode[index])&&throwError(state,"nested arrays are not supported inside keys"),typeof keyNode=="object"&&_class(keyNode[index])==="[object Object]"&&(keyNode[index]="[object Object]");if(typeof keyNode=="object"&&_class(keyNode)==="[object Object]"&&(keyNode="[object Object]"),keyNode=String(keyNode),_result===null&&(_result={}),keyTag==="tag:yaml.org,2002:merge")if(Array.isArray(valueNode))for(index=0,quantity=valueNode.length;index<quantity;index+=1)mergeMappings(state,_result,valueNode[index],overridableKeys);else mergeMappings(state,_result,valueNode,overridableKeys);else!state.json&&!_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode)&&(state.line=startLine||state.line,state.lineStart=startLineStart||state.lineStart,state.position=startPos||state.position,throwError(state,"duplicated mapping key")),keyNode==="__proto__"?Object.defineProperty(_result,keyNode,{configurable:!0,enumerable:!0,writable:!0,value:valueNode}):_result[keyNode]=valueNode,delete overridableKeys[keyNode];return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position),ch===10?state.position++:ch===13?(state.position++,state.input.charCodeAt(state.position)===10&&state.position++):throwError(state,"a line break is expected"),state.line+=1,state.lineStart=state.position,state.firstTabInLine=-1}function skipSeparationSpace(state,allowComments,checkIndent){for(var lineBreaks=0,ch=state.input.charCodeAt(state.position);ch!==0;){for(;is_WHITE_SPACE(ch);)ch===9&&state.firstTabInLine===-1&&(state.firstTabInLine=state.position),ch=state.input.charCodeAt(++state.position);if(allowComments&&ch===35)do ch=state.input.charCodeAt(++state.position);while(ch!==10&&ch!==13&&ch!==0);if(is_EOL(ch))for(readLineBreak(state),ch=state.input.charCodeAt(state.position),lineBreaks++,state.lineIndent=0;ch===32;)state.lineIndent++,ch=state.input.charCodeAt(++state.position);else break}return checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent&&throwWarning(state,"deficient indentation"),lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;return ch=state.input.charCodeAt(_position),!!((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)&&(_position+=3,ch=state.input.charCodeAt(_position),ch===0||is_WS_OR_EOL(ch)))}function writeFoldedLines(state,count){count===1?state.result+=" ":count>1&&(state.result+=common.repeat(`
20
- `,count-1))}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;if(ch=state.input.charCodeAt(state.position),is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96||(ch===63||ch===45)&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)))return!1;for(state.kind="scalar",state.result="",captureStart=captureEnd=state.position,hasPendingContent=!1;ch!==0;){if(ch===58){if(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))break}else if(ch===35){if(preceding=state.input.charCodeAt(state.position-1),is_WS_OR_EOL(preceding))break}else{if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch))break;if(is_EOL(ch))if(_line=state.line,_lineStart=state.lineStart,_lineIndent=state.lineIndent,skipSeparationSpace(state,!1,-1),state.lineIndent>=nodeIndent){hasPendingContent=!0,ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd,state.line=_line,state.lineStart=_lineStart,state.lineIndent=_lineIndent;break}}hasPendingContent&&(captureSegment(state,captureStart,captureEnd,!1),writeFoldedLines(state,state.line-_line),captureStart=captureEnd=state.position,hasPendingContent=!1),is_WHITE_SPACE(ch)||(captureEnd=state.position+1),ch=state.input.charCodeAt(++state.position)}return captureSegment(state,captureStart,captureEnd,!1),state.result?!0:(state.kind=_kind,state.result=_result,!1)}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;if(ch=state.input.charCodeAt(state.position),ch!==39)return!1;for(state.kind="scalar",state.result="",state.position++,captureStart=captureEnd=state.position;(ch=state.input.charCodeAt(state.position))!==0;)if(ch===39)if(captureSegment(state,captureStart,state.position,!0),ch=state.input.charCodeAt(++state.position),ch===39)captureStart=state.position,state.position++,captureEnd=state.position;else return!0;else is_EOL(ch)?(captureSegment(state,captureStart,captureEnd,!0),writeFoldedLines(state,skipSeparationSpace(state,!1,nodeIndent)),captureStart=captureEnd=state.position):state.position===state.lineStart&&testDocumentSeparator(state)?throwError(state,"unexpected end of the document within a single quoted scalar"):(state.position++,captureEnd=state.position);throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;if(ch=state.input.charCodeAt(state.position),ch!==34)return!1;for(state.kind="scalar",state.result="",state.position++,captureStart=captureEnd=state.position;(ch=state.input.charCodeAt(state.position))!==0;){if(ch===34)return captureSegment(state,captureStart,state.position,!0),state.position++,!0;if(ch===92){if(captureSegment(state,captureStart,state.position,!0),ch=state.input.charCodeAt(++state.position),is_EOL(ch))skipSeparationSpace(state,!1,nodeIndent);else if(ch<256&&simpleEscapeCheck[ch])state.result+=simpleEscapeMap[ch],state.position++;else if((tmp=escapedHexLen(ch))>0){for(hexLength=tmp,hexResult=0;hexLength>0;hexLength--)ch=state.input.charCodeAt(++state.position),(tmp=fromHexCode(ch))>=0?hexResult=(hexResult<<4)+tmp:throwError(state,"expected hexadecimal character");state.result+=charFromCodepoint(hexResult),state.position++}else throwError(state,"unknown escape sequence");captureStart=captureEnd=state.position}else is_EOL(ch)?(captureSegment(state,captureStart,captureEnd,!0),writeFoldedLines(state,skipSeparationSpace(state,!1,nodeIndent)),captureStart=captureEnd=state.position):state.position===state.lineStart&&testDocumentSeparator(state)?throwError(state,"unexpected end of the document within a double quoted scalar"):(state.position++,captureEnd=state.position)}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=!0,_line,_lineStart,_pos,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys=Object.create(null),keyNode,keyTag,valueNode,ch;if(ch=state.input.charCodeAt(state.position),ch===91)terminator=93,isMapping=!1,_result=[];else if(ch===123)terminator=125,isMapping=!0,_result={};else return!1;for(state.anchor!==null&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(++state.position);ch!==0;){if(skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),ch===terminator)return state.position++,state.tag=_tag,state.anchor=_anchor,state.kind=isMapping?"mapping":"sequence",state.result=_result,!0;readNext?ch===44&&throwError(state,"expected the node content, but found ','"):throwError(state,"missed comma between flow collection entries"),keyTag=keyNode=valueNode=null,isPair=isExplicitPair=!1,ch===63&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)&&(isPair=isExplicitPair=!0,state.position++,skipSeparationSpace(state,!0,nodeIndent))),_line=state.line,_lineStart=state.lineStart,_pos=state.position,composeNode(state,nodeIndent,CONTEXT_FLOW_IN,!1,!0),keyTag=state.tag,keyNode=state.result,skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),(isExplicitPair||state.line===_line)&&ch===58&&(isPair=!0,ch=state.input.charCodeAt(++state.position),skipSeparationSpace(state,!0,nodeIndent),composeNode(state,nodeIndent,CONTEXT_FLOW_IN,!1,!0),valueNode=state.result),isMapping?storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos):isPair?_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos)):_result.push(keyNode),skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),ch===44?(readNext=!0,ch=state.input.charCodeAt(++state.position)):readNext=!1}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=!1,detectedIndent=!1,textIndent=nodeIndent,emptyLines=0,atMoreIndented=!1,tmp,ch;if(ch=state.input.charCodeAt(state.position),ch===124)folding=!1;else if(ch===62)folding=!0;else return!1;for(state.kind="scalar",state.result="";ch!==0;)if(ch=state.input.charCodeAt(++state.position),ch===43||ch===45)CHOMPING_CLIP===chomping?chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(state,"repeat of a chomping mode identifier");else if((tmp=fromDecimalCode(ch))>=0)tmp===0?throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one"):detectedIndent?throwError(state,"repeat of an indentation width identifier"):(textIndent=nodeIndent+tmp-1,detectedIndent=!0);else break;if(is_WHITE_SPACE(ch)){do ch=state.input.charCodeAt(++state.position);while(is_WHITE_SPACE(ch));if(ch===35)do ch=state.input.charCodeAt(++state.position);while(!is_EOL(ch)&&ch!==0)}for(;ch!==0;){for(readLineBreak(state),state.lineIndent=0,ch=state.input.charCodeAt(state.position);(!detectedIndent||state.lineIndent<textIndent)&&ch===32;)state.lineIndent++,ch=state.input.charCodeAt(++state.position);if(!detectedIndent&&state.lineIndent>textIndent&&(textIndent=state.lineIndent),is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){chomping===CHOMPING_KEEP?state.result+=common.repeat(`
21
- `,didReadContent?1+emptyLines:emptyLines):chomping===CHOMPING_CLIP&&didReadContent&&(state.result+=`
22
- `);break}for(folding?is_WHITE_SPACE(ch)?(atMoreIndented=!0,state.result+=common.repeat(`
23
- `,didReadContent?1+emptyLines:emptyLines)):atMoreIndented?(atMoreIndented=!1,state.result+=common.repeat(`
24
- `,emptyLines+1)):emptyLines===0?didReadContent&&(state.result+=" "):state.result+=common.repeat(`
25
- `,emptyLines):state.result+=common.repeat(`
26
- `,didReadContent?1+emptyLines:emptyLines),didReadContent=!0,detectedIndent=!0,emptyLines=0,captureStart=state.position;!is_EOL(ch)&&ch!==0;)ch=state.input.charCodeAt(++state.position);captureSegment(state,captureStart,state.position,!1)}return!0}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=!1,ch;if(state.firstTabInLine!==-1)return!1;for(state.anchor!==null&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(state.position);ch!==0&&(state.firstTabInLine!==-1&&(state.position=state.firstTabInLine,throwError(state,"tab characters must not be used in indentation")),!(ch!==45||(following=state.input.charCodeAt(state.position+1),!is_WS_OR_EOL(following))));){if(detected=!0,state.position++,skipSeparationSpace(state,!0,-1)&&state.lineIndent<=nodeIndent){_result.push(null),ch=state.input.charCodeAt(state.position);continue}if(_line=state.line,composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,!1,!0),_result.push(state.result),skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position),(state.line===_line||state.lineIndent>nodeIndent)&&ch!==0)throwError(state,"bad indentation of a sequence entry");else if(state.lineIndent<nodeIndent)break}return detected?(state.tag=_tag,state.anchor=_anchor,state.kind="sequence",state.result=_result,!0):!1}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_keyLine,_keyLineStart,_keyPos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys=Object.create(null),keyTag=null,keyNode=null,valueNode=null,atExplicitKey=!1,detected=!1,ch;if(state.firstTabInLine!==-1)return!1;for(state.anchor!==null&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(state.position);ch!==0;){if(!atExplicitKey&&state.firstTabInLine!==-1&&(state.position=state.firstTabInLine,throwError(state,"tab characters must not be used in indentation")),following=state.input.charCodeAt(state.position+1),_line=state.line,(ch===63||ch===58)&&is_WS_OR_EOL(following))ch===63?(atExplicitKey&&(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!0,allowCompact=!0):atExplicitKey?(atExplicitKey=!1,allowCompact=!0):throwError(state,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),state.position+=1,ch=following;else{if(_keyLine=state.line,_keyLineStart=state.lineStart,_keyPos=state.position,!composeNode(state,flowIndent,CONTEXT_FLOW_OUT,!1,!0))break;if(state.line===_line){for(ch=state.input.charCodeAt(state.position);is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(ch===58)ch=state.input.charCodeAt(++state.position),is_WS_OR_EOL(ch)||throwError(state,"a whitespace character is expected after the key-value separator within a block mapping"),atExplicitKey&&(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!1,allowCompact=!1,keyTag=state.tag,keyNode=state.result;else if(detected)throwError(state,"can not read an implicit mapping pair; a colon is missed");else return state.tag=_tag,state.anchor=_anchor,!0}else if(detected)throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key");else return state.tag=_tag,state.anchor=_anchor,!0}if((state.line===_line||state.lineIndent>nodeIndent)&&(atExplicitKey&&(_keyLine=state.line,_keyLineStart=state.lineStart,_keyPos=state.position),composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,!0,allowCompact)&&(atExplicitKey?keyNode=state.result:valueNode=state.result),atExplicitKey||(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position)),(state.line===_line||state.lineIndent>nodeIndent)&&ch!==0)throwError(state,"bad indentation of a mapping entry");else if(state.lineIndent<nodeIndent)break}return atExplicitKey&&storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),detected&&(state.tag=_tag,state.anchor=_anchor,state.kind="mapping",state.result=_result),detected}function readTagProperty(state){var _position,isVerbatim=!1,isNamed=!1,tagHandle,tagName,ch;if(ch=state.input.charCodeAt(state.position),ch!==33)return!1;if(state.tag!==null&&throwError(state,"duplication of a tag property"),ch=state.input.charCodeAt(++state.position),ch===60?(isVerbatim=!0,ch=state.input.charCodeAt(++state.position)):ch===33?(isNamed=!0,tagHandle="!!",ch=state.input.charCodeAt(++state.position)):tagHandle="!",_position=state.position,isVerbatim){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&ch!==62);state.position<state.length?(tagName=state.input.slice(_position,state.position),ch=state.input.charCodeAt(++state.position)):throwError(state,"unexpected end of the stream within a verbatim tag")}else{for(;ch!==0&&!is_WS_OR_EOL(ch);)ch===33&&(isNamed?throwError(state,"tag suffix cannot contain exclamation marks"):(tagHandle=state.input.slice(_position-1,state.position+1),PATTERN_TAG_HANDLE.test(tagHandle)||throwError(state,"named tag handle cannot contain such characters"),isNamed=!0,_position=state.position+1)),ch=state.input.charCodeAt(++state.position);tagName=state.input.slice(_position,state.position),PATTERN_FLOW_INDICATORS.test(tagName)&&throwError(state,"tag suffix cannot contain flow indicator characters")}tagName&&!PATTERN_TAG_URI.test(tagName)&&throwError(state,"tag name cannot contain such characters: "+tagName);try{tagName=decodeURIComponent(tagName)}catch{throwError(state,"tag name is malformed: "+tagName)}return isVerbatim?state.tag=tagName:_hasOwnProperty.call(state.tagMap,tagHandle)?state.tag=state.tagMap[tagHandle]+tagName:tagHandle==="!"?state.tag="!"+tagName:tagHandle==="!!"?state.tag="tag:yaml.org,2002:"+tagName:throwError(state,'undeclared tag handle "'+tagHandle+'"'),!0}function readAnchorProperty(state){var _position,ch;if(ch=state.input.charCodeAt(state.position),ch!==38)return!1;for(state.anchor!==null&&throwError(state,"duplication of an anchor property"),ch=state.input.charCodeAt(++state.position),_position=state.position;ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state.input.charCodeAt(++state.position);return state.position===_position&&throwError(state,"name of an anchor node must contain at least one character"),state.anchor=state.input.slice(_position,state.position),!0}function readAlias(state){var _position,alias,ch;if(ch=state.input.charCodeAt(state.position),ch!==42)return!1;for(ch=state.input.charCodeAt(++state.position),_position=state.position;ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state.input.charCodeAt(++state.position);return state.position===_position&&throwError(state,"name of an alias node must contain at least one character"),alias=state.input.slice(_position,state.position),_hasOwnProperty.call(state.anchorMap,alias)||throwError(state,'unidentified alias "'+alias+'"'),state.result=state.anchorMap[alias],skipSeparationSpace(state,!0,-1),!0}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=!1,hasContent=!1,typeIndex,typeQuantity,typeList,type,flowIndent,blockIndent;if(state.listener!==null&&state.listener("open",state),state.tag=null,state.anchor=null,state.kind=null,state.result=null,allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext,allowToSeek&&skipSeparationSpace(state,!0,-1)&&(atNewLine=!0,state.lineIndent>parentIndent?indentStatus=1:state.lineIndent===parentIndent?indentStatus=0:state.lineIndent<parentIndent&&(indentStatus=-1)),indentStatus===1)for(;readTagProperty(state)||readAnchorProperty(state);)skipSeparationSpace(state,!0,-1)?(atNewLine=!0,allowBlockCollections=allowBlockStyles,state.lineIndent>parentIndent?indentStatus=1:state.lineIndent===parentIndent?indentStatus=0:state.lineIndent<parentIndent&&(indentStatus=-1)):allowBlockCollections=!1;if(allowBlockCollections&&(allowBlockCollections=atNewLine||allowCompact),(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext)&&(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext?flowIndent=parentIndent:flowIndent=parentIndent+1,blockIndent=state.position-state.lineStart,indentStatus===1?allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)?hasContent=!0:(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)?hasContent=!0:readAlias(state)?(hasContent=!0,(state.tag!==null||state.anchor!==null)&&throwError(state,"alias node should not have any properties")):readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)&&(hasContent=!0,state.tag===null&&(state.tag="?")),state.anchor!==null&&(state.anchorMap[state.anchor]=state.result)):indentStatus===0&&(hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent))),state.tag===null)state.anchor!==null&&(state.anchorMap[state.anchor]=state.result);else if(state.tag==="?"){for(state.result!==null&&state.kind!=="scalar"&&throwError(state,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+state.kind+'"'),typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1)if(type=state.implicitTypes[typeIndex],type.resolve(state.result)){state.result=type.construct(state.result),state.tag=type.tag,state.anchor!==null&&(state.anchorMap[state.anchor]=state.result);break}}else if(state.tag!=="!"){if(_hasOwnProperty.call(state.typeMap[state.kind||"fallback"],state.tag))type=state.typeMap[state.kind||"fallback"][state.tag];else for(type=null,typeList=state.typeMap.multi[state.kind||"fallback"],typeIndex=0,typeQuantity=typeList.length;typeIndex<typeQuantity;typeIndex+=1)if(state.tag.slice(0,typeList[typeIndex].tag.length)===typeList[typeIndex].tag){type=typeList[typeIndex];break}type||throwError(state,"unknown tag !<"+state.tag+">"),state.result!==null&&type.kind!==state.kind&&throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type.kind+'", not "'+state.kind+'"'),type.resolve(state.result,state.tag)?(state.result=type.construct(state.result,state.tag),state.anchor!==null&&(state.anchorMap[state.anchor]=state.result)):throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}return state.listener!==null&&state.listener("close",state),state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=!1,ch;for(state.version=null,state.checkLineBreaks=state.legacy,state.tagMap=Object.create(null),state.anchorMap=Object.create(null);(ch=state.input.charCodeAt(state.position))!==0&&(skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position),!(state.lineIndent>0||ch!==37));){for(hasDirectives=!0,ch=state.input.charCodeAt(++state.position),_position=state.position;ch!==0&&!is_WS_OR_EOL(ch);)ch=state.input.charCodeAt(++state.position);for(directiveName=state.input.slice(_position,state.position),directiveArgs=[],directiveName.length<1&&throwError(state,"directive name must not be less than one character in length");ch!==0;){for(;is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(ch===35){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;for(_position=state.position;ch!==0&&!is_WS_OR_EOL(ch);)ch=state.input.charCodeAt(++state.position);directiveArgs.push(state.input.slice(_position,state.position))}ch!==0&&readLineBreak(state),_hasOwnProperty.call(directiveHandlers,directiveName)?directiveHandlers[directiveName](state,directiveName,directiveArgs):throwWarning(state,'unknown document directive "'+directiveName+'"')}if(skipSeparationSpace(state,!0,-1),state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45?(state.position+=3,skipSeparationSpace(state,!0,-1)):hasDirectives&&throwError(state,"directives end mark is expected"),composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(state,!0,-1),state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))&&throwWarning(state,"non-ASCII line breaks are interpreted as content"),state.documents.push(state.result),state.position===state.lineStart&&testDocumentSeparator(state)){state.input.charCodeAt(state.position)===46&&(state.position+=3,skipSeparationSpace(state,!0,-1));return}if(state.position<state.length-1)throwError(state,"end of the stream or a document separator is expected");else return}function loadDocuments(input,options){input=String(input),options=options||{},input.length!==0&&(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13&&(input+=`
27
- `),input.charCodeAt(0)===65279&&(input=input.slice(1)));var state=new State(input,options),nullpos=input.indexOf("\0");for(nullpos!==-1&&(state.position=nullpos,throwError(state,"null byte is not allowed in input")),state.input+="\0";state.input.charCodeAt(state.position)===32;)state.lineIndent+=1,state.position+=1;for(;state.position<state.length-1;)readDocument(state);return state.documents}function loadAll(input,iterator,options){iterator!==null&&typeof iterator=="object"&&typeof options>"u"&&(options=iterator,iterator=null);var documents=loadDocuments(input,options);if(typeof iterator!="function")return documents;for(var index=0,length=documents.length;index<length;index+=1)iterator(documents[index])}function load(input,options){var documents=loadDocuments(input,options);if(documents.length!==0){if(documents.length===1)return documents[0];throw new YAMLException("expected a single document in the stream, but found more")}}module.exports.loadAll=loadAll;module.exports.load=load}});var require_dumper=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js"(exports,module){"use strict";var common=require_common(),YAMLException=require_exception(),DEFAULT_SCHEMA=require_default(),_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};for(result={},keys=Object.keys(map),index=0,length=keys.length;index<length;index+=1)tag=keys[index],style=String(map[tag]),tag.slice(0,2)==="!!"&&(tag="tag:yaml.org,2002:"+tag.slice(2)),type=schema.compiledTypeMap.fallback[tag],type&&_hasOwnProperty.call(type.styleAliases,style)&&(style=type.styleAliases[style]),result[tag]=style;return result}function encodeHex(character){var string,handle,length;if(string=character.toString(16).toUpperCase(),character<=255)handle="x",length=2;else if(character<=65535)handle="u",length=4;else if(character<=4294967295)handle="U",length=8;else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+handle+common.repeat("0",length-string.length)+string}var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(options){this.schema=options.schema||DEFAULT_SCHEMA,this.indent=Math.max(1,options.indent||2),this.noArrayIndent=options.noArrayIndent||!1,this.skipInvalid=options.skipInvalid||!1,this.flowLevel=common.isNothing(options.flowLevel)?-1:options.flowLevel,this.styleMap=compileStyleMap(this.schema,options.styles||null),this.sortKeys=options.sortKeys||!1,this.lineWidth=options.lineWidth||80,this.noRefs=options.noRefs||!1,this.noCompatMode=options.noCompatMode||!1,this.condenseFlow=options.condenseFlow||!1,this.quotingType=options.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=options.forceQuotes||!1,this.replacer=typeof options.replacer=="function"?options.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(string,spaces){for(var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;position<length;)next=string.indexOf(`
28
- `,position),next===-1?(line=string.slice(position),position=length):(line=string.slice(position,next+1),position=next+1),line.length&&line!==`
29
- `&&(result+=ind),result+=line;return result}function generateNextLine(state,level){return`
30
- `+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1)if(type=state.implicitTypes[index],type.resolve(str))return!0;return!1}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==CHAR_BOM||65536<=c&&c<=1114111}function isNsCharOrWhitespace(c){return isPrintable(c)&&c!==CHAR_BOM&&c!==CHAR_CARRIAGE_RETURN&&c!==CHAR_LINE_FEED}function isPlainSafe(c,prev,inblock){var cIsNsCharOrWhitespace=isNsCharOrWhitespace(c),cIsNsChar=cIsNsCharOrWhitespace&&!isWhitespace(c);return(inblock?cIsNsCharOrWhitespace:cIsNsCharOrWhitespace&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET)&&c!==CHAR_SHARP&&!(prev===CHAR_COLON&&!cIsNsChar)||isNsCharOrWhitespace(prev)&&!isWhitespace(prev)&&c===CHAR_SHARP||prev===CHAR_COLON&&cIsNsChar}function isPlainSafeFirst(c){return isPrintable(c)&&c!==CHAR_BOM&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_EQUALS&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}function isPlainSafeLast(c){return!isWhitespace(c)&&c!==CHAR_COLON}function codePointAt(string,pos){var first=string.charCodeAt(pos),second;return first>=55296&&first<=56319&&pos+1<string.length&&(second=string.charCodeAt(pos+1),second>=56320&&second<=57343)?(first-55296)*1024+second-56320+65536:first}function needIndentIndicator(string){var leadingSpaceRe=/^\n* /;return leadingSpaceRe.test(string)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType,quotingType,forceQuotes,inblock){var i,char=0,prevChar=null,hasLineBreak=!1,hasFoldableLine=!1,shouldTrackWidth=lineWidth!==-1,previousLineBreak=-1,plain=isPlainSafeFirst(codePointAt(string,0))&&isPlainSafeLast(codePointAt(string,string.length-1));if(singleLineOnly||forceQuotes)for(i=0;i<string.length;char>=65536?i+=2:i++){if(char=codePointAt(string,i),!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char,prevChar,inblock),prevChar=char}else{for(i=0;i<string.length;char>=65536?i+=2:i++){if(char=codePointAt(string,i),char===CHAR_LINE_FEED)hasLineBreak=!0,shouldTrackWidth&&(hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ",previousLineBreak=i);else if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char,prevChar,inblock),prevChar=char}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" "}return!hasLineBreak&&!hasFoldableLine?plain&&!forceQuotes&&!testAmbiguousType(string)?STYLE_PLAIN:quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:indentPerLevel>9&&needIndentIndicator(string)?STYLE_DOUBLE:forceQuotes?quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey,inblock){state.dump=function(){if(string.length===0)return state.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!state.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1||DEPRECATED_BASE60_SYNTAX.test(string)))return state.quotingType===QUOTING_TYPE_DOUBLE?'"'+string+'"':"'"+string+"'";var indent=state.indent*Math.max(1,level),lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent),singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string2){return testImplicitResolving(state,string2)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity,state.quotingType,state.forceQuotes&&!iskey,inblock)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"",clip=string[string.length-1]===`
31
- `,keep=clip&&(string[string.length-2]===`
32
- `||string===`
33
- `),chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+`
34
- `}function dropEndingNewline(string){return string[string.length-1]===`
35
- `?string.slice(0,-1):string}function foldString(string,width){for(var lineRe=/(\n+)([^\n]*)/g,result=function(){var nextLF=string.indexOf(`
36
- `);return nextLF=nextLF!==-1?nextLF:string.length,lineRe.lastIndex=nextLF,foldLine(string.slice(0,nextLF),width)}(),prevMoreIndented=string[0]===`
37
- `||string[0]===" ",moreIndented,match;match=lineRe.exec(string);){var prefix=match[1],line=match[2];moreIndented=line[0]===" ",result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?`
38
- `:"")+foldLine(line,width),prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;for(var breakRe=/ [^ ]/g,match,start=0,end,curr=0,next=0,result="";match=breakRe.exec(line);)next=match.index,next-start>width&&(end=curr>start?curr:next,result+=`
39
- `+line.slice(start,end),start=end+1),curr=next;return result+=`
40
- `,line.length-start>width&&curr>start?result+=line.slice(start,curr)+`
41
- `+line.slice(curr+1):result+=line.slice(start),result.slice(1)}function escapeString(string){for(var result="",char=0,escapeSeq,i=0;i<string.length;char>=65536?i+=2:i++)char=codePointAt(string,i),escapeSeq=ESCAPE_SEQUENCES[char],!escapeSeq&&isPrintable(char)?(result+=string[i],char>=65536&&(result+=string[i+1])):result+=escapeSeq||encodeHex(char);return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1)value=object[index],state.replacer&&(value=state.replacer.call(object,String(index),value)),(writeNode(state,level,value,!1,!1)||typeof value>"u"&&writeNode(state,level,null,!1,!1))&&(_result!==""&&(_result+=","+(state.condenseFlow?"":" ")),_result+=state.dump);state.tag=_tag,state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1)value=object[index],state.replacer&&(value=state.replacer.call(object,String(index),value)),(writeNode(state,level+1,value,!0,!0,!1,!0)||typeof value>"u"&&writeNode(state,level+1,null,!0,!0,!1,!0))&&((!compact||_result!=="")&&(_result+=generateNextLine(state,level)),state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?_result+="-":_result+="- ",_result+=state.dump);state.tag=_tag,state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",_result!==""&&(pairBuffer+=", "),state.condenseFlow&&(pairBuffer+='"'),objectKey=objectKeyList[index],objectValue=object[objectKey],state.replacer&&(objectValue=state.replacer.call(object,objectKey,objectValue)),writeNode(state,level,objectKey,!1,!1)&&(state.dump.length>1024&&(pairBuffer+="? "),pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" "),writeNode(state,level,objectValue,!1,!1)&&(pairBuffer+=state.dump,_result+=pairBuffer));state.tag=_tag,state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===!0)objectKeyList.sort();else if(typeof state.sortKeys=="function")objectKeyList.sort(state.sortKeys);else if(state.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",(!compact||_result!=="")&&(pairBuffer+=generateNextLine(state,level)),objectKey=objectKeyList[index],objectValue=object[objectKey],state.replacer&&(objectValue=state.replacer.call(object,objectKey,objectValue)),writeNode(state,level+1,objectKey,!0,!0,!0)&&(explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024,explicitPair&&(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?pairBuffer+="?":pairBuffer+="? "),pairBuffer+=state.dump,explicitPair&&(pairBuffer+=generateNextLine(state,level)),writeNode(state,level+1,objectValue,!0,explicitPair)&&(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?pairBuffer+=":":pairBuffer+=": ",pairBuffer+=state.dump,_result+=pairBuffer));state.tag=_tag,state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;for(typeList=explicit?state.explicitTypes:state.implicitTypes,index=0,length=typeList.length;index<length;index+=1)if(type=typeList[index],(type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object=="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){if(explicit?type.multi&&type.representName?state.tag=type.representName(object):state.tag=type.tag:state.tag="?",type.represent){if(style=state.styleMap[type.tag]||type.defaultStyle,_toString.call(type.represent)==="[object Function]")_result=type.represent(object,style);else if(_hasOwnProperty.call(type.represent,style))_result=type.represent[style](object,style);else throw new YAMLException("!<"+type.tag+'> tag resolver accepts not "'+style+'" style');state.dump=_result}return!0}return!1}function writeNode(state,level,object,block,compact,iskey,isblockseq){state.tag=null,state.dump=object,detectType(state,object,!1)||detectType(state,object,!0);var type=_toString.call(state.dump),inblock=block,tagStr;block&&(block=state.flowLevel<0||state.flowLevel>level);var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray&&(duplicateIndex=state.duplicates.indexOf(object),duplicate=duplicateIndex!==-1),(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0)&&(compact=!1),duplicate&&state.usedDuplicates[duplicateIndex])state.dump="*ref_"+duplicateIndex;else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]&&(state.usedDuplicates[duplicateIndex]=!0),type==="[object Object]")block&&Object.keys(state.dump).length!==0?(writeBlockMapping(state,level,state.dump,compact),duplicate&&(state.dump="&ref_"+duplicateIndex+state.dump)):(writeFlowMapping(state,level,state.dump),duplicate&&(state.dump="&ref_"+duplicateIndex+" "+state.dump));else if(type==="[object Array]")block&&state.dump.length!==0?(state.noArrayIndent&&!isblockseq&&level>0?writeBlockSequence(state,level-1,state.dump,compact):writeBlockSequence(state,level,state.dump,compact),duplicate&&(state.dump="&ref_"+duplicateIndex+state.dump)):(writeFlowSequence(state,level,state.dump),duplicate&&(state.dump="&ref_"+duplicateIndex+" "+state.dump));else if(type==="[object String]")state.tag!=="?"&&writeScalar(state,state.dump,level,iskey,inblock);else{if(type==="[object Undefined]")return!1;if(state.skipInvalid)return!1;throw new YAMLException("unacceptable kind of an object to dump "+type)}state.tag!==null&&state.tag!=="?"&&(tagStr=encodeURI(state.tag[0]==="!"?state.tag.slice(1):state.tag).replace(/!/g,"%21"),state.tag[0]==="!"?tagStr="!"+tagStr:tagStr.slice(0,18)==="tag:yaml.org,2002:"?tagStr="!!"+tagStr.slice(18):tagStr="!<"+tagStr+">",state.dump=tagStr+" "+state.dump)}return!0}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;for(inspectNode(object,objects,duplicatesIndexes),index=0,length=duplicatesIndexes.length;index<length;index+=1)state.duplicates.push(objects[duplicatesIndexes[index]]);state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object=="object")if(index=objects.indexOf(object),index!==-1)duplicatesIndexes.indexOf(index)===-1&&duplicatesIndexes.push(index);else if(objects.push(object),Array.isArray(object))for(index=0,length=object.length;index<length;index+=1)inspectNode(object[index],objects,duplicatesIndexes);else for(objectKeyList=Object.keys(object),index=0,length=objectKeyList.length;index<length;index+=1)inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}function dump(input,options){options=options||{};var state=new State(options);state.noRefs||getDuplicateReferences(input,state);var value=input;return state.replacer&&(value=state.replacer.call({"":value},"",value)),writeNode(state,0,value,!0,!0)?state.dump+`
42
- `:""}module.exports.dump=dump}});var require_js_yaml=__commonJS({"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js"(exports,module){"use strict";var loader=require_loader(),dumper=require_dumper();function renamed(from,to){return function(){throw new Error("Function yaml."+from+" is removed in js-yaml 4. Use yaml."+to+" instead, which is now safe by default.")}}module.exports.Type=require_type();module.exports.Schema=require_schema();module.exports.FAILSAFE_SCHEMA=require_failsafe();module.exports.JSON_SCHEMA=require_json();module.exports.CORE_SCHEMA=require_core();module.exports.DEFAULT_SCHEMA=require_default();module.exports.load=loader.load;module.exports.loadAll=loader.loadAll;module.exports.dump=dumper.dump;module.exports.YAMLException=require_exception();module.exports.types={binary:require_binary(),float:require_float(),map:require_map(),null:require_null(),pairs:require_pairs(),set:require_set(),timestamp:require_timestamp(),bool:require_bool(),int:require_int(),merge:require_merge2(),omap:require_omap(),seq:require_seq(),str:require_str()};module.exports.safeLoad=renamed("safeLoad","load");module.exports.safeLoadAll=renamed("safeLoadAll","loadAll");module.exports.safeDump=renamed("safeDump","dump")}});var require_detect_render=__commonJS({"../fs-detectors/dist/services/detect-render.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),detect_render_exports={};__export(detect_render_exports,{detectRenderServices:()=>detectRenderServices});module.exports=__toCommonJS(detect_render_exports);var import_js_yaml=__toESM(require_js_yaml()),import_detect_framework=require_detect_framework(),import_constants=require_constants2(),import_framework=require_framework2(),import_utils=require_utils(),RENDER_YAML="render.yaml",SERVICE_TYPE_MAP={web:"web",static:"web"};async function detectRenderServices(options){let{fs,detectEntrypoint}=options,raw=await readRenderYaml(fs);if(raw.warning)return{services:null,errors:[],warnings:[raw.warning]};if(!raw.content)return{services:null,errors:[],warnings:[]};let parsed=tryParseRenderConfig(raw.content);if(parsed.warning)return{services:null,errors:[],warnings:[parsed.warning]};if(!parsed.config)return{services:null,errors:[],warnings:[]};let renderServices=parsed.config.services;if(!Array.isArray(renderServices)||renderServices.length===0)return{services:null,errors:[],warnings:[]};let services={},serviceNames=new Set,errors=[],warnings=[];for(let rs of renderServices){let serviceType=rs.type;if(serviceType==="cron"){let name=rs.name??"unnamed",schedule=rs.schedule,runtime=rs.runtime&&rs.runtime in import_constants.RUNTIME_BUILDERS?rs.runtime:void 0,hint={type:"cron",...schedule?{schedule}:{},entrypoint:"<path-to-handler>",...runtime?{runtime}:{}};warnings.push({code:"RENDER_CRON_HINT",message:`Found Render cron service "${name}"`+(schedule?` (schedule: "${schedule}")`:"")+`. Vercel crons work with a file entrypoint. You can add the following to define this cron service:
43
- "${name}": ${JSON.stringify(hint,null,2)}`});continue}if(serviceType==="worker"){let name=rs.name??"unnamed",runtime=rs.runtime??"unknown";if(runtime==="python"){let hint={type:"worker",entrypoint:"<path-to-celery-app>",runtime:"python"};warnings.push({code:"RENDER_WORKER_HINT",message:`Found Render worker service "${name}". Python workers using Celery are supported. You can add the following to define this worker:
44
- "${name}": ${JSON.stringify(hint,null,2)}`})}else warnings.push({code:"RENDER_WORKER_HINT",message:`Found Render worker service "${name}" with runtime "${runtime}". Only Python workers are currently supported.`});continue}if(serviceType==="pserv"){let name=rs.name??"unnamed",hint={entrypoint:rs.rootDir??"<path-to-entrypoint>",mountPath:`/api/${name}`};warnings.push({code:"RENDER_PSERV_HINT",message:`Found Render private service "${name}". Private services are not yet supported. If you'd like to deploy it as a regular web service, you can add the following:
45
- "${name}": ${JSON.stringify(hint,null,2)}`});continue}if(!serviceType||!(serviceType in SERVICE_TYPE_MAP))continue;let serviceName=rs.name;if(!serviceName){warnings.push({code:"RENDER_CONFIG_ERROR",message:"Skipped a Render service with no name. Each service in render.yaml must have a name."});continue}if(serviceNames.has(serviceName)){errors.push({code:"DUPLICATE_SERVICE",message:`Duplicate service name "${serviceName}" in render.yaml.`,serviceName});continue}serviceNames.add(serviceName);let rootDir=rs.rootDir||".",serviceFs=rootDir==="."?fs:fs.chdir(rootDir),frameworks=await(0,import_detect_framework.detectFrameworks)({fs:serviceFs,frameworkList:import_framework.DETECTION_FRAMEWORKS,useExperimentalFrameworks:!0});if(frameworks.length===0){warnings.push({code:"SERVICE_SKIPPED",message:`Skipped Render service "${serviceName}": no framework detected. Configure it manually in services.`});continue}if(frameworks.length>1){let names=frameworks.map(f=>f.name).join(", ");errors.push({code:"MULTIPLE_FRAMEWORKS_SERVICE",message:`Multiple frameworks detected for Render service "${serviceName}": ${names}. Use explicit services config.`,serviceName});continue}let framework=frameworks[0],vercelType=SERVICE_TYPE_MAP[serviceType],serviceConfig={root:rootDir,type:vercelType,framework:framework.slug??void 0};if(rootDir!=="."&&detectEntrypoint&&!(0,import_framework.isFrontendFramework)(serviceConfig.framework)){let detected=await detectEntrypoint({workPath:rootDir,framework:serviceConfig.framework});detected&&(serviceConfig.entrypoint=detected.entrypoint)}let buildCommand=(0,import_utils.combineBuildCommand)(rs.buildCommand,rs.preDeployCommand);buildCommand&&(serviceConfig.buildCommand=buildCommand),services[serviceName]=serviceConfig}return errors.length>0?{services:null,errors,warnings}:Object.keys(services).length===0?{services:null,errors:[],warnings}:(warnings.push(...(0,import_utils.assignMountPaths)(services)),{services,errors:[],warnings})}async function readRenderYaml(fs){try{return await fs.isFile(RENDER_YAML)?{content:(await fs.readFile(RENDER_YAML)).toString("utf-8")}:{content:null}}catch(err){return{content:null,warning:{code:"RENDER_CONFIG_ERROR",message:`Failed to read ${RENDER_YAML}: ${err instanceof Error?err.message:String(err)}`}}}}function tryParseRenderConfig(content){try{return{config:import_js_yaml.default.load(content)}}catch(err){return{config:null,warning:{code:"RENDER_PARSE_ERROR",message:`Failed to parse ${RENDER_YAML}: ${err instanceof Error?err.message:String(err)}`}}}}}});var require_detect_procfile=__commonJS({"../fs-detectors/dist/services/detect-procfile.js"(exports,module){"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),detect_procfile_exports={};__export(detect_procfile_exports,{detectProcfileServices:()=>detectProcfileServices});module.exports=__toCommonJS(detect_procfile_exports);var import_detect_framework=require_detect_framework(),import_framework=require_framework2(),import_utils=require_utils(),PROCFILE="Procfile",PROCFILE_LINE_RE=/^\s*([A-Za-z_][A-Za-z0-9_-]*):\s*(.+)/,PY_IDENT="[A-Za-z_][A-Za-z0-9_]*",PY_MODULE_RE=new RegExp(`^${PY_IDENT}(?:\\.${PY_IDENT})*(?::${PY_IDENT})?$`),SUPPORTED_EXTENSIONS=new Set([".js",".cjs",".mjs",".ts",".cts",".mts",".py",".go",".rs",".rb",".ru"]),SUPPORTED_WORKER_COMMANDS=new Set(["celery","dramatiq"]);async function detectProcfileServices(options){let{fs}=options,raw=await readProcfile(fs);if(raw.warning)return{services:null,errors:[],warnings:[raw.warning]};if(!raw.content)return{services:null,errors:[],warnings:[]};let entries=parseProcfile(raw.content);if(entries.length===0)return{services:null,errors:[],warnings:[]};let services={},errors=[],warnings=[],releaseCommand,serviceEntries=[];for(let entry of entries)entry.processType==="release"?releaseCommand=entry.command:serviceEntries.push(entry);if(serviceEntries.length===0&&releaseCommand)return warnings.push({code:"PROCFILE_RELEASE_ONLY",message:`Found only a release process in Procfile (command: "${releaseCommand}"). The release command can be used as a build step. You can add it as part of a web service if you add it to "buildCommand".`}),{services:null,errors:[],warnings};if(serviceEntries.length===0)return{services:null,errors:[],warnings:[]};let frameworks=await(0,import_detect_framework.detectFrameworks)({fs,frameworkList:import_framework.DETECTION_FRAMEWORKS,useExperimentalFrameworks:!0});if(frameworks.length>1)return{services:null,errors:[{code:"MULTIPLE_FRAMEWORKS_SERVICE",message:`Multiple frameworks detected: ${frameworks.map(f=>f.name).join(", ")}. Use explicit services config.`}],warnings};let detectedFramework=frameworks.length===1?frameworks[0]:null,serviceNames=new Set;for(let entry of serviceEntries){let{processType,command}=entry,tokens=command.split(/\s+/).filter(Boolean),entrypoint=await extractEntrypoint(tokens,fs),isWorkerLikeProcess=processType.includes("worker")||hasSupportedWorkerCommand(tokens);if(serviceNames.has(processType)){errors.push({code:"DUPLICATE_SERVICE",message:`Duplicate process type "${processType}" in Procfile.`,serviceName:processType});continue}if(serviceNames.add(processType),isWorkerLikeProcess){hasSupportedWorkerCommand(tokens)&&entrypoint?.endsWith(".py")?services[processType]={root:".",type:"worker",entrypoint,runtime:"python"}:emitWorkerHint(processType,command,entrypoint,warnings);continue}if(!detectedFramework&&!entrypoint){warnings.push({code:"SERVICE_SKIPPED",message:`Skipped Procfile process "${processType}": no framework detected and could not infer entrypoint from command "${command}". Configure it manually in services.`});continue}services[processType]={root:".",type:"web",...detectedFramework?.slug?{framework:detectedFramework.slug}:{},entrypoint:entrypoint??"."}}if(errors.length>0)return{services:null,errors,warnings};if(Object.keys(services).length===0)return{services:null,errors:[],warnings};if(releaseCommand&&services.web)services.web.buildCommand=releaseCommand;else if(releaseCommand){let firstService=Object.values(services)[0];firstService&&(firstService.buildCommand=releaseCommand)}return warnings.push(...(0,import_utils.assignMountPaths)(services)),{services,errors:[],warnings}}function parseProcfile(content){let entries=[];for(let rawLine of content.split(`
46
- `)){let match=rawLine.match(PROCFILE_LINE_RE);match&&entries.push({processType:match[1],command:match[2].trim()})}return entries}async function extractEntrypoint(tokens,fs){let firstModulePath,lastFilePath;for(let token of tokens){if(!firstModulePath&&PY_MODULE_RE.test(token)){let resolved=await resolvePythonModule(token,fs);resolved&&(firstModulePath=resolved)}hasSupportedExtension(token)&&(lastFilePath=token)}return firstModulePath??lastFilePath}async function resolvePythonModule(spec,fs){let[modulePart]=spec.split(":"),filePath=`${modulePart.replace(/\./g,"/")}.py`,initPath=`${modulePart.replace(/\./g,"/")}/__init__.py`;try{if(await fs.isFile(filePath))return filePath;if(await fs.isFile(initPath))return initPath}catch{}}function hasSupportedExtension(token){let dot=token.lastIndexOf(".");return dot>0&&SUPPORTED_EXTENSIONS.has(token.slice(dot))}function hasSupportedWorkerCommand(tokens){return tokens.some(t=>SUPPORTED_WORKER_COMMANDS.has(baseCommand(t)))}function emitWorkerHint(processType,command,entrypoint,warnings){let hint={type:"worker",entrypoint:entrypoint??"<path-to-handler>",runtime:"python"};if(entrypoint?.endsWith(".py")){warnings.push({code:"PROCFILE_WORKER_HINT",message:`Found Procfile worker process "${processType}". Python workers that use Celery, Dramatiq and Django tasks are supported. You can add the following to define this worker:
47
- "${processType}": ${JSON.stringify(hint,null,2)}`});return}warnings.push({code:"PROCFILE_WORKER_HINT",message:`Found Procfile worker process "${processType}" (command: "${command}"). Could not determine runtime. Only Python workers are currently supported.`})}function baseCommand(token){if(!token)return"";let parts=token.split("/");return parts[parts.length-1]}async function readProcfile(fs){try{return await fs.isFile(PROCFILE)?{content:(await fs.readFile(PROCFILE)).toString("utf-8")}:{content:null}}catch(err){return{content:null,warning:{code:"PROCFILE_READ_ERROR",message:`Failed to read ${PROCFILE}: ${err instanceof Error?err.message:String(err)}`}}}}}});var require_detect_services=__commonJS({"../fs-detectors/dist/services/detect-services.js"(exports,module){"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),detect_services_exports={};__export(detect_services_exports,{detectServices:()=>detectServices2,generateServiceRewrites:()=>generateServiceRewrites2,generateServicesRoutes:()=>generateServicesRoutes2});module.exports=__toCommonJS(detect_services_exports);var import_build_utils=__require("@vercel/build-utils"),import_routing_utils=require_dist4(),import_buildpack_runtimes=require_buildpack_runtimes(),import_framework=require_framework2(),import_utils=require_utils(),import_resolve=require_resolve(),import_resolve_v2=require_resolve_v2(),import_auto_detect=require_auto_detect(),import_detect_railway=require_detect_railway(),import_detect_render=require_detect_render(),import_detect_procfile=require_detect_procfile(),PREVIEW_DOMAIN_MISSING=[{type:"host",value:{suf:".vercel.app"}},{type:"host",value:{suf:".vercel.dev"}}];function emptyRoutes(){return{hostRewrites:[],rewrites:[],defaults:[],fallbacks:[],crons:[],workers:[]}}function withResolvedResult(resolved,inferred=null){return{services:resolved.services,source:resolved.source,useImplicitEnvInjection:resolved.useImplicitEnvInjection,routes:resolved.routes,rewrites:resolved.rewrites,errors:resolved.errors,warnings:resolved.warnings,resolved,inferred}}function isBuildpackInferredService(svc){return(0,import_buildpack_runtimes.toBuildpackRuntime)(svc.runtime??(0,import_framework.inferRuntimeFromFramework)(svc.framework))!==void 0}function toInferredLayoutConfig(services){let inferredConfig={};for(let[name,service]of Object.entries(services)){let serviceConfig={root:service.root};service.type&&(serviceConfig.type=service.type),typeof service.entrypoint=="string"&&!isBuildpackInferredService(service)&&(serviceConfig.entrypoint=service.entrypoint),typeof service.mountPath=="string"&&(serviceConfig.mountPath=service.mountPath),(0,import_framework.isFrontendFramework)(service.framework)&&(serviceConfig.framework=service.framework),typeof service.buildCommand=="string"&&(serviceConfig.buildCommand=service.buildCommand),typeof service.runtime=="string"&&(serviceConfig.runtime=service.runtime),inferredConfig[name]=serviceConfig}return inferredConfig}async function detectServices2(options){let{fs,workPath,detectEntrypoint,configuredServices:providedConfiguredServices,configuredServicesType:providedConfiguredServicesType}=options,scopedFs=workPath?fs.chdir(workPath):fs,{config:vercelConfig,error:configError}=await(0,import_utils.readVercelConfig)(scopedFs);if(configError)return withResolvedResult({services:[],source:"configured",useImplicitEnvInjection:!0,routes:emptyRoutes(),rewrites:[],errors:[configError],warnings:[]});if(vercelConfig?.services!=null&&vercelConfig.experimentalServicesV2!=null)return withResolvedResult({services:[],source:"configured",useImplicitEnvInjection:!1,routes:emptyRoutes(),rewrites:[],errors:[{code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."}],warnings:[]});let hasProvidedConfiguredServices=providedConfiguredServices&&Object.keys(providedConfiguredServices).length>0,experimentalServicesV2=hasProvidedConfiguredServices&&(providedConfiguredServicesType==="services"||providedConfiguredServicesType==="experimentalServicesV2")?providedConfiguredServices:hasProvidedConfiguredServices?void 0:vercelConfig?.services??vercelConfig?.experimentalServicesV2;if(experimentalServicesV2&&Object.keys(experimentalServicesV2).length>0){let result=await(0,import_resolve_v2.resolveAllConfiguredServicesV2)(experimentalServicesV2,scopedFs);return withResolvedResult({services:result.services,source:"configured",useImplicitEnvInjection:!1,routes:emptyRoutes(),rewrites:[],errors:result.errors,warnings:[]})}let experimentalServicesV1=hasProvidedConfiguredServices?providedConfiguredServices:vercelConfig?.experimentalServices;if(experimentalServicesV1&&Object.keys(experimentalServicesV1).length>0){let result=await(0,import_resolve.resolveAllConfiguredServices)(experimentalServicesV1,scopedFs,"configured"),routes=generateServicesRoutes2(result.services);return withResolvedResult({services:result.services,source:"configured",useImplicitEnvInjection:!0,routes,rewrites:[],errors:result.errors,warnings:[]})}let detectors=[{detect:import_detect_railway.detectRailwayServices,source:"railway"},{detect:import_detect_render.detectRenderServices,source:"render"},{detect:import_detect_procfile.detectProcfileServices,source:"procfile"},{detect:import_auto_detect.autoDetectServices,source:"layout"}];for(let{detect,source}of detectors){let detectResult=await detect({fs:scopedFs,detectEntrypoint}),match=await tryResolveInferred(detectResult,source,scopedFs);if(match)return match}return withResolvedResult({services:[],source:"auto-detected",useImplicitEnvInjection:!0,routes:emptyRoutes(),rewrites:[],errors:[{code:"NO_SERVICES_CONFIGURED",message:"No services configured. Add `services` to vercel.json."}],warnings:[]})}async function tryResolveInferred(detectResult,source,scopedFs){if(detectResult.errors.length>0)return withResolvedResult({services:[],source:"auto-detected",useImplicitEnvInjection:source!=="layout",routes:emptyRoutes(),rewrites:[],errors:detectResult.errors,warnings:detectResult.warnings});if(!detectResult.services)return null;if(source==="layout"){let v2Services={};for(let[name,svc]of Object.entries(detectResult.services))v2Services[name]={root:svc.root,...svc.framework?{framework:svc.framework}:{},...svc.entrypoint&&!isBuildpackInferredService(svc)?{entrypoint:svc.entrypoint}:{}};let result2=await(0,import_resolve_v2.resolveAllConfiguredServicesV2)(v2Services,scopedFs),rootServices=Object.values(detectResult.services).filter(svc=>svc.mountPath==="/"&&typeof svc.framework=="string"),shouldInfer2=result2.errors.length===0&&rootServices.length===1&&result2.services.length>1,inferred2=shouldInfer2?{source,config:toInferredLayoutConfig(detectResult.services),services:result2.services,warnings:detectResult.warnings}:null;return withResolvedResult({services:shouldInfer2?result2.services:[],source:"auto-detected",useImplicitEnvInjection:!1,routes:emptyRoutes(),rewrites:shouldInfer2?generateServiceRewrites2(detectResult.services):[],experimentalServicesV2:shouldInfer2?v2Services:void 0,errors:result2.errors,warnings:detectResult.warnings},inferred2)}let v1Services={};for(let[name,svc]of Object.entries(detectResult.services))v1Services[name]={root:svc.root==="."?void 0:svc.root,...svc.framework?{framework:svc.framework}:{},...svc.entrypoint&&!isBuildpackInferredService(svc)?{entrypoint:svc.entrypoint}:{},...svc.type?{type:svc.type}:{},...svc.buildCommand?{buildCommand:svc.buildCommand}:{},...svc.preDeployCommand?{preDeployCommand:svc.preDeployCommand}:{},...svc.mountPath?{routePrefix:svc.mountPath}:{}};let result=await(0,import_resolve.resolveAllConfiguredServices)(v1Services,scopedFs,"generated"),inferred=result.errors.length===0&&result.services.length>0?{source,config:toInferredLayoutConfig(detectResult.services),services:result.services,warnings:detectResult.warnings}:null;return withResolvedResult({services:[],source:"auto-detected",useImplicitEnvInjection:!0,routes:emptyRoutes(),rewrites:[],errors:result.errors,warnings:detectResult.warnings},inferred)}function generateServiceRewrites2(services){return Object.entries(services).filter(([,svc])=>typeof svc.mountPath=="string"&&(!svc.type||svc.type==="web")).sort(([,a],[,b])=>b.mountPath.length-a.mountPath.length).map(([name,svc])=>{let mountPath=svc.mountPath;return mountPath==="/"?{source:"/(.*)",destination:{type:"service",service:name}}:{source:`/${mountPath.startsWith("/")?mountPath.slice(1):mountPath}(/.*)?`,destination:{type:"service",service:name}}})}function generateServicesRoutes2(allServices){let services=allServices.filter(import_build_utils.isExperimentalService),hostRewrites=[],rewrites=[],defaults=[],fallbacks=[],crons=[],workers=[],sortedWebServices=services.filter(s=>s.type==="web"&&typeof s.routePrefix=="string").sort((a,b)=>b.routePrefix.length-a.routePrefix.length),allWebPrefixes=getWebRoutePrefixes(sortedWebServices),explicitHostPrefixGuard=getExplicitHostPrefixNegativeLookahead(allWebPrefixes);for(let service of sortedWebServices){let{routePrefix}=service,normalizedPrefix=routePrefix.slice(1),ownershipGuard=(0,import_routing_utils.getOwnershipGuard)(routePrefix,allWebPrefixes),hostCondition=getHostCondition(service);if(hostCondition&&routePrefix!=="/"){let normalizedRoutePrefix=(0,import_routing_utils.normalizeRoutePrefix)(routePrefix);hostRewrites.push({src:"^/$",dest:normalizedRoutePrefix,has:hostCondition,missing:PREVIEW_DOMAIN_MISSING,check:!0}),hostRewrites.push({src:`^/${explicitHostPrefixGuard}(.*)$`,dest:`${normalizedRoutePrefix}/$1`,has:hostCondition,missing:PREVIEW_DOMAIN_MISSING,check:!0})}if(!(0,import_utils.isRouteOwningBuilder)(service)){if((0,import_utils.isStaticBuild)(service))routePrefix==="/"?fallbacks.push({src:(0,import_routing_utils.scopeRouteSourceToOwnership)("/(.*)",ownershipGuard),dest:"/index.html"}):fallbacks.push({src:(0,import_routing_utils.scopeRouteSourceToOwnership)(`^/${normalizedPrefix}(?:/.*)?$`,ownershipGuard),dest:`/${normalizedPrefix}/index.html`});else if(service.runtime){let functionPath=(0,import_utils.getInternalServiceFunctionPath)(service.name),check=service.runtime==="container"?void 0:!0;routePrefix==="/"?defaults.push({src:(0,import_routing_utils.scopeRouteSourceToOwnership)("^/(.*)$",ownershipGuard),dest:functionPath,...check?{check}:{}}):rewrites.push({src:(0,import_routing_utils.scopeRouteSourceToOwnership)(`^/${normalizedPrefix}(?:/.*)?$`,ownershipGuard),dest:functionPath,...check?{check}:{}})}}}let cronServices=services.filter(import_build_utils.isScheduleTriggeredService);for(let service of cronServices){let cronPrefix=(0,import_utils.getInternalServiceCronPathPrefix)(service.name),functionPath=(0,import_utils.getInternalServiceFunctionPath)(service.name);crons.push({src:`^${escapeRegex(cronPrefix)}/.*$`,dest:functionPath,check:!0})}return{hostRewrites,rewrites,defaults,fallbacks,crons,workers}}function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function getWebRoutePrefixes(services){let unique=new Set;for(let service of services)service.type!=="web"||typeof service.routePrefix!="string"||unique.add((0,import_routing_utils.normalizeRoutePrefix)(service.routePrefix));return Array.from(unique)}function getExplicitHostPrefixNegativeLookahead(routePrefixes){let explicitPrefixes=routePrefixes.map(import_routing_utils.normalizeRoutePrefix).filter(prefix=>prefix!=="/").sort((a,b)=>b.length-a.length).map(prefix=>escapeRegex(prefix.slice(1)));return explicitPrefixes.length===0?"":explicitPrefixes.length===1?`(?!${explicitPrefixes[0]}(?:/|$))`:`(?!(?:${explicitPrefixes.join("|")})(?:/|$))`}function getHostCondition(service){if(service.type==="web"&&typeof service.subdomain=="string"&&service.subdomain.length>0)return[{type:"host",value:{pre:`${service.subdomain}.`}}]}}});var require_migrate=__commonJS({"../fs-detectors/dist/services/migrate.js"(exports,module){"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),migrate_exports={};__export(migrate_exports,{hasLegacyServicesConfig:()=>hasLegacyServicesConfig2,migrateExperimentalServices:()=>migrateExperimentalServices2,planExperimentalServicesMigration:()=>planExperimentalServicesMigration2});module.exports=__toCommonJS(migrate_exports);var import_path=__require("path"),import_frameworks=require_frameworks(),import_constants=require_constants2(),import_resolve=require_resolve(),import_resolve_v2=require_resolve_v2(),import_utils=require_utils(),SERVICES_DOCS_URL="https://vercel.com/docs/services",SERVICES_ROUTING_DOCS_URL="https://vercel.com/docs/services/routing",SERVICES_BINDINGS_DOCS_URL="https://vercel.com/docs/services/bindings",EXPERIMENTAL_SERVICES_DOCS_URL="https://vercel.com/docs/services/experimental",TOP_LEVEL_BUILD_KEYS=["functions","installCommand","buildCommand","devCommand","ignoreCommand","outputDirectory","framework"],PREVIEW_DOMAIN_MISSING=[{type:"host",value:{suf:".vercel.app"}},{type:"host",value:{suf:".vercel.dev"}}];function hasLegacyServicesConfig2(config){return isNonEmptyObject(config?.experimentalServices)||isNonEmptyObject(config?.experimentalServicesV2)}function isNonEmptyObject(value){return value!==null&&typeof value=="object"&&!Array.isArray(value)&&Object.keys(value).length>0}function getServicesConfigConflict(config){let keys=["services","experimentalServices","experimentalServicesV2"].filter(key=>config[key]!==void 0);if(keys.length>1)return{code:"CONFLICTING_SERVICES_CONFIG",message:`Cannot migrate a configuration containing ${keys.map(key=>`\`${key}\``).join(" and ")}. Keep only the configuration you intend to migrate; existing services will not be overwritten or discarded.`}}function normalizePrefix(prefix){let withSlash=prefix.startsWith("/")?prefix:`/${prefix}`;return withSlash!=="/"?withSlash.replace(/\/+$/,""):withSlash}function publicRewrite(prefix,service){return{source:prefix==="/"?"/(.*)":`${prefix}(/.*)?`,destination:{service}}}function planExperimentalServicesMigration2(config,resolvedServices){let conflict=getServicesConfigConflict(config);if(conflict)return emptyPlanWithErrors([conflict]);let plan=emptyPlanWithErrors([]),legacy=config.experimentalServices;if(isNonEmptyObject(config.experimentalServicesV2))return plan.patch.services={...config.experimentalServicesV2},plan.removeKeys.push("experimentalServicesV2"),plan;if(!isNonEmptyObject(legacy))return plan.errors.push({code:"NO_LEGACY_SERVICES",message:"No `experimentalServices` configuration found to migrate."}),plan;plan.removeKeys.push("experimentalServices"),config.experimentalServiceGroups!==void 0&&(plan.removeKeys.push("experimentalServiceGroups"),plan.warnings.push({code:"SERVICE_GROUPS_DROPPED",message:"`experimentalServiceGroups` has no equivalent in `services` and was removed.",link:SERVICES_DOCS_URL}));let webServices=[],resolvedByName=new Map(resolvedServices.map(s=>[s.name,s]));for(let[legacyName,serviceConfig]of Object.entries(legacy)){let resolved=resolvedByName.get(legacyName);if(!resolved){plan.errors.push({code:"UNRESOLVED_SERVICE",serviceName:legacyName,message:`Service "${legacyName}" could not be resolved. Fix the errors reported for it before migrating.`});continue}if(resolved.type!=="web"){plan.unmigrated.push(getUnmigratedNote(legacyName,resolved));continue}let name=legacyName.toLowerCase();if(name.length>64||!/^[a-z]([a-z_-]*[a-z])?$/.test(name)){plan.errors.push({code:"INVALID_SERVICE_NAME",serviceName:legacyName,message:`Service name "${legacyName}" is not valid for \`services\`. Names must be 1-64 characters, start and end with a lowercase letter, and contain only lowercase letters, hyphens, and underscores. Rename it in \`experimentalServices\` first.`});continue}let conflict2=webServices.find(s=>s.name===name);if(conflict2){plan.errors.push({code:"DUPLICATE_SERVICE_NAME",serviceName:legacyName,message:`Services "${conflict2.resolved.name}" and "${legacyName}" both map to "${name}". Rename one of them first.`});continue}name!==legacyName&&plan.renamedServices.push({from:legacyName,to:name}),webServices.push({name,resolved,config:serviceConfig,prefix:normalizePrefix(resolved.routePrefix??"/")})}if(plan.errors.length>0)return plan;if(webServices.length===0)return plan.errors.push({code:"NO_WEB_SERVICES",message:"None of the configured services are web services. `services` only describes web services; see the manual steps for the others."}),plan;for(let consumer of webServices)plan.patch.services[consumer.name]=convertWebService(consumer,webServices,plan,config.build?.env??{});let subpaths=webServices.filter(svc=>svc.prefix!=="/").sort((a,b)=>b.prefix.length-a.prefix.length);plan.patch.rewrites=subpaths.map(svc=>publicRewrite(svc.prefix,svc.name));for(let{name,prefix,resolved}of subpaths){let{subdomain}=resolved;if(!subdomain)continue;let hostRewrite={source:"/(.*)",has:[{type:"host",value:{pre:`${subdomain}.`}}],missing:PREVIEW_DOMAIN_MISSING,destination:{service:name}};resolved.builder.use==="@vercel/next"&&(plan.patch.rewrites.push({...hostRewrite,source:"/",destination:{service:name,path:prefix}}),hostRewrite.source="/:path(.*)",hostRewrite.destination={service:name,path:`${prefix}/:path`}),plan.patch.rewrites.push(hostRewrite),plan.warnings.push({code:"SUBDOMAIN_ROUTING",serviceName:resolved.name,message:`"${subdomain}.<your-domain>" routes to "${resolved.name}". Explicit service prefixes take precedence. Host routing still applies only to custom domains, not preview URLs.`,link:SERVICES_ROUTING_DOCS_URL})}plan.patch.rewrites.push(...webServices.filter(svc=>svc.prefix==="/").map(svc=>publicRewrite("/",svc.name)));let rootService=webServices.find(s=>s.resolved.workspace===".");for(let key of TOP_LEVEL_BUILD_KEYS){let value=config[key];if(value===void 0||(plan.removeKeys.push(key),key==="framework"&&(value==="services"||value===null)))continue;if(!rootService){plan.errors.push({code:"TOP_LEVEL_SETTING_WITHOUT_ROOT_SERVICE",message:`Top-level \`${key}\` is not allowed with \`services\` and there is no service with root "." to receive it. Move it into the relevant service manually.`});continue}let target=plan.patch.services[rootService.name];if(key==="functions")target.functions={...value,...target.functions};else if(value!==null&&target[key]!==void 0){plan.warnings.push({code:"TOP_LEVEL_SETTING_CONFLICT",serviceName:rootService.resolved.name,message:`Top-level \`${key}\` was dropped because service "${rootService.resolved.name}" already defines it.`});continue}else value!==null&&(target[key]=value);plan.movedTopLevelKeys.push({key,service:rootService.name})}return Array.isArray(config.rewrites)&&config.rewrites.length>0&&plan.warnings.push({code:"EXISTING_REWRITES",message:"Your existing top-level `rewrites` are kept ahead of the generated service rewrites. They are evaluated before a request is routed into a service, so rewrites that target a path inside a specific service should move into that service's own `rewrites`.",link:SERVICES_ROUTING_DOCS_URL}),plan}function convertWebService(consumer,webServices,plan,existingBuildEnv){let{resolved,config:serviceConfig,prefix}=consumer,{name:legacyName,entrypoint}=resolved,service={root:resolved.workspace},warn=(code,message,link)=>{plan.warnings.push({code,serviceName:legacyName,message:`Service "${legacyName}": ${message}`,...link?{link}:{}})};serviceConfig.framework&&(service.framework=serviceConfig.framework);let runtime=serviceConfig.runtime;if(runtime&&(runtime in import_constants.RUNTIME_BUILDERS?service.runtime=runtime:warn("RUNTIME_DROPPED",`Runtime "${runtime}" is not supported (${Object.keys(import_constants.RUNTIME_BUILDERS).join(", ")}); it will be inferred from the entrypoint instead.`)),entrypoint){let handler=resolved.builder.config?.handlerFunction;service.entrypoint=typeof handler=="string"&&entrypoint.endsWith(".py")?`${entrypoint.slice(0,-3).replace(/\//g,".")}:${handler}`:entrypoint}serviceConfig.command!==void 0&&(service.command=serviceConfig.command),serviceConfig.installCommand!==void 0&&(service.installCommand=serviceConfig.installCommand);let buildCommand=(0,import_utils.combineBuildCommand)(serviceConfig.buildCommand,serviceConfig.preDeployCommand);buildCommand!==void 0&&(service.buildCommand=buildCommand),serviceConfig.preDeployCommand&&warn("PRE_DEPLOY_COMMAND_FOLDED","`preDeployCommand` was appended to `buildCommand` and now runs at build time, not right before deployment."),serviceConfig.builder&&warn("BUILDER_DROPPED",`Builder "${serviceConfig.builder}" was removed; \`services\` selects it from the framework and runtime.`),serviceConfig.workspace&&warn("WORKSPACE_REPLACED","`workspace` is now expressed by `root`.");let fnConfig={};for(let key of["maxDuration","includeFiles","excludeFiles"])serviceConfig[key]!==void 0&&(fnConfig[key]=serviceConfig[key]);serviceConfig.memory!==void 0&&warn("MEMORY_DROPPED","`memory` cannot be configured in vercel.json with Fluid compute; use the project's Functions settings instead.","https://vercel.com/docs/functions/configuring-functions/memory"),Object.keys(fnConfig).length>0&&(entrypoint&&resolved.runtime!=="container"?service.functions={[import_path.posix.normalize(entrypoint)]:fnConfig}:warn("FUNCTION_CONFIG_DROPPED",`No file entrypoint for ${Object.keys(fnConfig).join(", ")}; configure them under this service's \`functions\` manually.`));let isStatic=(0,import_utils.isStaticBuild)(resolved),rewrites=[];prefix!=="/"?((isStatic||resolved.builder.use!=="@vercel/next")&&rewrites.push({source:`${prefix}/:path(.*)?`,destination:"/:path"}),isStatic?(rewrites.push({source:"/:path*",destination:"/index.html"}),warn("STATIC_SUBPATH",`Static output is no longer nested under "${prefix}"; a service rewrite maps "${prefix}/*" onto it. Keep the framework base path (e.g. Vite \`base\`) at "${prefix}/".`,SERVICES_ROUTING_DOCS_URL)):resolved.builder.use==="@vercel/next"?warn("NEXT_SUBPATH",`Keep \`basePath\` in next.config at "${prefix}".`):warn("PREFIX_STRIP",`A service rewrite keeps stripping "${prefix}", but ASGI \`root_path\` / WSGI \`SCRIPT_NAME\` is no longer set. Check redirects and generated URLs; remove the rewrite if the app should handle the prefix itself.`,SERVICES_ROUTING_DOCS_URL)):isStatic&&rewrites.push({source:"/(.*)",destination:"/index.html"}),rewrites.length>0&&(service.rewrites=rewrites);let bindings=[],seenEnv=new Set,consumerPrefix=import_frameworks.frameworkList.find(f=>f.slug===resolved.framework)?.envPrefix,bindingsUnsupported=resolved.runtime==="go"||resolved.runtime==="rust",implicit=[],clientSide=[],unsupported=[],add=(target,env,explicit)=>{if(!seenEnv.has(env)){if(seenEnv.add(env),consumerPrefix&&env.startsWith(consumerPrefix)){if(Object.prototype.hasOwnProperty.call(existingBuildEnv,env))return;let defaults=(plan.patch.build??={env:{}}).env;defaults[env]!==void 0&&defaults[env]!==target.prefix?plan.errors.push({code:"CONFLICTING_BUILD_ENV",serviceName:legacyName,message:`Services use \`${env}\` for different public paths. Set a shared value in \`build.env\` or use distinct environment variable names before migrating.`}):defaults[env]=target.prefix;return}if(isStatic){explicit&&clientSide.push(`\`${env}="${target.prefix}"\``);return}if(bindingsUnsupported){unsupported.push(`\`${env}\``);return}explicit||implicit.push(`\`${env}\``),bindings.push({type:"service",service:target.name,format:"url",env})}};for(let[env,ref]of Object.entries(serviceConfig.env??{})){if(ref?.type!=="service-ref")continue;let target=webServices.find(s=>s.resolved.name===ref.service);if(!target){warn("SERVICE_REF_DROPPED",`\`${env}\` referenced "${ref.service}", which is not a web service and cannot be bound.`);continue}add(target,env,!0)}for(let target of webServices){let env=`${target.resolved.name.replace(/-/g,"_").toUpperCase()}_URL`;target!==consumer?add(target,env,!1):seenEnv.has(env)||(seenEnv.add(env),warn("SELF_SERVICE_URL_DROPPED",`Implicit self URL \`${env}\` is no longer injected; no self-binding was generated. If used at build time or on the server, define a project environment variable with the absolute public URL for "${prefix}" (including the origin), or derive it from the request.`,SERVICES_BINDINGS_DOCS_URL)),consumerPrefix&&add(target,`${consumerPrefix}${env}`,!1)}return implicit.length>0&&warn("IMPLICIT_URL_TO_BINDING",`Previously implicit URLs now use bindings: ${implicit.join(", ")}. These resolve to internal URLs; remove unused bindings.`,SERVICES_BINDINGS_DOCS_URL),clientSide.length>0&&warn("CLIENT_SIDE_SERVICE_URL",`Bindings only cover server-side calls. Define any client-side URLs still in use as project environment variables: ${clientSide.join(", ")}.`,SERVICES_BINDINGS_DOCS_URL),unsupported.length>0&&warn("BINDINGS_UNSUPPORTED_RUNTIME",`The ${resolved.runtime} runtime does not support bindings; ${unsupported.join(", ")} will no longer be injected. Build a container image to use bindings, or call other services through public URLs.`,SERVICES_BINDINGS_DOCS_URL),bindings.length>0&&(service.bindings=bindings),service}function getUnmigratedNote(legacyName,resolved){let isPython=resolved.runtime==="python",guidance;return resolved.type==="cron"||resolved.trigger==="schedule"?guidance=isPython?"Declare the schedule in your Python app (for example with APScheduler in the web service) or expose the job as a route and add it to top-level `crons`.":"Expose the job as a route in a web service and add it to top-level `crons`.":resolved.trigger==="workflow"?guidance=isPython?"Declare it as a `[[tool.vercel.workflows]]` entry in the owning service's pyproject.toml.":"Move it into a web service that uses the Workflow SDK.":guidance=isPython?"Declare it as a `[[tool.vercel.subscribers]]` entry in the owning service's pyproject.toml.":"Move the queue consumer into a web service that subscribes to the topic.",{code:"UNSUPPORTED_SERVICE_TYPE",serviceName:legacyName,message:`"${legacyName}" (type "${resolved.type}"${resolved.trigger?`, trigger "${resolved.trigger}"`:""}) has no equivalent in \`services\` and was left out. ${guidance}`,link:EXPERIMENTAL_SERVICES_DOCS_URL}}async function migrateExperimentalServices2(options){let{fs}=options,{config,resolvedServices}=options;if(!config){let read=await(0,import_utils.readVercelConfig)(fs);if(read.error)return emptyPlanWithErrors([read.error]);config=read.config??{}}let conflict=getServicesConfigConflict(config);if(conflict)return emptyPlanWithErrors([conflict]);if(!resolvedServices&&isNonEmptyObject(config.experimentalServices)){let result=await(0,import_resolve.resolveAllConfiguredServices)(config.experimentalServices,fs,"configured");if(result.errors.length>0)return emptyPlanWithErrors(result.errors);resolvedServices=result.services}let plan=planExperimentalServicesMigration2(config,resolvedServices??[]);if(plan.errors.length>0)return plan;let check=await(0,import_resolve_v2.resolveAllConfiguredServicesV2)(plan.patch.services,fs);return plan.errors.push(...check.errors.map(error=>({...error,message:`Generated \`services\` config is invalid: ${error.message}`}))),plan}function emptyPlanWithErrors(errors){return{patch:{services:{},rewrites:[]},removeKeys:[],movedTopLevelKeys:[],renamedServices:[],warnings:[],unmigrated:[],errors}}}});var require_detect_file_system_api=__commonJS({"../fs-detectors/dist/detect-file-system-api.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),detect_file_system_api_exports={};__export(detect_file_system_api_exports,{detectFileSystemAPI:()=>detectFileSystemAPI2});module.exports=__toCommonJS(detect_file_system_api_exports);var import_semver=__toESM(require_semver()),import__=require_dist5();async function detectFileSystemAPI2({files,projectSettings,builders,vercelConfig,pkg,tag,enableFlag=!1}){let framework=projectSettings.framework||"",deps=Object.assign({},pkg?.dependencies,pkg?.devDependencies),plugins=Object.keys(deps).filter(dep=>dep.startsWith("vercel-plugin-")),hasDotOutput=Object.keys(files).some(file=>file.startsWith(".output/")),hasMiddleware=!!(files["_middleware.js"]||files["_middleware.ts"]),metadata={plugins,hasDotOutput,hasMiddleware};if(!(enableFlag||hasMiddleware||hasDotOutput))return{metadata,fsApiBuilder:null,reason:"Flag not enabled."};if(vercelConfig?.builds&&vercelConfig.builds.length>0)return{metadata,fsApiBuilder:null,reason:"Detected `builds` in vercel.json. Please remove it in favor of CLI plugins."};if(Object.values(vercelConfig?.functions||{}).some(fn=>!!fn.runtime))return{metadata,fsApiBuilder:null,reason:"Detected `functions.runtime` in vercel.json. Please remove it in favor of CLI plugins."};if(process.env.HUGO_VERSION)return{metadata,fsApiBuilder:null,reason:"Detected `HUGO_VERSION` environment variable. Please remove it."};if(process.env.ZOLA_VERSION)return{metadata,fsApiBuilder:null,reason:"Detected `ZOLA_VERSION` environment variable. Please remove it."};if(process.env.GUTENBERG_VERSION)return{metadata,fsApiBuilder:null,reason:"Detected `GUTENBERG_VERSION` environment variable. Please remove it."};let invalidBuilder=builders.find(({use})=>!((0,import__.isOfficialRuntime)("go",use)||(0,import__.isOfficialRuntime)("python",use)||(0,import__.isOfficialRuntime)("ruby",use)||(0,import__.isOfficialRuntime)("node",use)||(0,import__.isOfficialRuntime)("next",use)||(0,import__.isOfficialRuntime)("static",use)||(0,import__.isOfficialRuntime)("static-build",use)));if(invalidBuilder)return{metadata,fsApiBuilder:null,reason:`Detected \`${invalidBuilder.use}\` in vercel.json. Please remove it in favor of CLI plugins.`};for(let lang of["go","python","ruby"])for(let{use}of builders){let plugin="vercel-plugin-"+lang;if((0,import__.isOfficialRuntime)(lang,use)&&!deps[plugin])return{metadata,fsApiBuilder:null,reason:`Detected \`${lang}\` Serverless Function usage without plugin \`${plugin}\`. Please run \`npm i ${plugin}\`.`}}if(framework==="nuxtjs"||framework==="sveltekit"||framework==="redwoodjs")return{metadata,fsApiBuilder:null,reason:`Detected framework \`${framework}\` that only supports legacy File System API. Please contact the framework author.`};if(framework==="nextjs"&&!hasDotOutput){if(projectSettings?.outputDirectory)return{metadata,fsApiBuilder:null,reason:`Detected Next.js with Output Directory \`${projectSettings.outputDirectory}\` override. Please change it back to the default.`};let nextVersion=deps.next;if(!nextVersion)return{metadata,fsApiBuilder:null,reason:"Detected Next.js in Project Settings but missing `next` package.json dependencies. Please run `npm i next`."};if(nextVersion!=="latest"&&nextVersion!=="canary"){let fixedVersion=import_semver.default.valid(import_semver.default.coerce(nextVersion)||"");if(!fixedVersion||!import_semver.default.gte(fixedVersion,"12.0.0"))return{metadata,fsApiBuilder:null,reason:`Detected legacy Next.js version "${nextVersion}" in package.json. Please run \`npm i next@latest\` to upgrade.`}}}if(!hasDotOutput){let vercelCliVersion=deps.vercel;if(vercelCliVersion&&vercelCliVersion!=="latest"&&vercelCliVersion!=="canary"){let fixedVersion=import_semver.default.valid(import_semver.default.coerce(vercelCliVersion)||"");if(!fixedVersion||!import_semver.default.gte(fixedVersion,"23.1.3-canary.68"))return{metadata,fsApiBuilder:null,reason:`Detected legacy Vercel CLI version "${vercelCliVersion}" in package.json. Please run \`npm i vercel@latest\` to upgrade.`}}}let config=builders.find(({use})=>(0,import__.isOfficialRuntime)("next",use)||(0,import__.isOfficialRuntime)("static",use)||(0,import__.isOfficialRuntime)("static-build",use))?.config||{},fsApiBuilder={use:`@vercelruntimes/file-system-api${tag?`@${tag}`:""}`,src:"**",config:{...config,fileSystemAPI:!0,framework:config.framework||framework||null,projectSettings,hasMiddleware,hasDotOutput}};return{metadata,fsApiBuilder,reason:null}}}});var require_get_project_paths=__commonJS({"../fs-detectors/dist/get-project-paths.js"(exports,module){"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),get_project_paths_exports={};__export(get_project_paths_exports,{getProjectPaths:()=>getProjectPaths2});module.exports=__toCommonJS(get_project_paths_exports);var import_detect_framework=require_detect_framework(),import_frameworks=require_frameworks(),MAX_DEPTH_TRAVERSE=3,getProjectPaths2=async({fs,path,skipPaths,depth=MAX_DEPTH_TRAVERSE})=>{if(depth===0)return[];let allPaths=[],topPath=path??"./";if(path&&skipPaths?.includes(path))return allPaths;if(await(0,import_detect_framework.detectFramework)({fs:fs.chdir(topPath),frameworkList:import_frameworks.frameworkList})!==null&&allPaths.push(topPath),depth>1){let childDirectories=(await fs.readdir(topPath)).filter(stat=>stat.type==="dir"&&!skipPaths?.includes(stat.path));return[...(await Promise.all(childDirectories.map(({path:path2})=>getProjectPaths2({fs,path:path2,depth:depth-1,skipPaths})))).flat(),...allPaths]}return allPaths}}});var require_filesystem=__commonJS({"../fs-detectors/dist/detectors/filesystem.js"(exports,module){"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),filesystem_exports={};__export(filesystem_exports,{DetectorFilesystem:()=>DetectorFilesystem2});module.exports=__toCommonJS(filesystem_exports);var import_path=__require("path"),DetectorFilesystem2=class{constructor(){this.hasPath=async path=>{let p=this.pathCache.get(path);return p||(p=this._hasPath(path),this.pathCache.set(path,p)),p},this.isFile=async name=>{let p=this.fileCache.get(name);return p||(p=this._isFile(name),this.fileCache.set(name,p)),p},this.readFile=async name=>{let p=this.readFileCache.get(name);return p||(p=this._readFile(name),this.readFileCache.set(name,p)),p},this.readdir=async(dirPath,options)=>{let p=this.readdirCache.get(dirPath);p||(p=this._readdir(dirPath),this.readdirCache.set(dirPath,p));let directoryContent=await p,directoryFiles=new Set;for(let file of directoryContent)file.type==="file"&&(this.fileCache.set(file.path,Promise.resolve(!0)),this.pathCache.set(file.path,Promise.resolve(!0)),directoryFiles.add(file.name));if(options?.potentialFiles){let filesThatDoNotExist=options.potentialFiles.filter(path=>(0,import_path.basename)(path)===path).filter(path=>!directoryFiles.has(path));for(let filePath of filesThatDoNotExist){let fullFilePath=dirPath==="/"?filePath:import_path.posix.join(dirPath,filePath);this.fileCache.set(fullFilePath,Promise.resolve(!1)),this.pathCache.set(fullFilePath,Promise.resolve(!1))}}return p},this.chdir=name=>this._chdir(name),this.writeFile=async(name,content)=>{this.readFileCache.set(name,Promise.resolve(Buffer.from(content))),this.fileCache.set(name,Promise.resolve(!0)),this.pathCache.set(name,Promise.resolve(!0))},this.pathCache=new Map,this.fileCache=new Map,this.readFileCache=new Map,this.readdirCache=new Map}}}});var require_local_file_system_detector=__commonJS({"../fs-detectors/dist/detectors/local-file-system-detector.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),local_file_system_detector_exports={};__export(local_file_system_detector_exports,{LocalFileSystemDetector:()=>LocalFileSystemDetector2});module.exports=__toCommonJS(local_file_system_detector_exports);var import_promises=__toESM(__require("fs/promises")),import_path=__require("path"),import_filesystem=require_filesystem(),import_error_utils=require_dist(),LocalFileSystemDetector2=class _LocalFileSystemDetector extends import_filesystem.DetectorFilesystem{constructor(rootPath){super(),this.rootPath=rootPath}async _hasPath(name){try{return await import_promises.default.stat(this.getFilePath(name)),!0}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT")return!1;throw err}}_readFile(name){return import_promises.default.readFile(this.getFilePath(name))}async _isFile(name){return(await import_promises.default.stat(this.getFilePath(name))).isFile()}async _readdir(dir){let dirPath=this.getFilePath(dir),entries=await import_promises.default.readdir(dirPath,{withFileTypes:!0}),result=[];for(let entry of entries){let type;if(entry.isFile())type="file";else if(entry.isDirectory())type="dir";else continue;result.push({name:entry.name,path:(0,import_path.join)(this.getRelativeFilePath(dir),entry.name),type})}return result}_chdir(name){return new _LocalFileSystemDetector(this.getFilePath(name))}getRelativeFilePath(name){return name.startsWith(this.rootPath)?(0,import_path.relative)(this.rootPath,name):name}getFilePath(name){return(0,import_path.join)(this.rootPath,this.getRelativeFilePath(name))}}}});var require_workspace_managers=__commonJS({"../fs-detectors/dist/workspaces/workspace-managers.js"(exports,module){"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),workspace_managers_exports={};__export(workspace_managers_exports,{default:()=>workspace_managers_default,workspaceManagers:()=>workspaceManagers2});module.exports=__toCommonJS(workspace_managers_exports);var workspaceManagers2=[{name:"Yarn",slug:"yarn",detectors:{every:[{path:"package.json",matchContent:'"workspaces":\\s*(?:\\[[^\\]]*]|{[^}]*"packages":[^}]*})'},{path:"yarn.lock"}]}},{name:"pnpm",slug:"pnpm",detectors:{every:[{path:"pnpm-workspace.yaml"}]}},{name:"npm",slug:"npm",detectors:{every:[{path:"package.json",matchContent:'"workspaces":\\s*(?:\\[[^\\]]*]|{[^}]*"packages":[^}]*})'},{path:"package-lock.json"}]}},{name:"nx",slug:"nx",detectors:{every:[{path:"workspace.json",matchContent:'"projects":\\s*{[^}]'}]}},{name:"rush",slug:"rush",detectors:{every:[{path:"rush.json"}]}},{name:"default",slug:"yarn",detectors:{every:[{path:"package.json",matchContent:'"workspaces":\\s*(?:\\[[^\\]]*]|{[^}]*"packages":[^}]*})'}]}}],workspace_managers_default=workspaceManagers2}});var require_get_workspaces=__commonJS({"../fs-detectors/dist/workspaces/get-workspaces.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),get_workspaces_exports={};__export(get_workspaces_exports,{getWorkspaces:()=>getWorkspaces2});module.exports=__toCommonJS(get_workspaces_exports);var import_path=__toESM(__require("path")),import_workspace_managers=require_workspace_managers(),import_detect_framework=require_detect_framework(),MAX_DEPTH_TRAVERSE=3,posixPath=import_path.default.posix;async function getWorkspaces2({fs,depth=MAX_DEPTH_TRAVERSE,cwd="/"}){if(depth===0)return[];let workspaceType=await(0,import_detect_framework.detectFramework)({fs,frameworkList:import_workspace_managers.workspaceManagers});if(workspaceType===null){let childDirectories=(await fs.readdir("./")).filter(stat=>stat.type==="dir");return(await Promise.all(childDirectories.map(childDirectory=>getWorkspaces2({fs:fs.chdir(childDirectory.path),depth:depth-1,cwd:posixPath.join(cwd,childDirectory.path)})))).flat()}return[{type:workspaceType,rootPath:cwd}]}}});var require_old=__commonJS({"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports){var pathModule=__require("path"),isWindows=process.platform==="win32",fs=__require("fs"),DEBUG=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var callback;if(DEBUG){var backtrace=new Error;callback=debugCallback}else callback=missingCallback;return callback;function debugCallback(err){err&&(backtrace.message=err.message,err=backtrace,missingCallback(err))}function missingCallback(err){if(err){if(process.throwDeprecation)throw err;if(!process.noDeprecation){var msg="fs: missing callback "+(err.stack||err.message);process.traceDeprecation?console.trace(msg):console.error(msg)}}}}function maybeCallback(cb){return typeof cb=="function"?cb:rethrow()}var normalize=pathModule.normalize;isWindows?nextPartRe=/(.*?)(?:[\/\\]+|$)/g:nextPartRe=/(.*?)(?:[\/]+|$)/g;var nextPartRe;isWindows?splitRootRe=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:splitRootRe=/^[\/]*/;var splitRootRe;exports.realpathSync=function(p,cache){if(p=pathModule.resolve(p),cache&&Object.prototype.hasOwnProperty.call(cache,p))return cache[p];var original=p,seenLinks={},knownHard={},pos,current,base,previous;start();function start(){var m=splitRootRe.exec(p);pos=m[0].length,current=m[0],base=m[0],previous="",isWindows&&!knownHard[base]&&(fs.lstatSync(base),knownHard[base]=!0)}for(;pos<p.length;){nextPartRe.lastIndex=pos;var result=nextPartRe.exec(p);if(previous=current,current+=result[0],base=previous+result[1],pos=nextPartRe.lastIndex,!(knownHard[base]||cache&&cache[base]===base)){var resolvedLink;if(cache&&Object.prototype.hasOwnProperty.call(cache,base))resolvedLink=cache[base];else{var stat=fs.lstatSync(base);if(!stat.isSymbolicLink()){knownHard[base]=!0,cache&&(cache[base]=base);continue}var linkTarget=null;if(!isWindows){var id=stat.dev.toString(32)+":"+stat.ino.toString(32);seenLinks.hasOwnProperty(id)&&(linkTarget=seenLinks[id])}linkTarget===null&&(fs.statSync(base),linkTarget=fs.readlinkSync(base)),resolvedLink=pathModule.resolve(previous,linkTarget),cache&&(cache[base]=resolvedLink),isWindows||(seenLinks[id]=linkTarget)}p=pathModule.resolve(resolvedLink,p.slice(pos)),start()}}return cache&&(cache[original]=p),p};exports.realpath=function(p,cache,cb){if(typeof cb!="function"&&(cb=maybeCallback(cache),cache=null),p=pathModule.resolve(p),cache&&Object.prototype.hasOwnProperty.call(cache,p))return process.nextTick(cb.bind(null,null,cache[p]));var original=p,seenLinks={},knownHard={},pos,current,base,previous;start();function start(){var m=splitRootRe.exec(p);pos=m[0].length,current=m[0],base=m[0],previous="",isWindows&&!knownHard[base]?fs.lstat(base,function(err){if(err)return cb(err);knownHard[base]=!0,LOOP()}):process.nextTick(LOOP)}function LOOP(){if(pos>=p.length)return cache&&(cache[original]=p),cb(null,p);nextPartRe.lastIndex=pos;var result=nextPartRe.exec(p);return previous=current,current+=result[0],base=previous+result[1],pos=nextPartRe.lastIndex,knownHard[base]||cache&&cache[base]===base?process.nextTick(LOOP):cache&&Object.prototype.hasOwnProperty.call(cache,base)?gotResolvedLink(cache[base]):fs.lstat(base,gotStat)}function gotStat(err,stat){if(err)return cb(err);if(!stat.isSymbolicLink())return knownHard[base]=!0,cache&&(cache[base]=base),process.nextTick(LOOP);if(!isWindows){var id=stat.dev.toString(32)+":"+stat.ino.toString(32);if(seenLinks.hasOwnProperty(id))return gotTarget(null,seenLinks[id],base)}fs.stat(base,function(err2){if(err2)return cb(err2);fs.readlink(base,function(err3,target){isWindows||(seenLinks[id]=target),gotTarget(err3,target)})})}function gotTarget(err,target,base2){if(err)return cb(err);var resolvedLink=pathModule.resolve(previous,target);cache&&(cache[base2]=resolvedLink),gotResolvedLink(resolvedLink)}function gotResolvedLink(resolvedLink){p=pathModule.resolve(resolvedLink,p.slice(pos)),start()}}}});var require_fs=__commonJS({"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports,module){module.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var fs=__require("fs"),origRealpath=fs.realpath,origRealpathSync=fs.realpathSync,version=process.version,ok=/^v[0-5]\./.test(version),old=require_old();function newError(er){return er&&er.syscall==="realpath"&&(er.code==="ELOOP"||er.code==="ENOMEM"||er.code==="ENAMETOOLONG")}function realpath(p,cache,cb){if(ok)return origRealpath(p,cache,cb);typeof cache=="function"&&(cb=cache,cache=null),origRealpath(p,cache,function(er,result){newError(er)?old.realpath(p,cache,cb):cb(er,result)})}function realpathSync(p,cache){if(ok)return origRealpathSync(p,cache);try{return origRealpathSync(p,cache)}catch(er){if(newError(er))return old.realpathSync(p,cache);throw er}}function monkeypatch(){fs.realpath=realpath,fs.realpathSync=realpathSync}function unmonkeypatch(){fs.realpath=origRealpath,fs.realpathSync=origRealpathSync}}});var require_path=__commonJS({"../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js"(exports,module){var isWindows=typeof process=="object"&&process&&process.platform==="win32";module.exports=isWindows?{sep:"\\"}:{sep:"/"}}});var require_brace_expansion2=__commonJS({"../../node_modules/.pnpm/brace-expansion@2.1.1/node_modules/brace-expansion/index.js"(exports,module){var balanced=require_balanced_match();module.exports=expandTop;var escSlash="\0SLASH"+Math.random()+"\0",escOpen="\0OPEN"+Math.random()+"\0",escClose="\0CLOSE"+Math.random()+"\0",escComma="\0COMMA"+Math.random()+"\0",escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[],m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre,body=m.body,post=m.post,p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);return post.length&&(p[p.length-1]+=postParts.shift(),p.push.apply(p,postParts)),parts.push.apply(parts,p),parts}function expandTop(str,options){if(!str)return[];options=options||{};var max=options.max==null?1/0:options.max;return str.substr(0,2)==="{}"&&(str="\\{\\}"+str.substr(2)),expand(escapeBraces(str),max,!0).map(unescapeBraces)}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,max,isTop){var expansions=[],m=balanced("{","}",str);if(!m)return[str];var pre=m.pre,post=m.post.length?expand(m.post,max,!1):[""];if(/\$$/.test(m.pre))for(var k=0;k<post.length&&k<max;k++){var expansion=pre+"{"+m.body+"}"+post[k];expansions.push(expansion)}else{var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body),isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body),isSequence=isNumericSequence||isAlphaSequence,isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions)return m.post.match(/,(?!,).*\}/)?(str=m.pre+"{"+m.body+escClose+m.post,expand(str,max,!0)):[str];var n;if(isSequence)n=m.body.split(/\.\./);else if(n=parseCommaParts(m.body),n.length===1&&(n=expand(n[0],max,!1).map(embrace),n.length===1))return post.map(function(p){return m.pre+n[0]+p});var N;if(isSequence){var x=numeric(n[0]),y=numeric(n[1]),width=Math.max(n[0].length,n[1].length),incr=n.length==3?Math.max(Math.abs(numeric(n[2])),1):1,test=lte,reverse=y<x;reverse&&(incr*=-1,test=gte);var pad=n.some(isPadded);N=[];for(var i=x;test(i,y)&&N.length<max;i+=incr){var c;if(isAlphaSequence)c=String.fromCharCode(i),c==="\\"&&(c="");else if(c=String(i),pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");i<0?c="-"+z+c.slice(1):c=z+c}}N.push(c)}}else{N=[];for(var j=0;j<n.length;j++)N.push.apply(N,expand(n[j],max,!1))}for(var j=0;j<N.length;j++)for(var k=0;k<post.length&&expansions.length<max;k++){var expansion=pre+N[j]+post[k];(!isTop||isSequence||expansion)&&expansions.push(expansion)}}return expansions}}});var require_minimatch2=__commonJS({"../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/minimatch.js"(exports,module){var minimatch=module.exports=(p,pattern,options={})=>(assertValidPattern(pattern),!options.nocomment&&pattern.charAt(0)==="#"?!1:new Minimatch(pattern,options).match(p));module.exports=minimatch;var path=require_path();minimatch.sep=path.sep;var GLOBSTAR=Symbol("globstar **");minimatch.GLOBSTAR=GLOBSTAR;var expand=require_brace_expansion2(),plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},qmark="[^/]",star=qmark+"*?",twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?",charSet=s=>s.split("").reduce((set,c)=>(set[c]=!0,set),{}),reSpecials=charSet("().*{}+?[]^$\\!"),addPatternStartSet=charSet("[.("),slashSplit=/\/+/;minimatch.filter=(pattern,options={})=>(p,i,list)=>minimatch(p,pattern,options);var ext=(a,b={})=>{let t={};return Object.keys(a).forEach(k=>t[k]=a[k]),Object.keys(b).forEach(k=>t[k]=b[k]),t};minimatch.defaults=def=>{if(!def||typeof def!="object"||!Object.keys(def).length)return minimatch;let orig=minimatch,m=(p,pattern,options)=>orig(p,pattern,ext(def,options));return m.Minimatch=class extends orig.Minimatch{constructor(pattern,options){super(pattern,ext(def,options))}},m.Minimatch.defaults=options=>orig.defaults(ext(def,options)).Minimatch,m.filter=(pattern,options)=>orig.filter(pattern,ext(def,options)),m.defaults=options=>orig.defaults(ext(def,options)),m.makeRe=(pattern,options)=>orig.makeRe(pattern,ext(def,options)),m.braceExpand=(pattern,options)=>orig.braceExpand(pattern,ext(def,options)),m.match=(list,pattern,options)=>orig.match(list,pattern,ext(def,options)),m};minimatch.braceExpand=(pattern,options)=>braceExpand(pattern,options);var braceExpand=(pattern,options={})=>(assertValidPattern(pattern),options.nobrace||!/\{(?:(?!\{).)*\}/.test(pattern)?[pattern]:expand(pattern)),MAX_PATTERN_LENGTH=1024*64,assertValidPattern=pattern=>{if(typeof pattern!="string")throw new TypeError("invalid pattern");if(pattern.length>MAX_PATTERN_LENGTH)throw new TypeError("pattern is too long")},SUBPARSE=Symbol("subparse");minimatch.makeRe=(pattern,options)=>new Minimatch(pattern,options||{}).makeRe();minimatch.match=(list,pattern,options={})=>{let mm=new Minimatch(pattern,options);return list=list.filter(f=>mm.match(f)),mm.options.nonull&&!list.length&&list.push(pattern),list};var globUnescape=s=>s.replace(/\\(.)/g,"$1"),regExpEscape=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Minimatch=class{constructor(pattern,options){assertValidPattern(pattern),options||(options={}),this.options=options,this.set=[],this.pattern=pattern,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!options.partial,this.make()}debug(){}make(){let pattern=this.pattern,options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=!0;return}if(!pattern){this.empty=!0;return}this.parseNegate();let set=this.globSet=this.braceExpand();options.debug&&(this.debug=(...args)=>console.error(...args)),this.debug(this.pattern,set),set=this.globParts=set.map(s=>s.split(slashSplit)),this.debug(this.pattern,set),set=set.map((s,si,set2)=>s.map(this.parse,this)),this.debug(this.pattern,set),set=set.filter(s=>s.indexOf(!1)===-1),this.debug(this.pattern,set),this.set=set}parseNegate(){if(this.options.nonegate)return;let pattern=this.pattern,negate=!1,negateOffset=0;for(let i=0;i<pattern.length&&pattern.charAt(i)==="!";i++)negate=!negate,negateOffset++;negateOffset&&(this.pattern=pattern.substr(negateOffset)),this.negate=negate}matchOne(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(`
48
- 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(`
49
- >>> no match, partial?`,file,fr,pattern,pr),fr===fl))}var hit;if(typeof p=="string"?(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)return fi===fl-1&&file[fi]==="";throw new Error("wtf?")}braceExpand(){return braceExpand(this.pattern,this.options)}parse(pattern,isSub){assertValidPattern(pattern);let options=this.options;if(pattern==="**")if(options.noglobstar)pattern="*";else return GLOBSTAR;if(pattern==="")return"";let re="",hasMagic=!!options.nocase,escaping=!1,patternListStack=[],negativeLists=[],stateChar,inClass=!1,reClassStart=-1,classStart=-1,cs,pl,sp,patternStart=pattern.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",clearStateChar=()=>{if(stateChar){switch(stateChar){case"*":re+=star,hasMagic=!0;break;case"?":re+=qmark,hasMagic=!0;break;default:re+="\\"+stateChar;break}this.debug("clearStateChar %j %j",stateChar,re),stateChar=!1}};for(let i=0,c;i<pattern.length&&(c=pattern.charAt(i));i++){if(this.debug("%s %s %s %j",pattern,i,re,c),escaping){if(c==="/")return!1;reSpecials[c]&&(re+="\\"),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}this.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,pl=patternListStack.pop(),re+=pl.close,pl.type==="!"&&negativeLists.push(pl),pl.reEnd=re.length;continue;case"|":if(inClass||!patternListStack.length){re+="\\|";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;continue}cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]")}catch{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(),reSpecials[c]&&!(c==="^"&&inClass)&&(re+="\\"),re+=c;break}}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()){let tail;tail=re.slice(pl.reStart+pl.open.length),this.debug("setting tail",re,pl),tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,(_,$1,$2)=>($2||($2="\\"),$1+$1+$2+"|")),this.debug(`tail=%j
50
- %s`,tail,tail,pl,re);let t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=!0,re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar(),escaping&&(re+="\\\\");let addPatternStart=addPatternStartSet[re.charAt(0)];for(let n=negativeLists.length-1;n>-1;n--){let nl=negativeLists[n],nlBefore=re.slice(0,nl.reStart),nlFirst=re.slice(nl.reStart,nl.reEnd-8),nlAfter=re.slice(nl.reEnd),nlLast=re.slice(nl.reEnd-8,nl.reEnd)+nlAfter,openParensBefore=nlBefore.split("(").length-1,cleanAfter=nlAfter;for(let i=0;i<openParensBefore;i++)cleanAfter=cleanAfter.replace(/\)[+*?]?/,"");nlAfter=cleanAfter;let dollar=nlAfter===""&&isSub!==SUBPARSE?"$":"";re=nlBefore+nlFirst+nlAfter+dollar+nlLast}if(re!==""&&hasMagic&&(re="(?=.)"+re),addPatternStart&&(re=patternStart+re),isSub===SUBPARSE)return[re,hasMagic];if(!hasMagic)return globUnescape(pattern);let flags=options.nocase?"i":"";try{return Object.assign(new RegExp("^"+re+"$",flags),{_glob:pattern,_src:re})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let set=this.set;if(!set.length)return this.regexp=!1,this.regexp;let options=this.options,twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot,flags=options.nocase?"i":"",re=set.map(pattern=>(pattern=pattern.map(p=>typeof p=="string"?regExpEscape(p):p===GLOBSTAR?GLOBSTAR:p._src).reduce((set2,p)=>(set2[set2.length-1]===GLOBSTAR&&p===GLOBSTAR||set2.push(p),set2),[]),pattern.forEach((p,i)=>{p!==GLOBSTAR||pattern[i-1]===GLOBSTAR||(i===0?pattern.length>1?pattern[i+1]="(?:\\/|"+twoStar+"\\/)?"+pattern[i+1]:pattern[i]=twoStar:i===pattern.length-1?pattern[i-1]+="(?:\\/|"+twoStar+")?":(pattern[i-1]+="(?:\\/|\\/"+twoStar+"\\/)"+pattern[i+1],pattern[i+1]=GLOBSTAR))}),pattern.filter(p=>p!==GLOBSTAR).join("/"))).join("|");re="^(?:"+re+")$",this.negate&&(re="^(?!"+re+").*$");try{this.regexp=new RegExp(re,flags)}catch{this.regexp=!1}return this.regexp}match(f,partial=this.partial){if(this.debug("match",f,this.pattern),this.comment)return!1;if(this.empty)return f==="";if(f==="/"&&partial)return!0;let options=this.options;path.sep!=="/"&&(f=f.split(path.sep).join("/")),f=f.split(slashSplit),this.debug(this.pattern,"split",f);let set=this.set;this.debug(this.pattern,"set",set);let filename;for(let i=f.length-1;i>=0&&(filename=f[i],!filename);i--);for(let i=0;i<set.length;i++){let pattern=set[i],file=f;if(options.matchBase&&pattern.length===1&&(file=[filename]),this.matchOne(file,pattern,partial))return options.flipNegate?!0:!this.negate}return options.flipNegate?!1:this.negate}static defaults(def){return minimatch.defaults(def).Minimatch}};minimatch.Minimatch=Minimatch}});var require_common2=__commonJS({"../../node_modules/.pnpm/glob@8.0.3/node_modules/glob/common.js"(exports){exports.setopts=setopts;exports.ownProp=ownProp;exports.makeAbs=makeAbs;exports.finish=finish;exports.mark=mark;exports.isIgnored=isIgnored;exports.childrenIgnored=childrenIgnored;function ownProp(obj,field){return Object.prototype.hasOwnProperty.call(obj,field)}var fs=__require("fs"),path=__require("path"),minimatch=require_minimatch2(),isAbsolute=__require("path").isAbsolute,Minimatch=minimatch.Minimatch;function alphasort(a,b){return a.localeCompare(b,"en")}function setupIgnores(self,options){self.ignore=options.ignore||[],Array.isArray(self.ignore)||(self.ignore=[self.ignore]),self.ignore.length&&(self.ignore=self.ignore.map(ignoreMap))}function ignoreMap(pattern){var gmatcher=null;if(pattern.slice(-3)==="/**"){var gpattern=pattern.replace(/(\/\*\*)+$/,"");gmatcher=new Minimatch(gpattern,{dot:!0})}return{matcher:new Minimatch(pattern,{dot:!0}),gmatcher}}function setopts(self,pattern,options){if(options||(options={}),options.matchBase&&pattern.indexOf("/")===-1){if(options.noglobstar)throw new Error("base matching requires globstar");pattern="**/"+pattern}self.silent=!!options.silent,self.pattern=pattern,self.strict=options.strict!==!1,self.realpath=!!options.realpath,self.realpathCache=options.realpathCache||Object.create(null),self.follow=!!options.follow,self.dot=!!options.dot,self.mark=!!options.mark,self.nodir=!!options.nodir,self.nodir&&(self.mark=!0),self.sync=!!options.sync,self.nounique=!!options.nounique,self.nonull=!!options.nonull,self.nosort=!!options.nosort,self.nocase=!!options.nocase,self.stat=!!options.stat,self.noprocess=!!options.noprocess,self.absolute=!!options.absolute,self.fs=options.fs||fs,self.maxLength=options.maxLength||1/0,self.cache=options.cache||Object.create(null),self.statCache=options.statCache||Object.create(null),self.symlinks=options.symlinks||Object.create(null),setupIgnores(self,options),self.changedCwd=!1;var cwd=process.cwd();ownProp(options,"cwd")?(self.cwd=path.resolve(options.cwd),self.changedCwd=self.cwd!==cwd):self.cwd=path.resolve(cwd),self.root=options.root||path.resolve(self.cwd,"/"),self.root=path.resolve(self.root),self.cwdAbs=isAbsolute(self.cwd)?self.cwd:makeAbs(self,self.cwd),self.nomount=!!options.nomount,process.platform==="win32"&&(self.root=self.root.replace(/\\/g,"/"),self.cwd=self.cwd.replace(/\\/g,"/"),self.cwdAbs=self.cwdAbs.replace(/\\/g,"/")),options.nonegate=!0,options.nocomment=!0,options.allowWindowsEscape=!0,self.minimatch=new Minimatch(pattern,options),self.options=self.minimatch.options}function finish(self){for(var nou=self.nounique,all=nou?[]:Object.create(null),i=0,l=self.matches.length;i<l;i++){var matches=self.matches[i];if(!matches||Object.keys(matches).length===0){if(self.nonull){var literal=self.minimatch.globSet[i];nou?all.push(literal):all[literal]=!0}}else{var m=Object.keys(matches);nou?all.push.apply(all,m):m.forEach(function(m2){all[m2]=!0})}}if(nou||(all=Object.keys(all)),self.nosort||(all=all.sort(alphasort)),self.mark){for(var i=0;i<all.length;i++)all[i]=self._mark(all[i]);self.nodir&&(all=all.filter(function(e){var notDir=!/\/$/.test(e),c=self.cache[e]||self.cache[makeAbs(self,e)];return notDir&&c&&(notDir=c!=="DIR"&&!Array.isArray(c)),notDir}))}self.ignore.length&&(all=all.filter(function(m2){return!isIgnored(self,m2)})),self.found=all}function mark(self,p){var abs=makeAbs(self,p),c=self.cache[abs],m=p;if(c){var isDir=c==="DIR"||Array.isArray(c),slash=p.slice(-1)==="/";if(isDir&&!slash?m+="/":!isDir&&slash&&(m=m.slice(0,-1)),m!==p){var mabs=makeAbs(self,m);self.statCache[mabs]=self.statCache[abs],self.cache[mabs]=self.cache[abs]}}return m}function makeAbs(self,f){var abs=f;return f.charAt(0)==="/"?abs=path.join(self.root,f):isAbsolute(f)||f===""?abs=f:self.changedCwd?abs=path.resolve(self.cwd,f):abs=path.resolve(f),process.platform==="win32"&&(abs=abs.replace(/\\/g,"/")),abs}function isIgnored(self,path2){return self.ignore.length?self.ignore.some(function(item){return item.matcher.match(path2)||!!(item.gmatcher&&item.gmatcher.match(path2))}):!1}function childrenIgnored(self,path2){return self.ignore.length?self.ignore.some(function(item){return!!(item.gmatcher&&item.gmatcher.match(path2))}):!1}}});var require_sync=__commonJS({"../../node_modules/.pnpm/glob@8.0.3/node_modules/glob/sync.js"(exports,module){module.exports=globSync;globSync.GlobSync=GlobSync;var rp=require_fs(),minimatch=require_minimatch2(),Minimatch=minimatch.Minimatch,Glob=require_glob().Glob,util=__require("util"),path=__require("path"),assert=__require("assert"),isAbsolute=__require("path").isAbsolute,common=require_common2(),setopts=common.setopts,ownProp=common.ownProp,childrenIgnored=common.childrenIgnored,isIgnored=common.isIgnored;function globSync(pattern,options){if(typeof options=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
51
- See: https://github.com/isaacs/node-glob/issues/167`);return new GlobSync(pattern,options).found}function GlobSync(pattern,options){if(!pattern)throw new Error("must provide pattern");if(typeof options=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
52
- See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof GlobSync))return new GlobSync(pattern,options);if(setopts(this,pattern,options),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}GlobSync.prototype._finish=function(){if(assert.ok(this instanceof GlobSync),this.realpath){var self=this;this.matches.forEach(function(matchset,index){var set=self.matches[index]=Object.create(null);for(var p in matchset)try{p=self._makeAbs(p);var real=rp.realpathSync(p,self.realpathCache);set[real]=!0}catch(er){if(er.syscall==="stat")set[self._makeAbs(p)]=!0;else throw er}})}common.finish(this)};GlobSync.prototype._process=function(pattern,index,inGlobStar){assert.ok(this instanceof GlobSync);for(var n=0;typeof pattern[n]=="string";)n++;var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n),read;prefix===null?read=".":((isAbsolute(prefix)||isAbsolute(pattern.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!prefix||!isAbsolute(prefix))&&(prefix="/"+prefix),read=prefix);var abs=this._makeAbs(read);if(!childrenIgnored(this,read)){var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar):this._processReaddir(prefix,read,abs,remain,index,inGlobStar)}};GlobSync.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar){var entries=this._readdir(abs,inGlobStar);if(entries){for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||rawGlob.charAt(0)===".",matchedEntries=[],i=0;i<entries.length;i++){var e=entries[i];if(e.charAt(0)!=="."||dotOk){var m;negate&&!prefix?m=!e.match(pn):m=e.match(pn),m&&matchedEntries.push(e)}}var len=matchedEntries.length;if(len!==0){if(remain.length===1&&!this.mark&&!this.stat){this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix.slice(-1)!=="/"?e=prefix+"/"+e:e=prefix+e),e.charAt(0)==="/"&&!this.nomount&&(e=path.join(this.root,e)),this._emitMatch(index,e)}return}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i],newPattern;prefix?newPattern=[prefix,e]:newPattern=[e],this._process(newPattern.concat(remain),index,inGlobStar)}}}};GlobSync.prototype._emitMatch=function(index,e){if(!isIgnored(this,e)){var abs=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=abs),!this.matches[index][e]){if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=!0,this.stat&&this._stat(e)}}};GlobSync.prototype._readdirInGlobStar=function(abs){if(this.follow)return this._readdir(abs,!1);var entries,lstat,stat;try{lstat=this.fs.lstatSync(abs)}catch(er){if(er.code==="ENOENT")return null}var isSym=lstat&&lstat.isSymbolicLink();return this.symlinks[abs]=isSym,!isSym&&lstat&&!lstat.isDirectory()?this.cache[abs]="FILE":entries=this._readdir(abs,!1),entries};GlobSync.prototype._readdir=function(abs,inGlobStar){var entries;if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return null;if(Array.isArray(c))return c}try{return this._readdirEntries(abs,this.fs.readdirSync(abs))}catch(er){return this._readdirError(abs,er),null}};GlobSync.prototype._readdirEntries=function(abs,entries){if(!this.mark&&!this.stat)for(var i=0;i<entries.length;i++){var e=entries[i];abs==="/"?e=abs+e:e=abs+"/"+e,this.cache[e]=!0}return this.cache[abs]=entries,entries};GlobSync.prototype._readdirError=function(f,er){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);if(this.cache[abs]="FILE",abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);throw error.path=this.cwd,error.code=er.code,error}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=!1;break;default:if(this.cache[this._makeAbs(f)]=!1,this.strict)throw er;this.silent||console.error("glob error",er);break}};GlobSync.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar){var entries=this._readdir(abs,inGlobStar);if(entries){var remainWithoutGlobStar=remain.slice(1),gspref=prefix?[prefix]:[],noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,!1);var len=entries.length,isSym=this.symlinks[abs];if(!(isSym&&inGlobStar))for(var i=0;i<len;i++){var e=entries[i];if(!(e.charAt(0)==="."&&!this.dot)){var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,!0);var below=gspref.concat(entries[i],remain);this._process(below,index,!0)}}}};GlobSync.prototype._processSimple=function(prefix,index){var exists=this._stat(prefix);if(this.matches[index]||(this.matches[index]=Object.create(null)),!!exists){if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);prefix.charAt(0)==="/"?prefix=path.join(this.root,prefix):(prefix=path.resolve(this.root,prefix),trail&&(prefix+="/"))}process.platform==="win32"&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix)}};GlobSync.prototype._stat=function(f){var abs=this._makeAbs(f),needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return!1;if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||c==="DIR")return c;if(needDir&&c==="FILE")return!1}var exists,stat=this.statCache[abs];if(!stat){var lstat;try{lstat=this.fs.lstatSync(abs)}catch(er){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR"))return this.statCache[abs]=!1,!1}if(lstat&&lstat.isSymbolicLink())try{stat=this.fs.statSync(abs)}catch{stat=lstat}else stat=lstat}this.statCache[abs]=stat;var c=!0;return stat&&(c=stat.isDirectory()?"DIR":"FILE"),this.cache[abs]=this.cache[abs]||c,needDir&&c==="FILE"?!1:c};GlobSync.prototype._mark=function(p){return common.mark(this,p)};GlobSync.prototype._makeAbs=function(f){return common.makeAbs(this,f)}}});var require_inflight=__commonJS({"../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports,module){var wrappy=require_wrappy(),reqs=Object.create(null),once=require_once();module.exports=wrappy(inflight);function inflight(key,cb){return reqs[key]?(reqs[key].push(cb),null):(reqs[key]=[cb],makeres(key))}function makeres(key){return once(function RES(){var cbs=reqs[key],len=cbs.length,args=slice(arguments);try{for(var i=0;i<len;i++)cbs[i].apply(null,args)}finally{cbs.length>len?(cbs.splice(0,len),process.nextTick(function(){RES.apply(null,args)})):delete reqs[key]}})}function slice(args){for(var length=args.length,array=[],i=0;i<length;i++)array[i]=args[i];return array}}});var require_glob=__commonJS({"../../node_modules/.pnpm/glob@8.0.3/node_modules/glob/glob.js"(exports,module){module.exports=glob;var rp=require_fs(),minimatch=require_minimatch2(),Minimatch=minimatch.Minimatch,inherits=require_inherits(),EE=__require("events").EventEmitter,path=__require("path"),assert=__require("assert"),isAbsolute=__require("path").isAbsolute,globSync=require_sync(),common=require_common2(),setopts=common.setopts,ownProp=common.ownProp,inflight=require_inflight(),util=__require("util"),childrenIgnored=common.childrenIgnored,isIgnored=common.isIgnored,once=require_once();function glob(pattern,options,cb){if(typeof options=="function"&&(cb=options,options={}),options||(options={}),options.sync){if(cb)throw new TypeError("callback provided to sync glob");return globSync(pattern,options)}return new Glob(pattern,options,cb)}glob.sync=globSync;var GlobSync=glob.GlobSync=globSync.GlobSync;glob.glob=glob;function extend(origin,add){if(add===null||typeof add!="object")return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}glob.hasMagic=function(pattern,options_){var options=extend({},options_);options.noprocess=!0;var g=new Glob(pattern,options),set=g.minimatch.set;if(!pattern)return!1;if(set.length>1)return!0;for(var j=0;j<set[0].length;j++)if(typeof set[0][j]!="string")return!0;return!1};glob.Glob=Glob;inherits(Glob,EE);function Glob(pattern,options,cb){if(typeof options=="function"&&(cb=options,options=null),options&&options.sync){if(cb)throw new TypeError("callback provided to sync glob");return new GlobSync(pattern,options)}if(!(this instanceof Glob))return new Glob(pattern,options,cb);setopts(this,pattern,options),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof cb=="function"&&(cb=once(cb),this.on("error",cb),this.on("end",function(matches){cb(null,matches)}));var self=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return done();for(var sync=!0,i=0;i<n;i++)this._process(this.minimatch.set[i],i,!1,done);sync=!1;function done(){--self._processing,self._processing<=0&&(sync?process.nextTick(function(){self._finish()}):self._finish())}}Glob.prototype._finish=function(){if(assert(this instanceof Glob),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();common.finish(this),this.emit("end",this.found)}};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var n=this.matches.length;if(n===0)return this._finish();for(var self=this,i=0;i<this.matches.length;i++)this._realpathSet(i,next);function next(){--n===0&&self._finish()}};Glob.prototype._realpathSet=function(index,cb){var matchset=this.matches[index];if(!matchset)return cb();var found=Object.keys(matchset),self=this,n=found.length;if(n===0)return cb();var set=this.matches[index]=Object.create(null);found.forEach(function(p,i){p=self._makeAbs(p),rp.realpath(p,self.realpathCache,function(er,real){er?er.syscall==="stat"?set[p]=!0:self.emit("error",er):set[real]=!0,--n===0&&(self.matches[index]=set,cb())})})};Glob.prototype._mark=function(p){return common.mark(this,p)};Glob.prototype._makeAbs=function(f){return common.makeAbs(this,f)};Glob.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Glob.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Glob.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var eq=this._emitQueue.slice(0);this._emitQueue.length=0;for(var i=0;i<eq.length;i++){var e=eq[i];this._emitMatch(e[0],e[1])}}if(this._processQueue.length){var pq=this._processQueue.slice(0);this._processQueue.length=0;for(var i=0;i<pq.length;i++){var p=pq[i];this._processing--,this._process(p[0],p[1],p[2],p[3])}}}};Glob.prototype._process=function(pattern,index,inGlobStar,cb){if(assert(this instanceof Glob),assert(typeof cb=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([pattern,index,inGlobStar,cb]);return}for(var n=0;typeof pattern[n]=="string";)n++;var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index,cb);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n),read;prefix===null?read=".":((isAbsolute(prefix)||isAbsolute(pattern.map(function(p){return typeof p=="string"?p:"[*]"}).join("/")))&&(!prefix||!isAbsolute(prefix))&&(prefix="/"+prefix),read=prefix);var abs=this._makeAbs(read);if(childrenIgnored(this,read))return cb();var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar,cb):this._processReaddir(prefix,read,abs,remain,index,inGlobStar,cb)}};Glob.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar,cb){var self=this;this._readdir(abs,inGlobStar,function(er,entries){return self._processReaddir2(prefix,read,abs,remain,index,inGlobStar,entries,cb)})};Glob.prototype._processReaddir2=function(prefix,read,abs,remain,index,inGlobStar,entries,cb){if(!entries)return cb();for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||rawGlob.charAt(0)===".",matchedEntries=[],i=0;i<entries.length;i++){var e=entries[i];if(e.charAt(0)!=="."||dotOk){var m;negate&&!prefix?m=!e.match(pn):m=e.match(pn),m&&matchedEntries.push(e)}}var len=matchedEntries.length;if(len===0)return cb();if(remain.length===1&&!this.mark&&!this.stat){this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;i<len;i++){var e=matchedEntries[i];prefix&&(prefix!=="/"?e=prefix+"/"+e:e=prefix+e),e.charAt(0)==="/"&&!this.nomount&&(e=path.join(this.root,e)),this._emitMatch(index,e)}return cb()}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i],newPattern;prefix&&(prefix!=="/"?e=prefix+"/"+e:e=prefix+e),this._process([e].concat(remain),index,inGlobStar,cb)}cb()};Glob.prototype._emitMatch=function(index,e){if(!this.aborted&&!isIgnored(this,e)){if(this.paused){this._emitQueue.push([index,e]);return}var abs=isAbsolute(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=abs),!this.matches[index][e]){if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=!0;var st=this.statCache[abs];st&&this.emit("stat",e,st),this.emit("match",e)}}};Glob.prototype._readdirInGlobStar=function(abs,cb){if(this.aborted)return;if(this.follow)return this._readdir(abs,!1,cb);var lstatkey="lstat\0"+abs,self=this,lstatcb=inflight(lstatkey,lstatcb_);lstatcb&&self.fs.lstat(abs,lstatcb);function lstatcb_(er,lstat){if(er&&er.code==="ENOENT")return cb();var isSym=lstat&&lstat.isSymbolicLink();self.symlinks[abs]=isSym,!isSym&&lstat&&!lstat.isDirectory()?(self.cache[abs]="FILE",cb()):self._readdir(abs,!1,cb)}};Glob.prototype._readdir=function(abs,inGlobStar,cb){if(!this.aborted&&(cb=inflight("readdir\0"+abs+"\0"+inGlobStar,cb),!!cb)){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs,cb);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return cb();if(Array.isArray(c))return cb(null,c)}var self=this;self.fs.readdir(abs,readdirCb(this,abs,cb))}};function readdirCb(self,abs,cb){return function(er,entries){er?self._readdirError(abs,er,cb):self._readdirEntries(abs,entries,cb)}}Glob.prototype._readdirEntries=function(abs,entries,cb){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<entries.length;i++){var e=entries[i];abs==="/"?e=abs+e:e=abs+"/"+e,this.cache[e]=!0}return this.cache[abs]=entries,cb(null,entries)}};Glob.prototype._readdirError=function(f,er,cb){if(!this.aborted){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);if(this.cache[abs]="FILE",abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);error.path=this.cwd,error.code=er.code,this.emit("error",error),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=!1;break;default:this.cache[this._makeAbs(f)]=!1,this.strict&&(this.emit("error",er),this.abort()),this.silent||console.error("glob error",er);break}return cb()}};Glob.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar,cb){var self=this;this._readdir(abs,inGlobStar,function(er,entries){self._processGlobStar2(prefix,read,abs,remain,index,inGlobStar,entries,cb)})};Glob.prototype._processGlobStar2=function(prefix,read,abs,remain,index,inGlobStar,entries,cb){if(!entries)return cb();var remainWithoutGlobStar=remain.slice(1),gspref=prefix?[prefix]:[],noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,!1,cb);var isSym=this.symlinks[abs],len=entries.length;if(isSym&&inGlobStar)return cb();for(var i=0;i<len;i++){var e=entries[i];if(!(e.charAt(0)==="."&&!this.dot)){var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,!0,cb);var below=gspref.concat(entries[i],remain);this._process(below,index,!0,cb)}}cb()};Glob.prototype._processSimple=function(prefix,index,cb){var self=this;this._stat(prefix,function(er,exists){self._processSimple2(prefix,index,er,exists,cb)})};Glob.prototype._processSimple2=function(prefix,index,er,exists,cb){if(this.matches[index]||(this.matches[index]=Object.create(null)),!exists)return cb();if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);prefix.charAt(0)==="/"?prefix=path.join(this.root,prefix):(prefix=path.resolve(this.root,prefix),trail&&(prefix+="/"))}process.platform==="win32"&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix),cb()};Glob.prototype._stat=function(f,cb){var abs=this._makeAbs(f),needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return cb();if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||c==="DIR")return cb(null,c);if(needDir&&c==="FILE")return cb()}var exists,stat=this.statCache[abs];if(stat!==void 0){if(stat===!1)return cb(null,stat);var type=stat.isDirectory()?"DIR":"FILE";return needDir&&type==="FILE"?cb():cb(null,type,stat)}var self=this,statcb=inflight("stat\0"+abs,lstatcb_);statcb&&self.fs.lstat(abs,statcb);function lstatcb_(er,lstat){if(lstat&&lstat.isSymbolicLink())return self.fs.stat(abs,function(er2,stat2){er2?self._stat2(f,abs,null,lstat,cb):self._stat2(f,abs,er2,stat2,cb)});self._stat2(f,abs,er,lstat,cb)}};Glob.prototype._stat2=function(f,abs,er,stat,cb){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR"))return this.statCache[abs]=!1,cb();var needDir=f.slice(-1)==="/";if(this.statCache[abs]=stat,abs.slice(-1)==="/"&&stat&&!stat.isDirectory())return cb(null,!1,stat);var c=!0;return stat&&(c=stat.isDirectory()?"DIR":"FILE"),this.cache[abs]=this.cache[abs]||c,needDir&&c==="FILE"?cb():cb(null,c,stat)}}});var require_unicode=__commonJS({"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/unicode.js"(exports,module){module.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;module.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;module.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/}});var require_util=__commonJS({"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/util.js"(exports,module){var unicode=require_unicode();module.exports={isSpaceSeparator(c){return typeof c=="string"&&unicode.Space_Separator.test(c)},isIdStartChar(c){return typeof c=="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c==="$"||c==="_"||unicode.ID_Start.test(c))},isIdContinueChar(c){return typeof c=="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c>="0"&&c<="9"||c==="$"||c==="_"||c==="\u200C"||c==="\u200D"||unicode.ID_Continue.test(c))},isDigit(c){return typeof c=="string"&&/[0-9]/.test(c)},isHexDigit(c){return typeof c=="string"&&/[0-9A-Fa-f]/.test(c)}}}});var require_parse=__commonJS({"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/parse.js"(exports,module){var util=require_util(),source,parseState,stack,pos,line,column,token,key,root;module.exports=function(text,reviver){source=String(text),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do token=lex(),parseStates[parseState]();while(token.type!=="eof");return typeof reviver=="function"?internalize({"":root},"",reviver):root};function internalize(holder,name,reviver){let value=holder[name];if(value!=null&&typeof value=="object")if(Array.isArray(value))for(let i=0;i<value.length;i++){let key2=String(i),replacement=internalize(value,key2,reviver);replacement===void 0?delete value[key2]:Object.defineProperty(value,key2,{value:replacement,writable:!0,enumerable:!0,configurable:!0})}else for(let key2 in value){let replacement=internalize(value,key2,reviver);replacement===void 0?delete value[key2]:Object.defineProperty(value,key2,{value:replacement,writable:!0,enumerable:!0,configurable:!0})}return reviver.call(holder,name,value)}var lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();let token2=lexStates[lexState]();if(token2)return token2}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){let c2=peek();return c2===`
53
- `?(line++,column=0):c2?column+=c2.length:column++,c2&&(pos+=c2.length),c2}var lexStates={default(){switch(c){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
54
- `:case"\r":case"\u2028":case"\u2029":read();return;case"/":read(),lexState="comment";return;case void 0:return read(),newToken("eof")}if(util.isSpaceSeparator(c)){read();return}return lexStates[parseState]()},comment(){switch(c){case"*":read(),lexState="multiLineComment";return;case"/":read(),lexState="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(c){case"*":read(),lexState="multiLineCommentAsterisk";return;case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":read();return;case"/":read(),lexState="default";return;case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case`
55
- `:case"\r":case"\u2028":case"\u2029":read(),lexState="default";return;case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":read()==="-"&&(sign=-1),lexState="sign";return;case".":buffer=read(),lexState="decimalPointLeading";return;case"0":buffer=read(),lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read(),lexState="decimalInteger";return;case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":doubleQuote=read()==='"',buffer="",lexState="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(c!=="u")throw invalidChar(read());read();let u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier();break}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"\u200C":case"\u200D":buffer+=read();return;case"\\":read(),lexState="identifierNameEscape";return}if(util.isIdContinueChar(c)){buffer+=read();return}return newToken("identifier",buffer)},identifierNameEscape(){if(c!=="u")throw invalidChar(read());read();let u=unicodeEscape();switch(u){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier();break}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":buffer=read(),lexState="decimalPointLeading";return;case"0":buffer=read(),lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read(),lexState="decimalInteger";return;case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":buffer+=read(),lexState="decimalPoint";return;case"e":case"E":buffer+=read(),lexState="decimalExponent";return;case"x":case"X":buffer+=read(),lexState="hexadecimal";return}return newToken("numeric",sign*0)},decimalInteger(){switch(c){case".":buffer+=read(),lexState="decimalPoint";return;case"e":case"E":buffer+=read(),lexState="decimalExponent";return}if(util.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},decimalPointLeading(){if(util.isDigit(c)){buffer+=read(),lexState="decimalFraction";return}throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":buffer+=read(),lexState="decimalExponent";return}if(util.isDigit(c)){buffer+=read(),lexState="decimalFraction";return}return newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":buffer+=read(),lexState="decimalExponent";return}if(util.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},decimalExponent(){switch(c){case"+":case"-":buffer+=read(),lexState="decimalExponentSign";return}if(util.isDigit(c)){buffer+=read(),lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c)){buffer+=read(),lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(util.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},hexadecimal(){if(util.isHexDigit(c)){buffer+=read(),lexState="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(util.isHexDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},string(){switch(c){case"\\":read(),buffer+=escape();return;case'"':if(doubleQuote)return read(),newToken("string",buffer);buffer+=read();return;case"'":if(!doubleQuote)return read(),newToken("string",buffer);buffer+=read();return;case`
56
- `:case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":buffer=read(),lexState="identifierName";return;case"\\":read(),lexState="identifierNameStartEscape";return;case"}":return newToken("punctuator",read());case'"':case"'":doubleQuote=read()==='"',lexState="string";return}if(util.isIdStartChar(c)){buffer+=read(),lexState="identifierName";return}throw invalidChar(read())},afterPropertyName(){if(c===":")return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if(c==="]")return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(type,value){return{type,value,line,column}}function literal(s){for(let c2 of s){if(peek()!==c2)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),`
57
- `;case"r":return read(),"\r";case"t":return read()," ";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case`
58
- `:case"\u2028":case"\u2029":return read(),"";case"\r":return read(),peek()===`
59
- `&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case void 0:throw invalidChar(read())}return read()}function hexEscape(){let buffer2="",c2=peek();if(!util.isHexDigit(c2)||(buffer2+=read(),c2=peek(),!util.isHexDigit(c2)))throw invalidChar(read());return buffer2+=read(),String.fromCodePoint(parseInt(buffer2,16))}function unicodeEscape(){let buffer2="",count=4;for(;count-- >0;){let c2=peek();if(!util.isHexDigit(c2))throw invalidChar(read());buffer2+=read()}return String.fromCodePoint(parseInt(buffer2,16))}var parseStates={start(){if(token.type==="eof")throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":key=token.value,parseState="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(token.type==="eof")throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if(token.type==="eof")throw invalidEOF();push()},beforeArrayValue(){if(token.type==="eof")throw invalidEOF();if(token.type==="punctuator"&&token.value==="]"){pop();return}push()},afterPropertyValue(){if(token.type==="eof")throw invalidEOF();switch(token.value){case",":parseState="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(token.type==="eof")throw invalidEOF();switch(token.value){case",":parseState="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let value;switch(token.type){case"punctuator":switch(token.value){case"{":value={};break;case"[":value=[];break}break;case"null":case"boolean":case"numeric":case"string":value=token.value;break}if(root===void 0)root=value;else{let parent=stack[stack.length-1];Array.isArray(parent)?parent.push(value):Object.defineProperty(parent,key,{value,writable:!0,enumerable:!0,configurable:!0})}if(value!==null&&typeof value=="object")stack.push(value),Array.isArray(value)?parseState="beforeArrayValue":parseState="beforePropertyName";else{let current=stack[stack.length-1];current==null?parseState="end":Array.isArray(current)?parseState="afterArrayValue":parseState="afterPropertyValue"}}function pop(){stack.pop();let current=stack[stack.length-1];current==null?parseState="end":Array.isArray(current)?parseState="afterArrayValue":parseState="afterPropertyValue"}function invalidChar(c2){return syntaxError(c2===void 0?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return column-=5,syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)}function separatorChar(c2){console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(c2){let replacements={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(replacements[c2])return replacements[c2];if(c2<" "){let hexString=c2.charCodeAt(0).toString(16);return"\\x"+("00"+hexString).substring(hexString.length)}return c2}function syntaxError(message){let err=new SyntaxError(message);return err.lineNumber=line,err.columnNumber=column,err}}});var require_stringify=__commonJS({"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/stringify.js"(exports,module){var util=require_util();module.exports=function(value,replacer,space){let stack=[],indent="",propertyList,replacerFunc,gap="",quote;if(replacer!=null&&typeof replacer=="object"&&!Array.isArray(replacer)&&(space=replacer.space,quote=replacer.quote,replacer=replacer.replacer),typeof replacer=="function")replacerFunc=replacer;else if(Array.isArray(replacer)){propertyList=[];for(let v of replacer){let item;typeof v=="string"?item=v:(typeof v=="number"||v instanceof String||v instanceof Number)&&(item=String(v)),item!==void 0&&propertyList.indexOf(item)<0&&propertyList.push(item)}}return space instanceof Number?space=Number(space):space instanceof String&&(space=String(space)),typeof space=="number"?space>0&&(space=Math.min(10,Math.floor(space)),gap=" ".substr(0,space)):typeof space=="string"&&(gap=space.substr(0,10)),serializeProperty("",{"":value});function serializeProperty(key,holder){let value2=holder[key];switch(value2!=null&&(typeof value2.toJSON5=="function"?value2=value2.toJSON5(key):typeof value2.toJSON=="function"&&(value2=value2.toJSON(key))),replacerFunc&&(value2=replacerFunc.call(holder,key,value2)),value2 instanceof Number?value2=Number(value2):value2 instanceof String?value2=String(value2):value2 instanceof Boolean&&(value2=value2.valueOf()),value2){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof value2=="string")return quoteString(value2,!1);if(typeof value2=="number")return String(value2);if(typeof value2=="object")return Array.isArray(value2)?serializeArray(value2):serializeObject(value2)}function quoteString(value2){let quotes={"'":.1,'"':.2},replacements={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},product="";for(let i=0;i<value2.length;i++){let c=value2[i];switch(c){case"'":case'"':quotes[c]++,product+=c;continue;case"\0":if(util.isDigit(value2[i+1])){product+="\\x00";continue}}if(replacements[c]){product+=replacements[c];continue}if(c<" "){let hexString=c.charCodeAt(0).toString(16);product+="\\x"+("00"+hexString).substring(hexString.length);continue}product+=c}let quoteChar=quote||Object.keys(quotes).reduce((a,b)=>quotes[a]<quotes[b]?a:b);return product=product.replace(new RegExp(quoteChar,"g"),replacements[quoteChar]),quoteChar+product+quoteChar}function serializeObject(value2){if(stack.indexOf(value2)>=0)throw TypeError("Converting circular structure to JSON5");stack.push(value2);let stepback=indent;indent=indent+gap;let keys=propertyList||Object.keys(value2),partial=[];for(let key of keys){let propertyString=serializeProperty(key,value2);if(propertyString!==void 0){let member=serializeKey(key)+":";gap!==""&&(member+=" "),member+=propertyString,partial.push(member)}}let final;if(partial.length===0)final="{}";else{let properties;if(gap==="")properties=partial.join(","),final="{"+properties+"}";else{let separator=`,
60
- `+indent;properties=partial.join(separator),final=`{
61
- `+indent+properties+`,
62
- `+stepback+"}"}}return stack.pop(),indent=stepback,final}function serializeKey(key){if(key.length===0)return quoteString(key,!0);let firstChar=String.fromCodePoint(key.codePointAt(0));if(!util.isIdStartChar(firstChar))return quoteString(key,!0);for(let i=firstChar.length;i<key.length;i++)if(!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i))))return quoteString(key,!0);return key}function serializeArray(value2){if(stack.indexOf(value2)>=0)throw TypeError("Converting circular structure to JSON5");stack.push(value2);let stepback=indent;indent=indent+gap;let partial=[];for(let i=0;i<value2.length;i++){let propertyString=serializeProperty(String(i),value2);partial.push(propertyString!==void 0?propertyString:"null")}let final;if(partial.length===0)final="[]";else if(gap==="")final="["+partial.join(",")+"]";else{let separator=`,
63
- `+indent,properties=partial.join(separator);final=`[
64
- `+indent+properties+`,
65
- `+stepback+"]"}return stack.pop(),indent=stepback,final}}}});var require_lib=__commonJS({"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/index.js"(exports,module){var parse=require_parse(),stringify=require_stringify(),JSON5={parse,stringify};module.exports=JSON5}});var require_get_glob_fs=__commonJS({"../fs-detectors/dist/workspaces/get-glob-fs.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),get_glob_fs_exports={};__export(get_glob_fs_exports,{getGlobFs:()=>getGlobFs});module.exports=__toCommonJS(get_glob_fs_exports);var import_fs=__toESM(__require("fs"));function removeWindowsPrefix(path){return path.replace(/^[a-zA-Z]:/,"")}function getGlobFs(_fs){let readdir=(path,callback)=>{_fs.readdir(removeWindowsPrefix(String(path))).then(stats=>callback(null,stats.map(stat2=>stat2.name))).catch(err=>callback(err,[]))},stat=(path,callback)=>{_fs.isFile(removeWindowsPrefix(String(path))).then(isPathAFile=>{callback(null,{ino:0,mode:0,nlink:0,uid:0,gid:0,rdev:0,size:0,blksize:0,blocks:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date,mtime:new Date,ctime:new Date,birthtime:new Date,dev:0,isBlockDevice:()=>!1,isCharacterDevice:()=>!1,isDirectory:()=>!isPathAFile,isFIFO:()=>!1,isFile:()=>isPathAFile,isSocket:()=>!1,isSymbolicLink:()=>!1})}).catch(err=>callback(err,null))};return new Proxy(import_fs.default,{get(_target,prop){switch(prop){case"readdir":return readdir;case"lstat":case"stat":return stat;default:throw new Error("Not Implemented")}}})}}});var require_get_workspace_package_paths=__commonJS({"../fs-detectors/dist/workspaces/get-workspace-package-paths.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),get_workspace_package_paths_exports={};__export(get_workspace_package_paths_exports,{getWorkspacePackagePaths:()=>getWorkspacePackagePaths2});module.exports=__toCommonJS(get_workspace_package_paths_exports);var import_path=__toESM(__require("path")),import_js_yaml=__toESM(require_js_yaml()),import_glob=__toESM(require_glob()),import_json5=__toESM(require_lib()),import_get_glob_fs=require_get_glob_fs(),posixPath=import_path.default.posix;async function getWorkspacePackagePaths2({fs,workspace}){let{type,rootPath}=workspace,workspaceFs=fs.chdir(rootPath),results=[];switch(type){case"yarn":case"npm":results=await getPackageJsonWorkspacePackagePaths({fs:workspaceFs});break;case"pnpm":results=await getPnpmWorkspacePackagePaths({fs:workspaceFs});break;case"nx":results=await getNxWorkspacePackagePaths({fs:workspaceFs});break;case"rush":results=await getRushWorkspacePackagePaths({fs:workspaceFs});break;default:throw new Error(`Unknown workspace implementation: ${type}`)}return results.map(packagePath=>posixPath.join(rootPath,posixPath.dirname(packagePath)))}var isWin=process.platform==="win32",normalizePath=p=>isWin?p.replace(/\\/g,"/"):p;async function getPackagePaths(packages,fs){return(await Promise.all(packages.map(packageGlob=>new Promise((resolve,reject)=>{(0,import_glob.default)(normalizePath(posixPath.join(packageGlob,"package.json")),{cwd:"/",fs:(0,import_get_glob_fs.getGlobFs)(fs)},(err,matches)=>{err?reject(err):resolve(matches)})})))).flat()}async function getPackageJsonWorkspacePackagePaths({fs}){let packageJsonAsBuffer=await fs.readFile("package.json"),{workspaces}=JSON.parse(packageJsonAsBuffer.toString()),packages=[];return Array.isArray(workspaces)?packages=workspaces:packages=workspaces?.packages??[],getPackagePaths(packages,fs)}async function getNxWorkspacePackagePaths({fs}){let nxWorkspaceJsonAsBuffer=await fs.readFile("workspace.json"),{projects}=JSON.parse(nxWorkspaceJsonAsBuffer.toString()),packages=Object.values(projects);return getPackagePaths(packages,fs)}async function getPnpmWorkspacePackagePaths({fs}){let pnpmWorkspaceAsBuffer=await fs.readFile("pnpm-workspace.yaml"),{packages=[]}=import_js_yaml.default.load(pnpmWorkspaceAsBuffer.toString());return getPackagePaths(packages,fs)}async function getRushWorkspacePackagePaths({fs}){let rushWorkspaceAsBuffer=await fs.readFile("rush.json"),{projects=[]}=import_json5.default.parse(rushWorkspaceAsBuffer.toString());if(Array.isArray(projects)){let packages=projects.filter(proj=>proj.projectFolder).map(project=>project.projectFolder);return getPackagePaths(packages,fs)}else return[]}}});var require_monorepo_managers=__commonJS({"../fs-detectors/dist/monorepos/monorepo-managers.js"(exports,module){"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),monorepo_managers_exports={};__export(monorepo_managers_exports,{default:()=>monorepo_managers_default,monorepoManagers:()=>monorepoManagers2});module.exports=__toCommonJS(monorepo_managers_exports);var monorepoManagers2=[{name:"Turborepo",slug:"turbo",logo:"https://api-frameworks.vercel.sh/monorepo-logos/turborepo.svg",darkModeLogo:"https://api-frameworks.vercel.sh/monorepo-logos/turborepo-dark.svg",detectors:{some:[{path:"turbo.json"},{path:"turbo.jsonc"},{path:"package.json",matchContent:'"turbo":\\s*{[^}]*.+[^}]*}'}]},settings:{buildCommand:{placeholder:"Turborepo default",value:null},outputDirectory:{value:null},installCommand:{value:null},devCommand:{value:null}}},{name:"Nx",slug:"nx",logo:"https://api-frameworks.vercel.sh/monorepo-logos/nx.svg",detectors:{every:[{path:"nx.json"}]},settings:{buildCommand:{placeholder:"Nx default",value:null},outputDirectory:{value:null},installCommand:{value:null},devCommand:{value:null}}},{name:"Rush",slug:"rush",logo:"https://api-frameworks.vercel.sh/monorepo-logos/rush.svg",detectors:{every:[{path:"rush.json"}]},settings:{buildCommand:{placeholder:"Rush default",value:null},outputDirectory:{value:null},installCommand:{placeholder:"Rush default"},devCommand:{value:null}}}],monorepo_managers_default=monorepoManagers2}});var require_package_managers=__commonJS({"../fs-detectors/dist/package-managers/package-managers.js"(exports,module){"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),package_managers_exports={};__export(package_managers_exports,{packageManagers:()=>packageManagers2});module.exports=__toCommonJS(package_managers_exports);var packageManagers2=[{name:"npm",slug:"npm",logo:"",darkModeLogo:"",detectors:{some:[{path:"package-lock.json"},{path:"package.json",matchContent:'"packageManager":\\s*"npm@.*"'}]}},{name:"pnpm",slug:"pnpm",logo:"",darkModeLogo:"",detectors:{some:[{path:"pnpm-lock.yaml"},{path:"package.json",matchContent:'"packageManager":\\s*"pnpm@.*"'}]}},{name:"bun",slug:"bun",logo:"",darkModeLogo:"",detectors:{some:[{path:"bun.lockb"},{path:"bun.lock"},{path:"package.json",matchContent:'"packageManager":\\s*"bun@.*"'}]}},{name:"yarn",slug:"yarn",logo:"",darkModeLogo:"",detectors:{some:[{path:"yarn.lock"},{path:"package.json",matchContent:'"packageManager":\\s*"yarn@.*"'},{path:"package.json"}]}}]}});var require_get_monorepo_default_settings=__commonJS({"../fs-detectors/dist/monorepos/get-monorepo-default-settings.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),get_monorepo_default_settings_exports={};__export(get_monorepo_default_settings_exports,{MissingBuildPipeline:()=>MissingBuildPipeline,MissingBuildTarget:()=>MissingBuildTarget,getMonorepoDefaultSettings:()=>getMonorepoDefaultSettings});module.exports=__toCommonJS(get_monorepo_default_settings_exports);var import_path=__require("path"),import_monorepo_managers=require_monorepo_managers(),import_package_managers=require_package_managers(),import_detect_framework=require_detect_framework(),import_json5=__toESM(require_lib()),import_semver=__toESM(require_semver()),MissingBuildPipeline=class extends Error{constructor(usesTasks){let message=usesTasks?"Missing required `build` task in turbo.json.":"Missing required `build` pipeline in turbo.json or package.json Turbo configuration.";super(message)}},MissingBuildTarget=class extends Error{constructor(){super("Missing required `build` target in either nx.json, project.json, or package.json Nx configuration.")}};function supportsRootCommand(turboSemVer){return!turboSemVer||!import_semver.default.validRange(turboSemVer)?!1:!import_semver.default.intersects(turboSemVer,"<1.8.0")}function supportsFilter(turboSemVer){return!turboSemVer||!import_semver.default.validRange(turboSemVer)?!0:!import_semver.default.intersects(turboSemVer,"<=1.1.0")}async function getMonorepoDefaultSettings(projectName,projectPath,relativeToRoot,detectorFilesystem){let[monorepoManager,packageManager]=await Promise.all([(0,import_detect_framework.detectFramework)({fs:detectorFilesystem,frameworkList:import_monorepo_managers.monorepoManagers}),(0,import_detect_framework.detectFramework)({fs:detectorFilesystem,frameworkList:import_package_managers.packageManagers})]);if(monorepoManager==="turbo"){let[turboJSONBuf,turboJSONCBuf,packageJSONBuf]=await Promise.all([detectorFilesystem.readFile("turbo.json").catch(()=>null),detectorFilesystem.readFile("turbo.jsonc").catch(()=>null),detectorFilesystem.readFile("package.json").catch(()=>null)]),hasBuildPipeline=!1,hasTurboTasks=!1,turboSemVer=null,turboConfigBuf=turboJSONBuf||turboJSONCBuf;if(turboConfigBuf!==null){let turboJSON=import_json5.default.parse(turboConfigBuf.toString("utf-8"));hasTurboTasks="tasks"in(turboJSON||{}),(turboJSON?.pipeline?.build||turboJSON?.tasks?.build)&&(hasBuildPipeline=!0)}if(packageJSONBuf!==null){let packageJSON=JSON.parse(packageJSONBuf.toString("utf-8"));packageJSON?.turbo?.pipeline?.build&&(hasBuildPipeline=!0),turboSemVer=packageJSON?.dependencies?.turbo||packageJSON?.devDependencies?.turbo||null}if(!hasBuildPipeline)throw new MissingBuildPipeline(hasTurboTasks);if(projectPath==="/")return{monorepoManager:"turbo",buildCommand:"turbo run build",installCommand:packageManager?`${packageManager} install`:null,commandForIgnoringBuildStep:"npx turbo-ignore"};let buildCommand=null;return projectPath&&(supportsRootCommand(turboSemVer)?buildCommand="turbo run build":supportsFilter(turboSemVer)?buildCommand=`cd ${relativeToRoot} && turbo run build --filter={${projectPath}}...`:buildCommand=`cd ${relativeToRoot} && turbo run build --scope=${projectName}`),{monorepoManager:"turbo",buildCommand,installCommand:packageManager==="npm"?`${packageManager} install --prefix=${relativeToRoot}`:packageManager?`${packageManager} install`:null,commandForIgnoringBuildStep:"npx turbo-ignore"}}else if(monorepoManager==="nx"){let nxJSONBuf=await detectorFilesystem.readFile("nx.json");if(!import_json5.default.parse(nxJSONBuf.toString("utf-8"))?.targetDefaults?.build){let[projectJSONBuf,packageJSONBuf]=await Promise.all([detectorFilesystem.readFile((0,import_path.join)(projectPath,"project.json")).catch(()=>null),detectorFilesystem.readFile((0,import_path.join)(projectPath,"package.json")).catch(()=>null)]),hasBuildTarget=!1;if(projectJSONBuf&&import_json5.default.parse(projectJSONBuf.toString("utf-8"))?.targets?.build&&(hasBuildTarget=!0),packageJSONBuf){let packageJSON=import_json5.default.parse(packageJSONBuf.toString("utf-8"));packageJSON?.nx&&packageJSON.nx.targets?.build&&(hasBuildTarget=!0)}if(!hasBuildTarget)throw new MissingBuildTarget}return projectPath==="/"?{monorepoManager:"nx",buildCommand:"npx nx build",installCommand:packageManager?`${packageManager} install`:null}:{monorepoManager:"nx",buildCommand:projectName?`cd ${relativeToRoot} && npx nx build ${projectName}`:null,installCommand:packageManager==="npm"?`${packageManager} install --prefix=${relativeToRoot}`:packageManager?`${packageManager} install`:null}}return null}}});var require_detect_instrumentation=__commonJS({"../fs-detectors/dist/detect-instrumentation.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),detect_instrumentation_exports={};__export(detect_instrumentation_exports,{detectInstrumentation:()=>detectInstrumentation2});module.exports=__toCommonJS(detect_instrumentation_exports);var import_semver=__toESM(require_semver()),VERCEL_OTEL="@vercel/otel",OPENTELEMETRY_SDK_TRACE_NODE="@opentelemetry/sdk-trace-node",OPENTELEMETRY_API="@opentelemetry/api",tracingDependencies=[{name:VERCEL_OTEL,minVersion:"1.11.0"},{name:OPENTELEMETRY_SDK_TRACE_NODE,minVersion:"1.19.0"},{name:OPENTELEMETRY_API,minVersion:"1.7.0"}];async function detectInstrumentation2(fs){if(await fs.hasPath("package.json")===!1||await fs.isFile("package.json")===!1)return!1;let packageJsonContent=(await fs.readFile("package.json")).toString(),hasInstrumentation=!1;for(let dependency of tracingDependencies){let regex=new RegExp(`"(dev)?(d|D)ependencies":\\s*{[^}]*"${dependency.name}":\\s*"(.+?)"[^}]*}`,"m"),match=packageJsonContent.match(regex);if(match&&match[3]){let cleanVersion=match[3].replace(/[\^~]/,"");if(import_semver.default.valid(cleanVersion)&&import_semver.default.gte(cleanVersion,dependency.minVersion)){console.log(`Detected OpenTelemetry dependency: ${dependency.name}@${cleanVersion}, which meets the minimum version requirement of ${dependency.minVersion}`),hasInstrumentation=!0;break}}}return hasInstrumentation}}});var require_dist5=__commonJS({"../fs-detectors/dist/index.js"(exports,module){"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,{DetectorFilesystem:()=>import_filesystem.DetectorFilesystem,GetWorkspaceOptions:()=>import_get_workspaces.GetWorkspaceOptions,GetWorkspacePackagePathsOptions:()=>import_get_workspace_package_paths.GetWorkspacePackagePathsOptions,INTERNAL_SERVICE_PREFIX:()=>import_utils.INTERNAL_SERVICE_PREFIX,LocalFileSystemDetector:()=>import_local_file_system_detector.LocalFileSystemDetector,REGEX_NON_VERCEL_PLATFORM_FILES:()=>import_detect_builders2.REGEX_NON_VERCEL_PLATFORM_FILES,Workspace:()=>import_get_workspaces.Workspace,WorkspaceType:()=>import_get_workspaces.WorkspaceType,autoDetectServices:()=>import_auto_detect.autoDetectServices,builderToFrameworks:()=>import_detect_builders.builderToFrameworks,detectApiDirectory:()=>import_detect_builders.detectApiDirectory,detectApiExtensions:()=>import_detect_builders.detectApiExtensions,detectBuilders:()=>import_detect_builders.detectBuilders,detectFileSystemAPI:()=>import_detect_file_system_api.detectFileSystemAPI,detectFramework:()=>import_detect_framework.detectFramework,detectFrameworkRecord:()=>import_detect_framework.detectFrameworkRecord,detectFrameworkVersion:()=>import_detect_framework.detectFrameworkVersion,detectFrameworks:()=>import_detect_framework.detectFrameworks,detectInstrumentation:()=>import_detect_instrumentation.detectInstrumentation,detectOutputDirectory:()=>import_detect_builders.detectOutputDirectory,detectServices:()=>import_detect_services.detectServices,generateServiceRewrites:()=>import_detect_services.generateServiceRewrites,generateServicesRoutes:()=>import_detect_services.generateServicesRoutes,getInternalServiceCronPath:()=>import_utils.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_utils.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_utils.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_utils.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_utils.getInternalServiceWorkerPathPrefix,getProjectPaths:()=>import_get_project_paths.getProjectPaths,getProxyBuilder:()=>import_detect_builders.getProxyBuilder,getWorkspacePackagePaths:()=>import_get_workspace_package_paths.getWorkspacePackagePaths,getWorkspaces:()=>import_get_workspaces.getWorkspaces,hasLegacyServicesConfig:()=>import_migrate.hasLegacyServicesConfig,isExperimentalService:()=>import_build_utils.isExperimentalService,isExperimentalServiceV2:()=>import_build_utils.isExperimentalServiceV2,isOfficialRuntime:()=>import_is_official_runtime.isOfficialRuntime,isRouteOwningBuilder:()=>import_utils.isRouteOwningBuilder,isStaticBuild:()=>import_utils.isStaticBuild,isStaticRuntime:()=>import_is_official_runtime.isStaticRuntime,migrateExperimentalServices:()=>import_migrate.migrateExperimentalServices,monorepoManagers:()=>import_monorepo_managers.monorepoManagers,packageManagers:()=>import_package_managers.packageManagers,planExperimentalServicesMigration:()=>import_migrate.planExperimentalServicesMigration,resolveAllConfiguredServices:()=>import_resolve.resolveAllConfiguredServices,resolveAllConfiguredServicesV2:()=>import_resolve_v2.resolveAllConfiguredServicesV2,resolveConfiguredServiceV2:()=>import_resolve_v2.resolveConfiguredServiceV2,validateProxy:()=>import_detect_builders.validateProxy,validateProxyConfig:()=>import_detect_builders.validateProxyConfig,validateServiceConfigV2:()=>import_resolve_v2.validateServiceConfigV2,workspaceManagers:()=>import_workspace_managers.workspaceManagers});module.exports=__toCommonJS(src_exports);var import_detect_builders=require_detect_builders(),import_detect_services=require_detect_services(),import_resolve_v2=require_resolve_v2(),import_resolve=require_resolve(),import_migrate=require_migrate(),import_build_utils=__require("@vercel/build-utils"),import_auto_detect=require_auto_detect(),import_utils=require_utils(),import_detect_file_system_api=require_detect_file_system_api(),import_detect_framework=require_detect_framework(),import_get_project_paths=require_get_project_paths(),import_filesystem=require_filesystem(),import_local_file_system_detector=require_local_file_system_detector(),import_workspace_managers=require_workspace_managers(),import_get_workspaces=require_get_workspaces(),import_get_workspace_package_paths=require_get_workspace_package_paths(),import_monorepo_managers=require_monorepo_managers(),import_is_official_runtime=require_is_official_runtime(),import_package_managers=require_package_managers();__reExport(src_exports,require_get_monorepo_default_settings(),module.exports);var import_detect_builders2=require_detect_builders(),import_detect_instrumentation=require_detect_instrumentation()}});export{require_brace_expansion,require_minimatch,require_constants,require_framework,require_dist4 as require_dist,require_minimatch2,require_dist5 as require_dist2};