dal-code 1.0.51 → 1.0.52

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 (131) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/NOTICE +17 -1
  3. package/dist/bundle/chunks/{anthropic-messages-2P3UGLIO.js → anthropic-messages-NK5NGKAI.js} +1 -1
  4. package/dist/bundle/chunks/{azure-openai-responses-S4GNH2XC.js → azure-openai-responses-VEASENYL.js} +1 -1
  5. package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
  6. package/dist/bundle/chunks/{chunk-B7NRFMLU.js → chunk-4VJJ6NXH.js} +1 -1
  7. package/dist/bundle/chunks/{chunk-FCKLBLA4.js → chunk-6EEJ4MZH.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-H5FHS6BV.js → chunk-A5CI3CVQ.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-CFPQOC7P.js → chunk-AAQZXQA7.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-GSGE3ULF.js → chunk-ANL2BCIQ.js} +1 -1
  11. package/dist/bundle/chunks/{chunk-VNHNHA4V.js → chunk-CS4T4O5O.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-PWZRJWNP.js → chunk-DLKRCASW.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-AL7NZVPP.js → chunk-HEFI7NO7.js} +1 -1
  14. package/dist/bundle/chunks/{chunk-R44HF4S5.js → chunk-KJW3E2CB.js} +1 -1
  15. package/dist/bundle/chunks/chunk-ON7ZX67F.js +30 -0
  16. package/dist/bundle/chunks/{chunk-BEDAM2M7.js → chunk-OQWPBJCS.js} +1 -1
  17. package/dist/bundle/chunks/{chunk-ATQJO2OE.js → chunk-TK2WJTRC.js} +1 -1
  18. package/dist/bundle/chunks/{chunk-RR3ZP63P.js → chunk-UVKMBM5X.js} +2 -2
  19. package/dist/bundle/chunks/{chunk-RCVVRHMF.js → chunk-WIZGOHKY.js} +1 -1
  20. package/dist/bundle/chunks/{chunk-HXK5EFBE.js → chunk-XAS5HHBW.js} +284 -276
  21. package/dist/bundle/chunks/{chunk-2KOJ4RNS.js → chunk-XDBGA662.js} +1 -1
  22. package/dist/bundle/chunks/chunk-YWNDPXVM.js +25 -0
  23. package/dist/bundle/chunks/{cli-ZEDY5U67.js → cli-GXB5WYKG.js} +1 -1
  24. package/dist/bundle/chunks/{cli-FWMQKBFA.js → cli-YPE3BB5X.js} +1 -1
  25. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-E6TEENDO.js → cloudflare-workers-ai-system-one-B7WOBGWO.js} +1 -1
  26. package/dist/bundle/chunks/{execute-62LDYHXA.js → execute-27QCJECT.js} +1 -1
  27. package/dist/bundle/chunks/{google-generative-ai-V5DLXTF7.js → google-generative-ai-MBMRBHSZ.js} +1 -1
  28. package/dist/bundle/chunks/{google-vertex-K3KYGGLI.js → google-vertex-S2ZFBDPP.js} +1 -1
  29. package/dist/bundle/chunks/{llama-cpp-classify-JCTIEHTL.js → llama-cpp-classify-S4LVGNNY.js} +1 -1
  30. package/dist/bundle/chunks/{mcp-VF7EY5WC.js → mcp-6LJKGKJQ.js} +1 -1
  31. package/dist/bundle/chunks/{mistral-conversations-LVBXTF6R.js → mistral-conversations-C7LUXIEY.js} +1 -1
  32. package/dist/bundle/chunks/{office-PONBADQP.js → office-5OWKTZOA.js} +1 -1
  33. package/dist/bundle/chunks/{openai-codex-responses-WBZKNYLX.js → openai-codex-responses-YQQXJ24E.js} +1 -1
  34. package/dist/bundle/chunks/{openai-completions-HMHQRGX4.js → openai-completions-7CMH2FKD.js} +1 -1
  35. package/dist/bundle/chunks/{openai-decisions-R7OFRKLL.js → openai-decisions-AOGZTREY.js} +1 -1
  36. package/dist/bundle/chunks/{openai-responses-BHXRQFCI.js → openai-responses-ZSOGZ3MK.js} +1 -1
  37. package/dist/bundle/chunks/{openrouter-images-BIMNIXQZ.js → openrouter-images-AHXST2TH.js} +1 -1
  38. package/dist/bundle/chunks/{pi-messages-X5YTLXQJ.js → pi-messages-QERJLMZ6.js} +1 -1
  39. package/dist/bundle/chunks/{review-WCGIBVLM.js → review-5G56KIWY.js} +1 -1
  40. package/dist/bundle/chunks/{router-7E5LU7US.js → router-776Z7G7G.js} +1 -1
  41. package/dist/bundle/chunks/{runtime-5PTUOEM2.js → runtime-NKPT25KD.js} +1 -1
  42. package/dist/bundle/chunks/{sdk-ZUFIGPSS.js → sdk-TVC4GDUX.js} +1 -1
  43. package/dist/bundle/chunks/sync-JBDC3YBK.js +7 -0
  44. package/dist/bundle/chunks/{typesafe-system-one-KOIOG3HP.js → typesafe-system-one-MMNGGQ46.js} +1 -1
  45. package/dist/bundle/chunks/{usage-2EVEFGNI.js → usage-BDCIALHO.js} +1 -1
  46. package/dist/bundle/chunks/{virtual-modules-MYMONT3Y.js → virtual-modules-25RQ6XTV.js} +1 -1
  47. package/dist/bundle/cli-runtime.js +1 -1
  48. package/dist/bundle/index.js +1 -1
  49. package/dist/bundle/rpc-entry.js +1 -1
  50. package/dist/dal/builtins.js +2 -2
  51. package/dist/dal/manifest.d.ts +1 -0
  52. package/dist/dal/manifest.js +1 -1
  53. package/dist/dal/safety-net.js +11 -3
  54. package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
  55. package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
  56. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  57. package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
  58. package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
  59. package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
  60. package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
  61. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  62. package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
  63. package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
  64. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  65. package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
  66. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  67. package/dist/node_modules/@dalcode/dal-learn/package.json +4 -2
  68. package/dist/node_modules/@dalcode/dal-learn/src/engine.js +4 -4
  69. package/dist/node_modules/@dalcode/dal-learn/src/extract.js +31 -5
  70. package/dist/node_modules/@dalcode/dal-learn/src/index.js +15 -15
  71. package/dist/node_modules/@dalcode/dal-learn/src/learn-mode.js +1 -0
  72. package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +4 -3
  73. package/dist/node_modules/@dalcode/dal-learn/src/project-map.js +2 -2
  74. package/dist/node_modules/@dalcode/dal-learn/src/safety.js +2 -2
  75. package/dist/node_modules/@dalcode/dal-learn/src/signals.js +6 -5
  76. package/dist/node_modules/@dalcode/dal-learn/src/store.js +3 -2
  77. package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
  78. package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
  79. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  80. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +3 -3
  81. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  82. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +3 -3
  83. package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
  84. package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
  85. package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
  86. package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
  87. package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
  88. package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
  89. package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
  90. package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
  91. package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
  92. package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
  93. package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
  94. package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
  95. package/dist/node_modules/@dalcode/dal-sync/src/core.js +2 -2
  96. package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
  97. package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
  98. package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
  99. package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
  100. package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
  101. package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
  102. package/dist/node_modules/@dalcode/dal-workflow/src/todo-snapshot.js +2 -2
  103. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  104. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  105. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  106. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  107. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  108. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  109. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  110. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  111. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  112. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  113. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
  114. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
  115. package/dist/node_modules/@earendil-works/pi-ai/package.json +3 -3
  116. package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  117. package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  118. package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
  119. package/dist/node_modules/@earendil-works/pi-schema/package.json +1 -1
  120. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  121. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  122. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  123. package/examples/extensions/gondolin/package-lock.json +2 -2
  124. package/examples/extensions/gondolin/package.json +1 -1
  125. package/examples/extensions/with-deps/package-lock.json +2 -2
  126. package/examples/extensions/with-deps/package.json +1 -1
  127. package/npm-shrinkwrap.json +2 -2
  128. package/package.json +1 -1
  129. package/dist/bundle/chunks/chunk-JE6UXK35.js +0 -30
  130. package/dist/bundle/chunks/chunk-NUIR7PPD.js +0 -25
  131. package/dist/bundle/chunks/sync-LOX6TIM6.js +0 -4
@@ -1,4 +1,4 @@
1
- var Ha=Object.defineProperty;var p=(e,t)=>Ha(e,"name",{value:t,configurable:!0});import{createRequire as Va}from"node:module";const Fy=Va(import.meta.url);import{require_safe_buffer as Bt}from"./chunk-567OJLS7.js";import{getJsonSchemaToolParameters as $a,resolveJsonSchemaStrictSampling as tn,transformMessages as Ja}from"./chunk-FCKLBLA4.js";import{sanitizeSurrogates as St}from"./chunk-L2ZPNLYD.js";import{retryProviderRequest as Wa}from"./chunk-ML5DIOWR.js";import{clampThinkingLevel as Xa,collapseSystemMessages as Ka,withoutInitialSystemMessage as Ya}from"./chunk-ATQJO2OE.js";import{__commonJS as z,__require as te,__toESM as ze}from"./chunk-JXWJOIH4.js";var za=z({"node_modules/retry/lib/retry_operation.js"(e,t){function r(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}p(r,"RetryOperation"),t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var o=this._timeouts.shift();if(o===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),o=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},o),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var o=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){o._operationTimeoutCb()},o._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},r.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,o=0,a=0;a<this._errors.length;a++){var c=this._errors[a],u=c.message,d=(n[u]||0)+1;n[u]=d,d>=o&&(i=c,o=d)}return i}}}),Qa=z({"node_modules/retry/lib/retry.js"(e){var t=za();e.operation=function(r){var n=e.timeouts(r);return new t(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},e.timeouts=function(r){if(r instanceof Array)return[].concat(r);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in r)n[i]=r[i];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<n.retries;a++)o.push(this.createTimeout(a,n));return r&&r.forever&&!o.length&&o.push(this.createTimeout(a,n)),o.sort(function(c,u){return c-u}),o},e.createTimeout=function(r,n){var i=n.randomize?Math.random()+1:1,o=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,r));return o=Math.min(o,n.maxTimeout),o},e.wrap=function(r,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var o in r)typeof r[o]=="function"&&i.push(o)}for(var a=0;a<i.length;a++){var c=i[a],u=r[c];r[c]=function(d){var h=e.operation(n),m=Array.prototype.slice.call(arguments,1),g=m.pop();m.push(function(_){h.retry(_)||(_&&(arguments[0]=h.mainError()),g.apply(this,arguments))}),h.attempt(function(){d.apply(r,m)})}.bind(r,u),r[c].options=n}}}}),Za=z({"node_modules/retry/index.js"(e,t){t.exports=Qa()}}),ja=z({"node_modules/p-retry/index.js"(e,t){"use strict";var r=Za(),n=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],i=class extends Error{static{p(this,"AbortError")}constructor(u){super(),u instanceof Error?(this.originalError=u,{message:u}=u):(this.originalError=new Error(u),this.originalError.stack=this.stack),this.name="AbortError",this.message=u}},o=p((u,d,h)=>{let m=h.retries-(d-1);return u.attemptNumber=d,u.retriesLeft=m,u},"decorateErrorWithCounts"),a=p(u=>n.includes(u),"isNetworkError"),c=p((u,d)=>new Promise((h,m)=>{d={onFailedAttempt:p(()=>{},"onFailedAttempt"),retries:10,...d};let g=r.operation(d);g.attempt(async _=>{try{h(await u(_))}catch(f){if(!(f instanceof Error)){m(new TypeError(`Non-error was thrown: "${f}". You should only throw errors.`));return}if(f instanceof i)g.stop(),m(f.originalError);else if(f instanceof TypeError&&!a(f.message))g.stop(),m(f);else{o(f,_,d);try{await d.onFailedAttempt(f)}catch(y){m(y);return}g.retry(f)||m(g.mainError())}}})}),"pRetry2");t.exports=c,t.exports.default=c,t.exports.AbortError=i}}),rn=z({"node_modules/extend/index.js"(e,t){"use strict";var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=p(function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},"isArray"),c=p(function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=r.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&r.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!g)return!1;var _;for(_ in h);return typeof _>"u"||r.call(h,_)},"isPlainObject2"),u=p(function(h,m){i&&m.name==="__proto__"?i(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},"setProperty"),d=p(function(h,m){if(m==="__proto__")if(r.call(h,m)){if(o)return o(h,m).value}else return;return h[m]},"getProperty");t.exports=p(function h(){var m,g,_,f,y,E,C=arguments[0],S=1,A=arguments.length,v=!1;for(typeof C=="boolean"&&(v=C,C=arguments[1]||{},S=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});S<A;++S)if(m=arguments[S],m!=null)for(g in m)_=d(C,g),f=d(m,g),C!==f&&(v&&f&&(c(f)||(y=a(f)))?(y?(y=!1,E=_&&a(_)?_:[]):E=_&&c(_)?_:{},u(C,{name:g,newValue:h(v,E,f)})):typeof f<"u"&&u(C,{name:g,newValue:f}));return C},"extend")}}),el=z({"node_modules/gaxios/package.json"(e,t){t.exports={name:"gaxios",version:"7.1.4",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/node":"^22.13.1","@types/sinon":"^17.0.3","@types/tmp":"^0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.1.3",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.2","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}}}),tl=z({"node_modules/gaxios/build/cjs/src/util.cjs"(e,t){"use strict";var r=el();t.exports={pkg:r}}}),nn=z({"node_modules/gaxios/build/cjs/src/common.js"(e){"use strict";var t=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.GaxiosError=e.GAXIOS_ERROR_SYMBOL=void 0,e.defaultErrorRedactor=c;var r=t(rn()),n=t(tl()),i=n.default.pkg;e.GAXIOS_ERROR_SYMBOL=Symbol.for(`${i.name}-gaxios-error`);var o=class wa extends Error{static{p(this,"_GaxiosError")}config;response;code;status;error;[e.GAXIOS_ERROR_SYMBOL]=i.version;static[Symbol.hasInstance](d){return d&&typeof d=="object"&&e.GAXIOS_ERROR_SYMBOL in d&&d[e.GAXIOS_ERROR_SYMBOL]===i.version?!0:Function.prototype[Symbol.hasInstance].call(wa,d)}constructor(d,h,m,g){if(super(d,{cause:g}),this.config=h,this.response=m,this.error=g instanceof Error?g:void 0,this.config=(0,r.default)(!0,{},h),this.response&&(this.response.config=(0,r.default)(!0,{},this.response.config)),this.response){try{this.response.data=a(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}g instanceof DOMException?this.code=g.name:g&&typeof g=="object"&&"code"in g&&(typeof g.code=="string"||typeof g.code=="number")&&(this.code=g.code)}static extractAPIErrorFromResponse(d,h="The request failed"){let m=h;if(typeof d.data=="string"&&(m=d.data),d.data&&typeof d.data=="object"&&"error"in d.data&&d.data.error&&!d.ok){if(typeof d.data.error=="string")return{message:d.data.error,code:d.status,status:d.statusText};if(typeof d.data.error=="object"){m="message"in d.data.error&&typeof d.data.error.message=="string"?d.data.error.message:m;let g="status"in d.data.error&&typeof d.data.error.status=="string"?d.data.error.status:d.statusText,_="code"in d.data.error&&typeof d.data.error.code=="number"?d.data.error.code:d.status;if("errors"in d.data.error&&Array.isArray(d.data.error.errors)){let f=[];for(let y of d.data.error.errors)typeof y=="object"&&"message"in y&&typeof y.message=="string"&&f.push(y.message);return Object.assign({message:f.join(`
1
+ var Ha=Object.defineProperty;var p=(e,t)=>Ha(e,"name",{value:t,configurable:!0});import{createRequire as Va}from"node:module";const Fy=Va(import.meta.url);import{require_safe_buffer as Bt}from"./chunk-567OJLS7.js";import{getJsonSchemaToolParameters as $a,resolveJsonSchemaStrictSampling as tn,transformMessages as Ja}from"./chunk-6EEJ4MZH.js";import{sanitizeSurrogates as St}from"./chunk-L2ZPNLYD.js";import{retryProviderRequest as Wa}from"./chunk-ML5DIOWR.js";import{clampThinkingLevel as Xa,collapseSystemMessages as Ka,withoutInitialSystemMessage as Ya}from"./chunk-TK2WJTRC.js";import{__commonJS as z,__require as te,__toESM as ze}from"./chunk-JXWJOIH4.js";var za=z({"node_modules/retry/lib/retry_operation.js"(e,t){function r(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}p(r,"RetryOperation"),t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var o=this._timeouts.shift();if(o===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),o=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},o),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var o=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){o._operationTimeoutCb()},o._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},r.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,o=0,a=0;a<this._errors.length;a++){var c=this._errors[a],u=c.message,d=(n[u]||0)+1;n[u]=d,d>=o&&(i=c,o=d)}return i}}}),Qa=z({"node_modules/retry/lib/retry.js"(e){var t=za();e.operation=function(r){var n=e.timeouts(r);return new t(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},e.timeouts=function(r){if(r instanceof Array)return[].concat(r);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in r)n[i]=r[i];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<n.retries;a++)o.push(this.createTimeout(a,n));return r&&r.forever&&!o.length&&o.push(this.createTimeout(a,n)),o.sort(function(c,u){return c-u}),o},e.createTimeout=function(r,n){var i=n.randomize?Math.random()+1:1,o=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,r));return o=Math.min(o,n.maxTimeout),o},e.wrap=function(r,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var o in r)typeof r[o]=="function"&&i.push(o)}for(var a=0;a<i.length;a++){var c=i[a],u=r[c];r[c]=function(d){var h=e.operation(n),m=Array.prototype.slice.call(arguments,1),g=m.pop();m.push(function(_){h.retry(_)||(_&&(arguments[0]=h.mainError()),g.apply(this,arguments))}),h.attempt(function(){d.apply(r,m)})}.bind(r,u),r[c].options=n}}}}),Za=z({"node_modules/retry/index.js"(e,t){t.exports=Qa()}}),ja=z({"node_modules/p-retry/index.js"(e,t){"use strict";var r=Za(),n=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],i=class extends Error{static{p(this,"AbortError")}constructor(u){super(),u instanceof Error?(this.originalError=u,{message:u}=u):(this.originalError=new Error(u),this.originalError.stack=this.stack),this.name="AbortError",this.message=u}},o=p((u,d,h)=>{let m=h.retries-(d-1);return u.attemptNumber=d,u.retriesLeft=m,u},"decorateErrorWithCounts"),a=p(u=>n.includes(u),"isNetworkError"),c=p((u,d)=>new Promise((h,m)=>{d={onFailedAttempt:p(()=>{},"onFailedAttempt"),retries:10,...d};let g=r.operation(d);g.attempt(async _=>{try{h(await u(_))}catch(f){if(!(f instanceof Error)){m(new TypeError(`Non-error was thrown: "${f}". You should only throw errors.`));return}if(f instanceof i)g.stop(),m(f.originalError);else if(f instanceof TypeError&&!a(f.message))g.stop(),m(f);else{o(f,_,d);try{await d.onFailedAttempt(f)}catch(y){m(y);return}g.retry(f)||m(g.mainError())}}})}),"pRetry2");t.exports=c,t.exports.default=c,t.exports.AbortError=i}}),rn=z({"node_modules/extend/index.js"(e,t){"use strict";var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=p(function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},"isArray"),c=p(function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=r.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&r.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!g)return!1;var _;for(_ in h);return typeof _>"u"||r.call(h,_)},"isPlainObject2"),u=p(function(h,m){i&&m.name==="__proto__"?i(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},"setProperty"),d=p(function(h,m){if(m==="__proto__")if(r.call(h,m)){if(o)return o(h,m).value}else return;return h[m]},"getProperty");t.exports=p(function h(){var m,g,_,f,y,E,C=arguments[0],S=1,A=arguments.length,v=!1;for(typeof C=="boolean"&&(v=C,C=arguments[1]||{},S=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});S<A;++S)if(m=arguments[S],m!=null)for(g in m)_=d(C,g),f=d(m,g),C!==f&&(v&&f&&(c(f)||(y=a(f)))?(y?(y=!1,E=_&&a(_)?_:[]):E=_&&c(_)?_:{},u(C,{name:g,newValue:h(v,E,f)})):typeof f<"u"&&u(C,{name:g,newValue:f}));return C},"extend")}}),el=z({"node_modules/gaxios/package.json"(e,t){t.exports={name:"gaxios",version:"7.1.4",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/node":"^22.13.1","@types/sinon":"^17.0.3","@types/tmp":"^0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.1.3",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.2","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}}}),tl=z({"node_modules/gaxios/build/cjs/src/util.cjs"(e,t){"use strict";var r=el();t.exports={pkg:r}}}),nn=z({"node_modules/gaxios/build/cjs/src/common.js"(e){"use strict";var t=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.GaxiosError=e.GAXIOS_ERROR_SYMBOL=void 0,e.defaultErrorRedactor=c;var r=t(rn()),n=t(tl()),i=n.default.pkg;e.GAXIOS_ERROR_SYMBOL=Symbol.for(`${i.name}-gaxios-error`);var o=class wa extends Error{static{p(this,"_GaxiosError")}config;response;code;status;error;[e.GAXIOS_ERROR_SYMBOL]=i.version;static[Symbol.hasInstance](d){return d&&typeof d=="object"&&e.GAXIOS_ERROR_SYMBOL in d&&d[e.GAXIOS_ERROR_SYMBOL]===i.version?!0:Function.prototype[Symbol.hasInstance].call(wa,d)}constructor(d,h,m,g){if(super(d,{cause:g}),this.config=h,this.response=m,this.error=g instanceof Error?g:void 0,this.config=(0,r.default)(!0,{},h),this.response&&(this.response.config=(0,r.default)(!0,{},this.response.config)),this.response){try{this.response.data=a(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}g instanceof DOMException?this.code=g.name:g&&typeof g=="object"&&"code"in g&&(typeof g.code=="string"||typeof g.code=="number")&&(this.code=g.code)}static extractAPIErrorFromResponse(d,h="The request failed"){let m=h;if(typeof d.data=="string"&&(m=d.data),d.data&&typeof d.data=="object"&&"error"in d.data&&d.data.error&&!d.ok){if(typeof d.data.error=="string")return{message:d.data.error,code:d.status,status:d.statusText};if(typeof d.data.error=="object"){m="message"in d.data.error&&typeof d.data.error.message=="string"?d.data.error.message:m;let g="status"in d.data.error&&typeof d.data.error.status=="string"?d.data.error.status:d.statusText,_="code"in d.data.error&&typeof d.data.error.code=="number"?d.data.error.code:d.status;if("errors"in d.data.error&&Array.isArray(d.data.error.errors)){let f=[];for(let y of d.data.error.errors)typeof y=="object"&&"message"in y&&typeof y.message=="string"&&f.push(y.message);return Object.assign({message:f.join(`
2
2
  `)||m,code:_,status:g},d.data.error)}return Object.assign({message:m,code:_,status:g},d.data.error)}}return{message:m,code:d.status,status:d.statusText}}};e.GaxiosError=o;function a(u,d){switch(u){case"stream":return d;case"json":return JSON.parse(JSON.stringify(d));case"arraybuffer":return JSON.parse(Buffer.from(d).toString("utf8"));case"blob":return JSON.parse(d.text());default:return d}}p(a,"translateData");function c(u){let d="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function h(_){_&&_.forEach((f,y)=>{(/^authentication$/i.test(y)||/^authorization$/i.test(y)||/secret/i.test(y))&&_.set(y,d)})}p(h,"redactHeaders");function m(_,f){if(typeof _=="object"&&_!==null&&typeof _[f]=="string"){let y=_[f];(/grant_type=/i.test(y)||/assertion=/i.test(y)||/secret/i.test(y))&&(_[f]=d)}}p(m,"redactString");function g(_){!_||typeof _!="object"||(_ instanceof FormData||_ instanceof URLSearchParams||"forEach"in _&&"set"in _?_.forEach((f,y)=>{(["grant_type","assertion"].includes(y)||/secret/.test(y))&&_.set(y,d)}):("grant_type"in _&&(_.grant_type=d),"assertion"in _&&(_.assertion=d),"client_secret"in _&&(_.client_secret=d)))}return p(g,"redactObject"),u.config&&(h(u.config.headers),m(u.config,"data"),g(u.config.data),m(u.config,"body"),g(u.config.body),u.config.url.searchParams.has("token")&&u.config.url.searchParams.set("token",d),u.config.url.searchParams.has("client_secret")&&u.config.url.searchParams.set("client_secret",d)),u.response&&(c({config:u.response.config}),h(u.response.headers),u.response.bodyUsed&&(m(u.response,"data"),g(u.response.data))),u}p(c,"defaultErrorRedactor")}}),rl=z({"node_modules/gaxios/build/cjs/src/retry.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRetryConfig=t;async function t(o){let a=n(o);if(!o||!o.config||!a&&!o.config.retry)return{shouldRetry:!1};a=a||{},a.currentRetryAttempt=a.currentRetryAttempt||0,a.retry=a.retry===void 0||a.retry===null?3:a.retry,a.httpMethodsToRetry=a.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],a.noResponseRetries=a.noResponseRetries===void 0||a.noResponseRetries===null?2:a.noResponseRetries,a.retryDelayMultiplier=a.retryDelayMultiplier?a.retryDelayMultiplier:2,a.timeOfFirstRequest=a.timeOfFirstRequest?a.timeOfFirstRequest:Date.now(),a.totalTimeout=a.totalTimeout?a.totalTimeout:Number.MAX_SAFE_INTEGER,a.maxRetryDelay=a.maxRetryDelay?a.maxRetryDelay:Number.MAX_SAFE_INTEGER;let c=[[100,199],[408,408],[429,429],[500,599]];if(a.statusCodesToRetry=a.statusCodesToRetry||c,o.config.retryConfig=a,!await(a.shouldRetry||r)(o))return{shouldRetry:!1,config:o.config};let u=i(a);o.config.retryConfig.currentRetryAttempt+=1;let d=a.retryBackoff?a.retryBackoff(o,u):new Promise(h=>{setTimeout(h,u)});return a.onRetryAttempt&&await a.onRetryAttempt(o),await d,{shouldRetry:!0,config:o.config}}p(t,"getRetryConfig");function r(o){let a=n(o);if(o.config.signal?.aborted&&o.code!=="TimeoutError"||o.code==="AbortError"||!a||a.retry===0||!o.response&&(a.currentRetryAttempt||0)>=a.noResponseRetries||!a.httpMethodsToRetry||!a.httpMethodsToRetry.includes(o.config.method?.toUpperCase()||"GET"))return!1;if(o.response&&o.response.status){let c=!1;for(let[u,d]of a.statusCodesToRetry){let h=o.response.status;if(h>=u&&h<=d){c=!0;break}}if(!c)return!1}return a.currentRetryAttempt=a.currentRetryAttempt||0,!(a.currentRetryAttempt>=a.retry)}p(r,"shouldRetryRequest");function n(o){if(o&&o.config&&o.config.retryConfig)return o.config.retryConfig}p(n,"getConfig");function i(o){let a=(o.currentRetryAttempt?0:o.retryDelay??100)+(Math.pow(o.retryDelayMultiplier,o.currentRetryAttempt)-1)/2*1e3,c=o.totalTimeout-(Date.now()-o.timeOfFirstRequest);return Math.min(a,c,o.maxRetryDelay)}p(i,"getNextRetryDelay")}}),on=z({"node_modules/gaxios/build/cjs/src/interceptor.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GaxiosInterceptorManager=void 0;var t=class extends Set{static{p(this,"GaxiosInterceptorManager")}};e.GaxiosInterceptorManager=t}}),nl=z({"node_modules/gaxios/build/cjs/src/gaxios.js"(e){"use strict";var t=e&&e.__importDefault||function(g){return g&&g.__esModule?g:{default:g}},r;Object.defineProperty(e,"__esModule",{value:!0}),e.Gaxios=void 0;var n=t(rn()),i=te("https"),o=nn(),a=rl(),c=te("stream"),u=on(),d=p(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),h=204,m=class{static{p(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(g){this.defaults=g||{},this.interceptors={request:new u.GaxiosInterceptorManager,response:new u.GaxiosInterceptorManager}}fetch(...g){let _=g[0],f=g[1],y,E=new Headers;return typeof _=="string"?y=new URL(_):_ instanceof URL?y=_:_&&_.url&&(y=new URL(_.url)),_&&typeof _=="object"&&"headers"in _&&r.mergeHeaders(E,_.headers),f&&r.mergeHeaders(E,new Headers(f.headers)),typeof _=="object"&&!(_ instanceof URL)?this.request({...f,..._,headers:E,url:y}):this.request({...f,headers:E,url:y})}async request(g={}){let _=await this.#n(g);return _=await this.#t(_),this.#r(this._request(_))}async _defaultAdapter(g){let _=g.fetchImplementation||this.defaults.fetchImplementation||await r.#l(),f={...g};delete f.data;let y=await _(g.url,f),E=await this.getResponseData(g,y);return Object.getOwnPropertyDescriptor(y,"data")?.configurable||Object.defineProperties(y,{data:{configurable:!0,writable:!0,enumerable:!0,value:E}}),Object.assign(y,{config:g,data:E})}async _request(g){try{let _;if(g.adapter?_=await g.adapter(g,this._defaultAdapter.bind(this)):_=await this._defaultAdapter(g),!g.validateStatus(_.status)){if(g.responseType==="stream"){let y=[];for await(let E of _.data)y.push(E);_.data=y.toString()}let f=o.GaxiosError.extractAPIErrorFromResponse(_,`Request failed with status code ${_.status}`);throw new o.GaxiosError(f?.message,g,_,f)}return _}catch(_){let f;_ instanceof o.GaxiosError?f=_:_ instanceof Error?f=new o.GaxiosError(_.message,g,void 0,_):f=new o.GaxiosError("Unexpected Gaxios Error",g,void 0,_);let{shouldRetry:y,config:E}=await(0,a.getRetryConfig)(f);if(y&&E)return f.config.retryConfig.currentRetryAttempt=E.retryConfig.currentRetryAttempt,g.retryConfig=f.config?.retryConfig,this.#i(g),this._request(g);throw g.errorRedactor&&g.errorRedactor(f),f}}async getResponseData(g,_){if(_.status===h)return"";if(g.maxContentLength&&_.headers.has("content-length")&&g.maxContentLength<Number.parseInt(_.headers?.get("content-length")||""))throw new o.GaxiosError("Response's `Content-Length` is over the limit.",g,Object.assign(_,{config:g}));switch(g.responseType){case"stream":return _.body;case"json":{let f=await _.text();try{return JSON.parse(f)}catch{return f}}case"arraybuffer":return _.arrayBuffer();case"blob":return _.blob();case"text":return _.text();default:return this.getResponseDataFromContentType(_)}}#e(g,_=[]){let f=new URL(g),y=[..._],E=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let C of E)y.push(C.trim());for(let C of y)if(C instanceof RegExp){if(C.test(f.toString()))return!1}else if(C instanceof URL){if(C.origin===f.origin)return!1}else if(C.startsWith("*.")||C.startsWith(".")){let S=C.replace(/^\*\./,".");if(f.hostname.endsWith(S))return!1}else if(C===f.origin||C===f.hostname||C===f.href)return!1;return!0}async#t(g){let _=Promise.resolve(g);for(let f of this.interceptors.request.values())f&&(_=_.then(f.resolved,f.rejected));return _}async#r(g){let _=Promise.resolve(g);for(let f of this.interceptors.response.values())f&&(_=_.then(f.resolved,f.rejected));return _}async#n(g){let _=new Headers(this.defaults.headers);r.mergeHeaders(_,g.headers);let f=(0,n.default)(!0,{},this.defaults,g);if(!f.url)throw new Error("URL is required.");if(f.baseURL&&(f.url=new URL(f.url,f.baseURL)),f.url=new URL(f.url),f.params)if(f.paramsSerializer){let C=f.paramsSerializer(f.params);C.startsWith("?")&&(C=C.slice(1));let S=f.url.toString().includes("?")?"&":"?";f.url=f.url+S+C}else{let C=f.url instanceof URL?f.url:new URL(f.url);for(let[S,A]of new URLSearchParams(f.params))C.searchParams.append(S,A);f.url=C}typeof g.maxContentLength=="number"&&(f.size=g.maxContentLength),typeof g.maxRedirects=="number"&&(f.follow=g.maxRedirects);let y=typeof f.data=="string"||f.data instanceof ArrayBuffer||f.data instanceof Blob||globalThis.File&&f.data instanceof File||f.data instanceof FormData||f.data instanceof c.Readable||f.data instanceof ReadableStream||f.data instanceof String||f.data instanceof URLSearchParams||ArrayBuffer.isView(f.data)||["Blob","File","FormData"].includes(f.data?.constructor?.name||"");if(f.multipart?.length){let C=await d();_.set("content-type",`multipart/related; boundary=${C}`),f.body=c.Readable.from(this.getMultipartRequest(f.multipart,C))}else y?f.body=f.data:typeof f.data=="object"?_.get("Content-Type")==="application/x-www-form-urlencoded"?f.body=f.paramsSerializer?f.paramsSerializer(f.data):new URLSearchParams(f.data):(_.has("content-type")||_.set("content-type","application/json"),f.body=JSON.stringify(f.data)):f.data&&(f.body=f.data);f.validateStatus=f.validateStatus||this.validateStatus,f.responseType=f.responseType||"unknown",!_.has("accept")&&f.responseType==="json"&&_.set("accept","application/json");let E=f.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!f.agent)if(E&&this.#e(f.url,f.noProxy)){let C=await r.#a();this.agentCache.has(E)?f.agent=this.agentCache.get(E):(f.agent=new C(E,{cert:f.cert,key:f.key}),this.agentCache.set(E,f.agent))}else f.cert&&f.key&&(this.agentCache.has(f.key)?f.agent=this.agentCache.get(f.key):(f.agent=new i.Agent({cert:f.cert,key:f.key}),this.agentCache.set(f.key,f.agent)));return typeof f.errorRedactor!="function"&&f.errorRedactor!==!1&&(f.errorRedactor=o.defaultErrorRedactor),f.body&&!("duplex"in f)&&(f.duplex="half"),this.#i(f),Object.assign(f,{headers:_,url:f.url instanceof URL?f.url:new URL(f.url)})}#i(g){if(g.timeout){let _=AbortSignal.timeout(g.timeout);g.signal&&!g.signal.aborted?g.signal=AbortSignal.any([g.signal,_]):g.signal=_}}validateStatus(g){return g>=200&&g<300}async getResponseDataFromContentType(g){let _=g.headers.get("Content-Type");if(_===null)return g.text();if(_=_.toLowerCase(),_.includes("application/json")){let f=await g.text();try{f=JSON.parse(f)}catch{}return f}else return _.match(/^text\//)?g.text():g.blob()}async*getMultipartRequest(g,_){let f=`--${_}--`;for(let y of g){let E=y.headers.get("Content-Type")||"application/octet-stream";yield`--${_}\r
3
3
  Content-Type: ${E}\r
4
4
  \r