edgeone 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/edgeone-dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
var lir=Object.create;var DU=Object.defineProperty;var pir=Object.getOwnPropertyDescriptor;var fir=Object.getOwnPropertyNames;var dir=Object.getPrototypeOf,hir=Object.prototype.hasOwnProperty;var mir=(t,e,r)=>e in t?DU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Yr=(t,e)=>()=>(t&&(e=t(t=0)),e);var R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Nj=(t,e)=>{for(var r in e)DU(t,r,{get:e[r],enumerable:!0})},VY=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fir(e))!hir.call(t,o)&&o!==r&&DU(t,o,{get:()=>e[o],enumerable:!(n=pir(e,o))||n.enumerable});return t},PU=(t,e,r)=>(VY(t,e,"default"),r&&VY(r,e,"default")),bt=(t,e,r)=>(r=t!=null?lir(dir(t)):{},VY(e||!t||!t.__esModule?DU(r,"default",{value:t,enumerable:!0}):r,t)),gir=t=>VY(DU({},"__esModule",{value:!0}),t);var Zo=(t,e,r)=>(mir(t,typeof e!="symbol"?e+"":e,r),r),nde=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var de=(t,e,r)=>(nde(t,e,"read from private field"),r?r.call(t):e.get(t)),Gr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},hr=(t,e,r,n)=>(nde(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var WY=(t,e,r,n)=>({set _(o){hr(t,e,o,r)},get _(){return de(t,e,n)}}),nn=(t,e,r)=>(nde(t,e,"access private method"),r);var z1,jU=Yr(()=>{z1={name:"edgeone",version:"1.7.1",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/config-schema.js","./edgeone-dist/edgeone.schema.json","./edgeone-dist/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./edgeone-dist/plugins/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",postbundle:"node ./scripts/check-bundle-test-data.js",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js","build:sandbox-tarball":"bash ./scripts/build-sandbox-tarball.sh","upload:sandbox-tarball":"node ./scripts/upload-sandbox-tarball.js","sync:sandbox-lock":"cd packaging/sandbox && npm install --package-lock-only --omit=dev",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@edgeone/nuxt-pages":"1.1.2-beta.1","@edgeone/opennextjs-pages":"0.2.10-beta.13","@edgeone/pages-agent-toolkit":"0.1.38","@edgeone/pages-blob":"0.0.19",chokidar:"^4.0.1",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","extract-zip":"^2.0.1","fast-glob":"^3.3.0",giget:"^2.0.0",minimatch:"^9.0.5",open:"^8.4.2"},devDependencies:{"@e2b/code-interpreter":"2.4.2","@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/types":"^1.0.2","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/js-yaml":"^4.0.9","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",archiver:"^7.0.1",axios:"^1.7.9",chalk:"^5.3.0","common-path-prefix":"^1.0.0",cookie:"^1.0.2","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6","detect-port":"^2.1.0",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","fs-extra":"^11.3.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0","ink-table":"^3.1.0",inquirer:"^8.2.4",ip:"^2.0.1","js-yaml":"^4.3.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21","mime-types":"^3.0.1",moment:"^2.30.1","node-fetch":"^3.3.2","node-persist":"^4.0.3","p-map":"^5.5.0",portfinder:"^1.0.32",prettier:"^3.1.1",prompts:"^2.4.2",protobufjs:"^8.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3",undici:"^5.29.0","update-check":"^1.5.4",uuid:"^9.0.0",vitest:"^4.0.17",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},overrides:{"@e2b/code-interpreter":"2.4.2",e2b:"2.19.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}}});var z8e=R((Rli,mJ)=>{mJ.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;mJ.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]/;mJ.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 Rde=R((Oli,$8e)=>{var Bde=z8e();$8e.exports={isSpaceSeparator(t){return typeof t=="string"&&Bde.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Bde.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Bde.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}}});var Y8e=R((Nli,W8e)=>{var Am=Rde(),Nde,CA,eI,AJ,WT,$1,ym,jde,QU;W8e.exports=function(e,r){Nde=String(e),CA="start",eI=[],AJ=0,WT=1,$1=0,ym=void 0,jde=void 0,QU=void 0;do ym=Gir(),Yir[CA]();while(ym.type!=="eof");return typeof r=="function"?Fde({"":QU},"",r):QU};function Fde(t,e,r){let n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),c=Fde(n,s,r);c===void 0?delete n[s]:Object.defineProperty(n,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Fde(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}var ba,Xo,MU,X2,uc;function Gir(){for(ba="default",Xo="",MU=!1,X2=1;;){uc=tI();let t=G8e[ba]();if(t)return t}}function tI(){if(Nde[AJ])return String.fromCodePoint(Nde.codePointAt(AJ))}function vn(){let t=tI();return t===`
|
|
1
|
+
var _a;var __edgeoneImportMetaUrl=require("url").pathToFileURL(__filename).href;
|
|
2
|
+
var lir=Object.create;var DU=Object.defineProperty;var pir=Object.getOwnPropertyDescriptor;var fir=Object.getOwnPropertyNames;var dir=Object.getPrototypeOf,hir=Object.prototype.hasOwnProperty;var mir=(t,e,r)=>e in t?DU(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Yr=(t,e)=>()=>(t&&(e=t(t=0)),e);var R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Nj=(t,e)=>{for(var r in e)DU(t,r,{get:e[r],enumerable:!0})},VY=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fir(e))!hir.call(t,o)&&o!==r&&DU(t,o,{get:()=>e[o],enumerable:!(n=pir(e,o))||n.enumerable});return t},PU=(t,e,r)=>(VY(t,e,"default"),r&&VY(r,e,"default")),bt=(t,e,r)=>(r=t!=null?lir(dir(t)):{},VY(e||!t||!t.__esModule?DU(r,"default",{value:t,enumerable:!0}):r,t)),gir=t=>VY(DU({},"__esModule",{value:!0}),t);var Zo=(t,e,r)=>(mir(t,typeof e!="symbol"?e+"":e,r),r),nde=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var de=(t,e,r)=>(nde(t,e,"read from private field"),r?r.call(t):e.get(t)),Gr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},hr=(t,e,r,n)=>(nde(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var WY=(t,e,r,n)=>({set _(o){hr(t,e,o,r)},get _(){return de(t,e,n)}}),nn=(t,e,r)=>(nde(t,e,"access private method"),r);var z1,jU=Yr(()=>{z1={name:"edgeone",version:"1.7.2",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/config-schema.js","./edgeone-dist/edgeone.schema.json","./edgeone-dist/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./edgeone-dist/plugins/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",postbundle:"node ./scripts/check-bundle-test-data.js",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js","build:sandbox-tarball":"bash ./scripts/build-sandbox-tarball.sh","upload:sandbox-tarball":"node ./scripts/upload-sandbox-tarball.js","sync:sandbox-lock":"cd packaging/sandbox && npm install --package-lock-only --omit=dev",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@edgeone/nuxt-pages":"1.1.2-beta.1","@edgeone/opennextjs-pages":"0.2.10-beta.13","@edgeone/pages-agent-toolkit":"0.1.38","@edgeone/pages-blob":"0.0.19",chokidar:"^4.0.1",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","extract-zip":"^2.0.1","fast-glob":"^3.3.0",giget:"^2.0.0",minimatch:"^9.0.5",open:"^8.4.2"},devDependencies:{"@e2b/code-interpreter":"2.4.2","@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/types":"^1.0.2","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/js-yaml":"^4.0.9","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",archiver:"^7.0.1",axios:"^1.7.9",chalk:"^5.3.0","common-path-prefix":"^1.0.0",cookie:"^1.0.2","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6","detect-port":"^2.1.0",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","fs-extra":"^11.3.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0","ink-table":"^3.1.0",inquirer:"^8.2.4",ip:"^2.0.1","js-yaml":"^4.3.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21","mime-types":"^3.0.1",moment:"^2.30.1","node-fetch":"^3.3.2","node-persist":"^4.0.3","p-map":"^5.5.0",portfinder:"^1.0.32",prettier:"^3.1.1",prompts:"^2.4.2",protobufjs:"^8.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3",undici:"^5.29.0","update-check":"^1.5.4",uuid:"^9.0.0",vitest:"^4.0.17",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},overrides:{"@e2b/code-interpreter":"2.4.2",e2b:"2.19.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}}});var z8e=R((Rli,mJ)=>{mJ.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;mJ.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]/;mJ.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 Rde=R((Oli,$8e)=>{var Bde=z8e();$8e.exports={isSpaceSeparator(t){return typeof t=="string"&&Bde.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Bde.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Bde.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}}});var Y8e=R((Nli,W8e)=>{var Am=Rde(),Nde,CA,eI,AJ,WT,$1,ym,jde,QU;W8e.exports=function(e,r){Nde=String(e),CA="start",eI=[],AJ=0,WT=1,$1=0,ym=void 0,jde=void 0,QU=void 0;do ym=Gir(),Yir[CA]();while(ym.type!=="eof");return typeof r=="function"?Fde({"":QU},"",r):QU};function Fde(t,e,r){let n=t[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),c=Fde(n,s,r);c===void 0?delete n[s]:Object.defineProperty(n,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Fde(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(t,e,n)}var ba,Xo,MU,X2,uc;function Gir(){for(ba="default",Xo="",MU=!1,X2=1;;){uc=tI();let t=G8e[ba]();if(t)return t}}function tI(){if(Nde[AJ])return String.fromCodePoint(Nde.codePointAt(AJ))}function vn(){let t=tI();return t===`
|
|
3
3
|
`?(WT++,$1=0):t?$1+=t.length:$1++,t&&(AJ+=t.length),t}var G8e={default(){switch(uc){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
4
4
|
`:case"\r":case"\u2028":case"\u2029":vn();return;case"/":vn(),ba="comment";return;case void 0:return vn(),hp("eof")}if(Am.isSpaceSeparator(uc)){vn();return}return G8e[CA]()},comment(){switch(uc){case"*":vn(),ba="multiLineComment";return;case"/":vn(),ba="singleLineComment";return}throw mp(vn())},multiLineComment(){switch(uc){case"*":vn(),ba="multiLineCommentAsterisk";return;case void 0:throw mp(vn())}vn()},multiLineCommentAsterisk(){switch(uc){case"*":vn();return;case"/":vn(),ba="default";return;case void 0:throw mp(vn())}vn(),ba="multiLineComment"},singleLineComment(){switch(uc){case`
|
|
5
5
|
`:case"\r":case"\u2028":case"\u2029":vn(),ba="default";return;case void 0:return vn(),hp("eof")}vn()},value(){switch(uc){case"{":case"[":return hp("punctuator",vn());case"n":return vn(),FR("ull"),hp("null",null);case"t":return vn(),FR("rue"),hp("boolean",!0);case"f":return vn(),FR("alse"),hp("boolean",!1);case"-":case"+":vn()==="-"&&(X2=-1),ba="sign";return;case".":Xo=vn(),ba="decimalPointLeading";return;case"0":Xo=vn(),ba="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Xo=vn(),ba="decimalInteger";return;case"I":return vn(),FR("nfinity"),hp("numeric",1/0);case"N":return vn(),FR("aN"),hp("numeric",NaN);case'"':case"'":MU=vn()==='"',Xo="",ba="string";return}throw mp(vn())},identifierNameStartEscape(){if(uc!=="u")throw mp(vn());vn();let t=Lde();switch(t){case"$":case"_":break;default:if(!Am.isIdStartChar(t))throw H8e();break}Xo+=t,ba="identifierName"},identifierName(){switch(uc){case"$":case"_":case"\u200C":case"\u200D":Xo+=vn();return;case"\\":vn(),ba="identifierNameEscape";return}if(Am.isIdContinueChar(uc)){Xo+=vn();return}return hp("identifier",Xo)},identifierNameEscape(){if(uc!=="u")throw mp(vn());vn();let t=Lde();switch(t){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Am.isIdContinueChar(t))throw H8e();break}Xo+=t,ba="identifierName"},sign(){switch(uc){case".":Xo=vn(),ba="decimalPointLeading";return;case"0":Xo=vn(),ba="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Xo=vn(),ba="decimalInteger";return;case"I":return vn(),FR("nfinity"),hp("numeric",X2*(1/0));case"N":return vn(),FR("aN"),hp("numeric",NaN)}throw mp(vn())},zero(){switch(uc){case".":Xo+=vn(),ba="decimalPoint";return;case"e":case"E":Xo+=vn(),ba="decimalExponent";return;case"x":case"X":Xo+=vn(),ba="hexadecimal";return}return hp("numeric",X2*0)},decimalInteger(){switch(uc){case".":Xo+=vn(),ba="decimalPoint";return;case"e":case"E":Xo+=vn(),ba="decimalExponent";return}if(Am.isDigit(uc)){Xo+=vn();return}return hp("numeric",X2*Number(Xo))},decimalPointLeading(){if(Am.isDigit(uc)){Xo+=vn(),ba="decimalFraction";return}throw mp(vn())},decimalPoint(){switch(uc){case"e":case"E":Xo+=vn(),ba="decimalExponent";return}if(Am.isDigit(uc)){Xo+=vn(),ba="decimalFraction";return}return hp("numeric",X2*Number(Xo))},decimalFraction(){switch(uc){case"e":case"E":Xo+=vn(),ba="decimalExponent";return}if(Am.isDigit(uc)){Xo+=vn();return}return hp("numeric",X2*Number(Xo))},decimalExponent(){switch(uc){case"+":case"-":Xo+=vn(),ba="decimalExponentSign";return}if(Am.isDigit(uc)){Xo+=vn(),ba="decimalExponentInteger";return}throw mp(vn())},decimalExponentSign(){if(Am.isDigit(uc)){Xo+=vn(),ba="decimalExponentInteger";return}throw mp(vn())},decimalExponentInteger(){if(Am.isDigit(uc)){Xo+=vn();return}return hp("numeric",X2*Number(Xo))},hexadecimal(){if(Am.isHexDigit(uc)){Xo+=vn(),ba="hexadecimalInteger";return}throw mp(vn())},hexadecimalInteger(){if(Am.isHexDigit(uc)){Xo+=vn();return}return hp("numeric",X2*Number(Xo))},string(){switch(uc){case"\\":vn(),Xo+=Vir();return;case'"':if(MU)return vn(),hp("string",Xo);Xo+=vn();return;case"'":if(!MU)return vn(),hp("string",Xo);Xo+=vn();return;case`
|
|
@@ -18,7 +18,7 @@ var lir=Object.create;var DU=Object.defineProperty;var pir=Object.getOwnProperty
|
|
|
18
18
|
`;return zp(t,r)}function JT(t){var o;let e=Yde.join(process.cwd(),".edgeone","auth.json"),r=t.zoneId==null?(o=H1())==null?void 0:o.zoneId:void 0,n=String(t.zoneId||r||"").trim();YT(e,{EDGEONE_PAGES_API_TOKEN:t.token,EDGEONE_PAGES_API_REGION:t.region,...n?{EDGEONE_PAGES_ZONE_ID:n}:{},...t.selectedBy?{EDGEONE_PAGES_WORKSPACE_SELECTED_BY:t.selectedBy}:{}})}function H1(){try{let t=Yde.join(process.cwd(),".edgeone","auth.json");if(!cg.default.existsSync(t))return null;let e=JSON.parse(cg.default.readFileSync(t,"utf-8")),r=typeof(e==null?void 0:e.EDGEONE_PAGES_ZONE_ID)=="string"?e.EDGEONE_PAGES_ZONE_ID.trim():"";return{token:e==null?void 0:e.EDGEONE_PAGES_API_TOKEN,region:e==null?void 0:e.EDGEONE_PAGES_API_REGION,...r?{zoneId:r}:{}}}catch{return null}}function v6e(t){return cg.default.unlinkSync(t)}function x6e(t,e){return aS(t)?cg.default.appendFileSync(t,e):cg.default.writeFileSync(t,e)}var g6e,cg,A6e,EJ,Yde,lc=Yr(()=>{g6e=bt(xJ()),cg=bt(require("fs")),A6e=bt(require("os"));il();EJ=m6e(),Yde=require("path")});var Kde=R((Wli,b6e)=>{var Psr=typeof global=="object"&&global&&global.Object===Object&&global;b6e.exports=Psr});var zj=R((Yli,E6e)=>{var Bsr=Kde(),Rsr=typeof self=="object"&&self&&self.Object===Object&&self,Osr=Bsr||Rsr||Function("return this")();E6e.exports=Osr});var $U=R((Jli,w6e)=>{var Nsr=zj(),Fsr=Nsr.Symbol;w6e.exports=Fsr});var Zde=R((Kli,_6e)=>{function Lsr(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}_6e.exports=Lsr});var _J=R((Zli,S6e)=>{var jsr=Array.isArray;S6e.exports=jsr});var T6e=R((Xli,k6e)=>{var C6e=$U(),I6e=Object.prototype,Msr=I6e.hasOwnProperty,Qsr=I6e.toString,HU=C6e?C6e.toStringTag:void 0;function qsr(t){var e=Msr.call(t,HU),r=t[HU];try{t[HU]=void 0;var n=!0}catch{}var o=Qsr.call(t);return n&&(e?t[HU]=r:delete t[HU]),o}k6e.exports=qsr});var P6e=R((epi,D6e)=>{var Usr=Object.prototype,zsr=Usr.toString;function $sr(t){return zsr.call(t)}D6e.exports=$sr});var $j=R((tpi,O6e)=>{var B6e=$U(),Hsr=T6e(),Gsr=P6e(),Vsr="[object Null]",Wsr="[object Undefined]",R6e=B6e?B6e.toStringTag:void 0;function Ysr(t){return t==null?t===void 0?Wsr:Vsr:R6e&&R6e in Object(t)?Hsr(t):Gsr(t)}O6e.exports=Ysr});var jR=R((rpi,N6e)=>{function Jsr(t){return t!=null&&typeof t=="object"}N6e.exports=Jsr});var L6e=R((npi,F6e)=>{var Ksr=$j(),Zsr=jR(),Xsr="[object Symbol]";function eor(t){return typeof t=="symbol"||Zsr(t)&&Ksr(t)==Xsr}F6e.exports=eor});var z6e=R((ipi,U6e)=>{var j6e=$U(),tor=Zde(),ror=_J(),nor=L6e(),ior=1/0,M6e=j6e?j6e.prototype:void 0,Q6e=M6e?M6e.toString:void 0;function q6e(t){if(typeof t=="string")return t;if(ror(t))return tor(t,q6e)+"";if(nor(t))return Q6e?Q6e.call(t):"";var e=t+"";return e=="0"&&1/t==-ior?"-0":e}U6e.exports=q6e});var GU=R((spi,$6e)=>{var sor=z6e();function oor(t){return t==null?"":sor(t)}$6e.exports=oor});var G6e=R((opi,H6e)=>{function aor(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=Array(o);++n<o;)s[n]=t[n+e];return s}H6e.exports=aor});var W6e=R((api,V6e)=>{var cor=G6e();function uor(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:cor(t,e,r)}V6e.exports=uor});var Xde=R((cpi,Y6e)=>{var lor="\\ud800-\\udfff",por="\\u0300-\\u036f",dor="\\ufe20-\\ufe2f",hor="\\u20d0-\\u20ff",mor=por+dor+hor,gor="\\ufe0e\\ufe0f",Aor="\\u200d",yor=RegExp("["+Aor+lor+mor+gor+"]");function vor(t){return yor.test(t)}Y6e.exports=vor});var K6e=R((upi,J6e)=>{function xor(t){return t.split("")}J6e.exports=xor});var sqe=R((lpi,iqe)=>{var Z6e="\\ud800-\\udfff",bor="\\u0300-\\u036f",Eor="\\ufe20-\\ufe2f",wor="\\u20d0-\\u20ff",_or=bor+Eor+wor,Sor="\\ufe0e\\ufe0f",Cor="["+Z6e+"]",ehe="["+_or+"]",the="\\ud83c[\\udffb-\\udfff]",Ior="(?:"+ehe+"|"+the+")",X6e="[^"+Z6e+"]",eqe="(?:\\ud83c[\\udde6-\\uddff]){2}",tqe="[\\ud800-\\udbff][\\udc00-\\udfff]",kor="\\u200d",rqe=Ior+"?",nqe="["+Sor+"]?",Tor="(?:"+kor+"(?:"+[X6e,eqe,tqe].join("|")+")"+nqe+rqe+")*",Dor=nqe+rqe+Tor,Por="(?:"+[X6e+ehe+"?",ehe,eqe,tqe,Cor].join("|")+")",Bor=RegExp(the+"(?="+the+")|"+Por+Dor,"g");function Ror(t){return t.match(Bor)||[]}iqe.exports=Ror});var aqe=R((ppi,oqe)=>{var Oor=K6e(),Nor=Xde(),For=sqe();function Lor(t){return Nor(t)?For(t):Oor(t)}oqe.exports=Lor});var uqe=R((fpi,cqe)=>{var jor=W6e(),Mor=Xde(),Qor=aqe(),qor=GU();function Uor(t){return function(e){e=qor(e);var r=Mor(e)?Qor(e):void 0,n=r?r[0]:e.charAt(0),o=r?jor(r,1).join(""):e.slice(1);return n[t]()+o}}cqe.exports=Uor});var pqe=R((dpi,lqe)=>{var zor=uqe(),$or=zor("toUpperCase");lqe.exports=$or});var dqe=R((hpi,fqe)=>{var Hor=GU(),Gor=pqe();function Vor(t){return Gor(Hor(t).toLowerCase())}fqe.exports=Vor});var mqe=R((mpi,hqe)=>{function Wor(t,e,r,n){var o=-1,s=t==null?0:t.length;for(n&&s&&(r=t[++o]);++o<s;)r=e(r,t[o],o,t);return r}hqe.exports=Wor});var Aqe=R((gpi,gqe)=>{function Yor(t){return function(e){return t==null?void 0:t[e]}}gqe.exports=Yor});var vqe=R((Api,yqe)=>{var Jor=Aqe(),Kor={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Zor=Jor(Kor);yqe.exports=Zor});var bqe=R((ypi,xqe)=>{var Xor=vqe(),ear=GU(),tar=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rar="\\u0300-\\u036f",nar="\\ufe20-\\ufe2f",iar="\\u20d0-\\u20ff",sar=rar+nar+iar,oar="["+sar+"]",aar=RegExp(oar,"g");function car(t){return t=ear(t),t&&t.replace(tar,Xor).replace(aar,"")}xqe.exports=car});var wqe=R((vpi,Eqe)=>{var uar=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function lar(t){return t.match(uar)||[]}Eqe.exports=lar});var Sqe=R((xpi,_qe)=>{var par=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function far(t){return par.test(t)}_qe.exports=far});var $qe=R((bpi,zqe)=>{var Dqe="\\ud800-\\udfff",dar="\\u0300-\\u036f",har="\\ufe20-\\ufe2f",mar="\\u20d0-\\u20ff",gar=dar+har+mar,Pqe="\\u2700-\\u27bf",Bqe="a-z\\xdf-\\xf6\\xf8-\\xff",Aar="\\xac\\xb1\\xd7\\xf7",yar="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xar="\\u2000-\\u206f",bar=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rqe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ear="\\ufe0e\\ufe0f",Oqe=Aar+yar+xar+bar,Nqe="['\u2019]",Cqe="["+Oqe+"]",war="["+gar+"]",Fqe="\\d+",_ar="["+Pqe+"]",Lqe="["+Bqe+"]",jqe="[^"+Dqe+Oqe+Fqe+Pqe+Bqe+Rqe+"]",Sar="\\ud83c[\\udffb-\\udfff]",Car="(?:"+war+"|"+Sar+")",Iar="[^"+Dqe+"]",Mqe="(?:\\ud83c[\\udde6-\\uddff]){2}",Qqe="[\\ud800-\\udbff][\\udc00-\\udfff]",Hj="["+Rqe+"]",kar="\\u200d",Iqe="(?:"+Lqe+"|"+jqe+")",Tar="(?:"+Hj+"|"+jqe+")",kqe="(?:"+Nqe+"(?:d|ll|m|re|s|t|ve))?",Tqe="(?:"+Nqe+"(?:D|LL|M|RE|S|T|VE))?",qqe=Car+"?",Uqe="["+Ear+"]?",Dar="(?:"+kar+"(?:"+[Iar,Mqe,Qqe].join("|")+")"+Uqe+qqe+")*",Par="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bar="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rar=Uqe+qqe+Dar,Oar="(?:"+[_ar,Mqe,Qqe].join("|")+")"+Rar,Nar=RegExp([Hj+"?"+Lqe+"+"+kqe+"(?="+[Cqe,Hj,"$"].join("|")+")",Tar+"+"+Tqe+"(?="+[Cqe,Hj+Iqe,"$"].join("|")+")",Hj+"?"+Iqe+"+"+kqe,Hj+"+"+Tqe,Bar,Par,Fqe,Oar].join("|"),"g");function Far(t){return t.match(Nar)||[]}zqe.exports=Far});var Gqe=R((Epi,Hqe)=>{var Lar=wqe(),jar=Sqe(),Mar=GU(),Qar=$qe();function qar(t,e,r){return t=Mar(t),e=r?void 0:e,e===void 0?jar(t)?Qar(t):Lar(t):t.match(e)||[]}Hqe.exports=qar});var Wqe=R((wpi,Vqe)=>{var Uar=mqe(),zar=bqe(),$ar=Gqe(),Har="['\u2019]",Gar=RegExp(Har,"g");function Var(t){return function(e){return Uar($ar(zar(e).replace(Gar,"")),t,"")}}Vqe.exports=Var});var Jqe=R((_pi,Yqe)=>{var War=dqe(),Yar=Wqe(),Jar=Yar(function(t,e,r){return e=e.toLowerCase(),t+(r?War(e):e)});Yqe.exports=Jar});async function SJ(t){var e,r;try{let n=JSON.parse(await Kqe.default.promises.readFile(Zqe.default.join(t,"package.json"),"utf-8"));return((e=n.dependencies)==null?void 0:e.nuxt)||((r=n.devDependencies)==null?void 0:r.nuxt)||"latest"}catch{return"latest"}}function rhe(){return process.env.LANG==="zh_CN.UTF-8"}var Kar,Kqe,Zqe,Gj=Yr(()=>{Kar=bt(Jqe()),Kqe=bt(require("fs")),Zqe=bt(require("path"))});var VU=R(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.getParsedType=Ll.ZodParsedType=Ll.objectUtil=Ll.util=void 0;var nhe;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(let u of s)c[u]=o[u];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(nhe||(Ll.util=nhe={}));var Xqe;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Xqe||(Ll.objectUtil=Xqe={}));Ll.ZodParsedType=nhe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Zar=t=>{switch(typeof t){case"undefined":return Ll.ZodParsedType.undefined;case"string":return Ll.ZodParsedType.string;case"number":return Number.isNaN(t)?Ll.ZodParsedType.nan:Ll.ZodParsedType.number;case"boolean":return Ll.ZodParsedType.boolean;case"function":return Ll.ZodParsedType.function;case"bigint":return Ll.ZodParsedType.bigint;case"symbol":return Ll.ZodParsedType.symbol;case"object":return Array.isArray(t)?Ll.ZodParsedType.array:t===null?Ll.ZodParsedType.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ll.ZodParsedType.promise:typeof Map<"u"&&t instanceof Map?Ll.ZodParsedType.map:typeof Set<"u"&&t instanceof Set?Ll.ZodParsedType.set:typeof Date<"u"&&t instanceof Date?Ll.ZodParsedType.date:Ll.ZodParsedType.object;default:return Ll.ZodParsedType.unknown}};Ll.getParsedType=Zar});var CJ=R(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.ZodError=KT.quotelessJson=KT.ZodIssueCode=void 0;var eUe=VU();KT.ZodIssueCode=eUe.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Xar=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");KT.quotelessJson=Xar;var WU=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let u=n,p=0;for(;p<c.path.length;){let f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,eUe.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};KT.ZodError=WU;WU.create=t=>new WU(t)});var she=R(ihe=>{"use strict";Object.defineProperty(ihe,"__esModule",{value:!0});var p0=CJ(),MR=VU(),ecr=(t,e)=>{let r;switch(t.code){case p0.ZodIssueCode.invalid_type:t.received===MR.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case p0.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,MR.util.jsonStringifyReplacer)}`;break;case p0.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${MR.util.joinValues(t.keys,", ")}`;break;case p0.ZodIssueCode.invalid_union:r="Invalid input";break;case p0.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${MR.util.joinValues(t.options)}`;break;case p0.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${MR.util.joinValues(t.options)}, received '${t.received}'`;break;case p0.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case p0.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case p0.ZodIssueCode.invalid_date:r="Invalid date";break;case p0.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:MR.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case p0.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case p0.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case p0.ZodIssueCode.custom:r="Invalid input";break;case p0.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case p0.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case p0.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,MR.util.assertNever(t)}return{message:r}};ihe.default=ecr});var IJ=R(ZT=>{"use strict";var tcr=ZT&&ZT.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ZT,"__esModule",{value:!0});ZT.defaultErrorMap=void 0;ZT.setErrorMap=rcr;ZT.getErrorMap=ncr;var tUe=tcr(she());ZT.defaultErrorMap=tUe.default;var rUe=tUe.default;function rcr(t){rUe=t}function ncr(){return rUe}});var ahe=R(ju=>{"use strict";var icr=ju&&ju.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ju,"__esModule",{value:!0});ju.isAsync=ju.isValid=ju.isDirty=ju.isAborted=ju.OK=ju.DIRTY=ju.INVALID=ju.ParseStatus=ju.EMPTY_PATH=ju.makeIssue=void 0;ju.addIssueToContext=acr;var scr=IJ(),nUe=icr(she()),ocr=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let u="",p=n.filter(f=>!!f).slice().reverse();for(let f of p)u=f(c,{data:e,defaultError:u}).message;return{...o,path:s,message:u}};ju.makeIssue=ocr;ju.EMPTY_PATH=[];function acr(t,e){let r=(0,scr.getErrorMap)(),n=(0,ju.makeIssue)({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===nUe.default?void 0:nUe.default].filter(o=>!!o)});t.common.issues.push(n)}var ohe=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return ju.INVALID;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return ju.INVALID;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}};ju.ParseStatus=ohe;ju.INVALID=Object.freeze({status:"aborted"});var ccr=t=>({status:"dirty",value:t});ju.DIRTY=ccr;var ucr=t=>({status:"valid",value:t});ju.OK=ucr;var lcr=t=>t.status==="aborted";ju.isAborted=lcr;var pcr=t=>t.status==="dirty";ju.isDirty=pcr;var fcr=t=>t.status==="valid";ju.isValid=fcr;var dcr=t=>typeof Promise<"u"&&t instanceof Promise;ju.isAsync=dcr});var sUe=R(iUe=>{"use strict";Object.defineProperty(iUe,"__esModule",{value:!0})});var aUe=R(kJ=>{"use strict";Object.defineProperty(kJ,"__esModule",{value:!0});kJ.errorUtil=void 0;var oUe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(oUe||(kJ.errorUtil=oUe={}))});var vUe=R(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.discriminatedUnion=cr.date=cr.boolean=cr.bigint=cr.array=cr.any=cr.coerce=cr.ZodFirstPartyTypeKind=cr.late=cr.ZodSchema=cr.Schema=cr.ZodReadonly=cr.ZodPipeline=cr.ZodBranded=cr.BRAND=cr.ZodNaN=cr.ZodCatch=cr.ZodDefault=cr.ZodNullable=cr.ZodOptional=cr.ZodTransformer=cr.ZodEffects=cr.ZodPromise=cr.ZodNativeEnum=cr.ZodEnum=cr.ZodLiteral=cr.ZodLazy=cr.ZodFunction=cr.ZodSet=cr.ZodMap=cr.ZodRecord=cr.ZodTuple=cr.ZodIntersection=cr.ZodDiscriminatedUnion=cr.ZodUnion=cr.ZodObject=cr.ZodArray=cr.ZodVoid=cr.ZodNever=cr.ZodUnknown=cr.ZodAny=cr.ZodNull=cr.ZodUndefined=cr.ZodSymbol=cr.ZodDate=cr.ZodBoolean=cr.ZodBigInt=cr.ZodNumber=cr.ZodString=cr.ZodType=void 0;cr.NEVER=cr.void=cr.unknown=cr.union=cr.undefined=cr.tuple=cr.transformer=cr.symbol=cr.string=cr.strictObject=cr.set=cr.record=cr.promise=cr.preprocess=cr.pipeline=cr.ostring=cr.optional=cr.onumber=cr.oboolean=cr.object=cr.number=cr.nullable=cr.null=cr.never=cr.nativeEnum=cr.nan=cr.map=cr.literal=cr.lazy=cr.intersection=cr.instanceof=cr.function=cr.enum=cr.effect=void 0;cr.datetimeRegex=fUe;cr.custom=hUe;var Xn=CJ(),TJ=IJ(),xs=aUe(),fr=ahe(),oi=VU(),Jb=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},cUe=(t,e)=>{if((0,fr.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Xn.ZodError(t.common.issues);return this._error=r,this._error}}};function na(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,u)=>{var f,h;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:u.defaultError}:typeof u.data>"u"?{message:(f=p!=null?p:n)!=null?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p!=null?p:r)!=null?h:u.defaultError}},description:o}}var ia=class{get description(){return this._def.description}_getType(e){return(0,oi.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,oi.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fr.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,oi.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if((0,fr.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,oi.getParsedType)(e)},o=this._parseSync({data:e,path:n.path,parent:n});return cUe(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,oi.getParsedType)(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return(0,fr.isValid)(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>(0,fr.isValid)(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,oi.getParsedType)(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await((0,fr.isAsync)(o)?o:Promise.resolve(o));return cUe(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let c=e(o),u=()=>s.addIssue({code:Xn.ZodIssueCode.custom,...n(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new Rx({schema:this,typeName:vo.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Yb.create(this,this._def)}nullable(){return lS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oI.create(this)}promise(){return tD.create(this,this._def)}or(e){return GR.create([this,e],this._def)}and(e){return VR.create(this,e,this._def)}transform(e){return new Rx({...na(this._def),schema:this,typeName:vo.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ZR({...na(this._def),innerType:this,defaultValue:r,typeName:vo.ZodDefault})}brand(){return new YU({typeName:vo.ZodBranded,type:this,...na(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new XR({...na(this._def),innerType:this,catchValue:r,typeName:vo.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return JU.create(this,e)}readonly(){return eO.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};cr.ZodType=ia;cr.Schema=ia;cr.ZodSchema=ia;var hcr=/^c[^\s-]{8,}$/i,mcr=/^[0-9a-z]+$/,gcr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Acr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ycr=/^[a-z0-9_-]{21}$/i,vcr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xcr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bcr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ecr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",che,wcr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_cr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Scr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ccr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Icr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kcr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lUe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Tcr=new RegExp(`^${lUe}$`);function pUe(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Dcr(t){return new RegExp(`^${pUe(t)}$`)}function fUe(t){let e=`${lUe}T${pUe(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Pcr(t,e){return!!((e==="v4"||!e)&&wcr.test(t)||(e==="v6"||!e)&&Scr.test(t))}function Bcr(t,e){if(!vcr.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Rcr(t,e){return!!((e==="v4"||!e)&&_cr.test(t)||(e==="v6"||!e)&&Ccr.test(t))}var XT=class t extends ia{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==oi.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.string,received:s.parsedType}),fr.INVALID}let n=new fr.ParseStatus,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,u=e.data.length<s.value;(c||u)&&(o=this._getOrReturnCtx(e,o),c?(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")bcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"email",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")che||(che=new RegExp(Ecr,"u")),che.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"emoji",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Acr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"uuid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")ycr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"nanoid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")hcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"cuid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")mcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"cuid2",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")gcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"ulid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"url",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"regex",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?fUe(s).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Tcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Dcr(s).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?xcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"duration",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Pcr(e.data,s.version)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"ip",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Bcr(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"jwt",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Rcr(e.data,s.version)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"cidr",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Icr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"base64",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?kcr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"base64url",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):oi.util.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:Xn.ZodIssueCode.invalid_string,...xs.errorUtil.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...xs.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...xs.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...xs.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...xs.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...xs.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...xs.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...xs.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...xs.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...xs.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...xs.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...xs.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...xs.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...xs.errorUtil.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!1,...xs.errorUtil.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...xs.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...xs.errorUtil.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...xs.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...xs.errorUtil.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...xs.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...xs.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...xs.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...xs.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...xs.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,xs.errorUtil.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.ZodString=XT;XT.create=t=>{var e;return new XT({checks:[],typeName:vo.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...na(t)})};function Ocr(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}var QR=class t extends ia{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==oi.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.number,received:s.parsedType}),fr.INVALID}let n,o=new fr.ParseStatus;for(let s of this._def.checks)s.kind==="int"?oi.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Ocr(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.not_finite,message:s.message}),o.dirty()):oi.util.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,xs.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,xs.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,xs.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,xs.errorUtil.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:xs.errorUtil.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:xs.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:xs.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:xs.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:xs.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:xs.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:xs.errorUtil.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:xs.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:xs.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:xs.errorUtil.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&oi.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};cr.ZodNumber=QR;QR.create=t=>new QR({checks:[],typeName:vo.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...na(t)});var qR=class t extends ia{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==oi.ZodParsedType.bigint)return this._getInvalidInput(e);let n,o=new fr.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):oi.util.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.bigint,received:r.parsedType}),fr.INVALID}gte(e,r){return this.setLimit("min",e,!0,xs.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,xs.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,xs.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,xs.errorUtil.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:xs.errorUtil.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:xs.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:xs.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:xs.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:xs.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:xs.errorUtil.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.ZodBigInt=qR;qR.create=t=>{var e;return new qR({checks:[],typeName:vo.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...na(t)})};var UR=class extends ia{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==oi.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.boolean,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodBoolean=UR;UR.create=t=>new UR({typeName:vo.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...na(t)});var zR=class t extends ia{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==oi.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.date,received:s.parsedType}),fr.INVALID}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_date}),fr.INVALID}let n=new fr.ParseStatus,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):oi.util.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:xs.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:xs.errorUtil.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};cr.ZodDate=zR;zR.create=t=>new zR({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:vo.ZodDate,...na(t)});var Wj=class extends ia{_parse(e){if(this._getType(e)!==oi.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.symbol,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodSymbol=Wj;Wj.create=t=>new Wj({typeName:vo.ZodSymbol,...na(t)});var $R=class extends ia{_parse(e){if(this._getType(e)!==oi.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.undefined,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodUndefined=$R;$R.create=t=>new $R({typeName:vo.ZodUndefined,...na(t)});var HR=class extends ia{_parse(e){if(this._getType(e)!==oi.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.null,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodNull=HR;HR.create=t=>new HR({typeName:vo.ZodNull,...na(t)});var eD=class extends ia{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,fr.OK)(e.data)}};cr.ZodAny=eD;eD.create=t=>new eD({typeName:vo.ZodAny,...na(t)});var sI=class extends ia{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,fr.OK)(e.data)}};cr.ZodUnknown=sI;sI.create=t=>new sI({typeName:vo.ZodUnknown,...na(t)});var G1=class extends ia{_parse(e){let r=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.never,received:r.parsedType}),fr.INVALID}};cr.ZodNever=G1;G1.create=t=>new G1({typeName:vo.ZodNever,...na(t)});var Yj=class extends ia{_parse(e){if(this._getType(e)!==oi.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.void,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodVoid=Yj;Yj.create=t=>new Yj({typeName:vo.ZodVoid,...na(t)});var oI=class t extends ia{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==oi.ZodParsedType.array)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.array,received:r.parsedType}),fr.INVALID;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,u=r.data.length<o.exactLength.value;(c||u)&&((0,fr.addIssueToContext)(r,{code:c?Xn.ZodIssueCode.too_big:Xn.ZodIssueCode.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&((0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&((0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>o.type._parseAsync(new Jb(r,c,r.path,u)))).then(c=>fr.ParseStatus.mergeArray(n,c));let s=[...r.data].map((c,u)=>o.type._parseSync(new Jb(r,c,r.path,u)));return fr.ParseStatus.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:xs.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:xs.errorUtil.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:xs.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}};cr.ZodArray=oI;oI.create=(t,e)=>new oI({type:t,minLength:null,maxLength:null,exactLength:null,typeName:vo.ZodArray,...na(e)});function Vj(t){if(t instanceof tv){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Yb.create(Vj(n))}return new tv({...t._def,shape:()=>e})}else return t instanceof oI?new oI({...t._def,type:Vj(t.element)}):t instanceof Yb?Yb.create(Vj(t.unwrap())):t instanceof lS?lS.create(Vj(t.unwrap())):t instanceof uS?uS.create(t.items.map(e=>Vj(e))):t}var tv=class t extends ia{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=oi.util.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==oi.ZodParsedType.object){let f=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(f,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.object,received:f.parsedType}),fr.INVALID}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof G1&&this._def.unknownKeys==="strip"))for(let f in o.data)c.includes(f)||u.push(f);let p=[];for(let f of c){let h=s[f],m=o.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Jb(o,m,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof G1){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)p.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&((0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let m=o.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Jb(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of p){let m=await h.key,y=await h.value;f.push({key:m,value:y,alwaysSet:h.alwaysSet})}return f}).then(f=>fr.ParseStatus.mergeObjectSync(n,f)):fr.ParseStatus.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return xs.errorUtil.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,c,u,p;let o=(u=(c=(s=this._def).errorMap)==null?void 0:c.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(p=xs.errorUtil.errToObj(e).message)!=null?p:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:vo.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of oi.util.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of oi.util.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Vj(this)}partial(e){let r={};for(let n of oi.util.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of oi.util.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Yb;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return dUe(oi.util.objectKeys(this.shape))}};cr.ZodObject=tv;tv.create=(t,e)=>new tv({shape:()=>t,unknownKeys:"strip",catchall:G1.create(),typeName:vo.ZodObject,...na(e)});tv.strictCreate=(t,e)=>new tv({shape:()=>t,unknownKeys:"strict",catchall:G1.create(),typeName:vo.ZodObject,...na(e)});tv.lazycreate=(t,e)=>new tv({shape:t,unknownKeys:"strip",catchall:G1.create(),typeName:vo.ZodObject,...na(e)});var GR=class extends ia{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let c=s.map(u=>new Xn.ZodError(u.ctx.common.issues));return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_union,unionErrors:c}),fr.INVALID}if(r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let p of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=p._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=c.map(p=>new Xn.ZodError(p));return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_union,unionErrors:u}),fr.INVALID}}get options(){return this._def.options}};cr.ZodUnion=GR;GR.create=(t,e)=>new GR({options:t,typeName:vo.ZodUnion,...na(e)});var iI=t=>t instanceof WR?iI(t.schema):t instanceof Rx?iI(t.innerType()):t instanceof YR?[t.value]:t instanceof JR?t.options:t instanceof KR?oi.util.objectValues(t.enum):t instanceof ZR?iI(t._def.innerType):t instanceof $R?[void 0]:t instanceof HR?[null]:t instanceof Yb?[void 0,...iI(t.unwrap())]:t instanceof lS?[null,...iI(t.unwrap())]:t instanceof YU||t instanceof eO?iI(t.unwrap()):t instanceof XR?iI(t._def.innerType):[],DJ=class t extends ia{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==oi.ZodParsedType.object)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.object,received:r.parsedType}),fr.INVALID;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):((0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),fr.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=iI(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of c){if(o.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);o.set(u,s)}}return new t({typeName:vo.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...na(n)})}};cr.ZodDiscriminatedUnion=DJ;function uhe(t,e){let r=(0,oi.getParsedType)(t),n=(0,oi.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===oi.ZodParsedType.object&&n===oi.ZodParsedType.object){let o=oi.util.objectKeys(e),s=oi.util.objectKeys(t).filter(u=>o.indexOf(u)!==-1),c={...t,...e};for(let u of s){let p=uhe(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===oi.ZodParsedType.array&&n===oi.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let c=t[s],u=e[s],p=uhe(c,u);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===oi.ZodParsedType.date&&n===oi.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var VR=class extends ia{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,c)=>{if((0,fr.isAborted)(s)||(0,fr.isAborted)(c))return fr.INVALID;let u=uhe(s.value,c.value);return u.valid?(((0,fr.isDirty)(s)||(0,fr.isDirty)(c))&&r.dirty(),{status:r.value,value:u.data}):((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_intersection_types}),fr.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};cr.ZodIntersection=VR;VR.create=(t,e,r)=>new VR({left:t,right:e,typeName:vo.ZodIntersection,...na(r)});var uS=class t extends ia{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==oi.ZodParsedType.array)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.array,received:n.parsedType}),fr.INVALID;if(n.data.length<this._def.items.length)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),fr.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,u)=>{let p=this._def.items[u]||this._def.rest;return p?p._parse(new Jb(n,c,n.path,u)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>fr.ParseStatus.mergeArray(r,c)):fr.ParseStatus.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};cr.ZodTuple=uS;uS.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new uS({items:t,typeName:vo.ZodTuple,rest:null,...na(e)})};var PJ=class t extends ia{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==oi.ZodParsedType.object)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.object,received:n.parsedType}),fr.INVALID;let o=[],s=this._def.keyType,c=this._def.valueType;for(let u in n.data)o.push({key:s._parse(new Jb(n,u,n.path,u)),value:c._parse(new Jb(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?fr.ParseStatus.mergeObjectAsync(r,o):fr.ParseStatus.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ia?new t({keyType:e,valueType:r,typeName:vo.ZodRecord,...na(n)}):new t({keyType:XT.create(),valueType:e,typeName:vo.ZodRecord,...na(r)})}};cr.ZodRecord=PJ;var Jj=class extends ia{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==oi.ZodParsedType.map)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.map,received:n.parsedType}),fr.INVALID;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([u,p],f)=>({key:o._parse(new Jb(n,u,n.path,[f,"key"])),value:s._parse(new Jb(n,p,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let p of c){let f=await p.key,h=await p.value;if(f.status==="aborted"||h.status==="aborted")return fr.INVALID;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let p of c){let f=p.key,h=p.value;if(f.status==="aborted"||h.status==="aborted")return fr.INVALID;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}}}};cr.ZodMap=Jj;Jj.create=(t,e,r)=>new Jj({valueType:e,keyType:t,typeName:vo.ZodMap,...na(r)});var Kj=class t extends ia{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==oi.ZodParsedType.set)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.set,received:n.parsedType}),fr.INVALID;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(p){let f=new Set;for(let h of p){if(h.status==="aborted")return fr.INVALID;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}let u=[...n.data.values()].map((p,f)=>s._parse(new Jb(n,p,n.path,f)));return n.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:xs.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:xs.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};cr.ZodSet=Kj;Kj.create=(t,e)=>new Kj({valueType:t,minSize:null,maxSize:null,typeName:vo.ZodSet,...na(e)});var BJ=class t extends ia{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==oi.ZodParsedType.function)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.function,received:r.parsedType}),fr.INVALID;function n(u,p){return(0,fr.makeIssue)({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,TJ.getErrorMap)(),TJ.defaultErrorMap].filter(f=>!!f),issueData:{code:Xn.ZodIssueCode.invalid_arguments,argumentsError:p}})}function o(u,p){return(0,fr.makeIssue)({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,TJ.getErrorMap)(),TJ.defaultErrorMap].filter(f=>!!f),issueData:{code:Xn.ZodIssueCode.invalid_return_type,returnTypeError:p}})}let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof tD){let u=this;return(0,fr.OK)(async function(...p){let f=new Xn.ZodError([]),h=await u._def.args.parseAsync(p,s).catch(x=>{throw f.addIssue(n(p,x)),f}),m=await Reflect.apply(c,this,h);return await u._def.returns._def.type.parseAsync(m,s).catch(x=>{throw f.addIssue(o(m,x)),f})})}else{let u=this;return(0,fr.OK)(function(...p){let f=u._def.args.safeParse(p,s);if(!f.success)throw new Xn.ZodError([n(p,f.error)]);let h=Reflect.apply(c,this,f.data),m=u._def.returns.safeParse(h,s);if(!m.success)throw new Xn.ZodError([o(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:uS.create(e).rest(sI.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||uS.create([]).rest(sI.create()),returns:r||sI.create(),typeName:vo.ZodFunction,...na(n)})}};cr.ZodFunction=BJ;var WR=class extends ia{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};cr.ZodLazy=WR;WR.create=(t,e)=>new WR({getter:t,typeName:vo.ZodLazy,...na(e)});var YR=class extends ia{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(r,{received:r.data,code:Xn.ZodIssueCode.invalid_literal,expected:this._def.value}),fr.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};cr.ZodLiteral=YR;YR.create=(t,e)=>new YR({value:t,typeName:vo.ZodLiteral,...na(e)});function dUe(t,e){return new JR({values:t,typeName:vo.ZodEnum,...na(e)})}var JR=class t extends ia{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,fr.addIssueToContext)(r,{expected:oi.util.joinValues(n),received:r.parsedType,code:Xn.ZodIssueCode.invalid_type}),fr.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,fr.addIssueToContext)(r,{received:r.data,code:Xn.ZodIssueCode.invalid_enum_value,options:n}),fr.INVALID}return(0,fr.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};cr.ZodEnum=JR;JR.create=dUe;var KR=class extends ia{_parse(e){let r=oi.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==oi.ZodParsedType.string&&n.parsedType!==oi.ZodParsedType.number){let o=oi.util.objectValues(r);return(0,fr.addIssueToContext)(n,{expected:oi.util.joinValues(o),received:n.parsedType,code:Xn.ZodIssueCode.invalid_type}),fr.INVALID}if(this._cache||(this._cache=new Set(oi.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=oi.util.objectValues(r);return(0,fr.addIssueToContext)(n,{received:n.data,code:Xn.ZodIssueCode.invalid_enum_value,options:o}),fr.INVALID}return(0,fr.OK)(e.data)}get enum(){return this._def.values}};cr.ZodNativeEnum=KR;KR.create=(t,e)=>new KR({values:t,typeName:vo.ZodNativeEnum,...na(e)});var tD=class extends ia{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==oi.ZodParsedType.promise&&r.common.async===!1)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.promise,received:r.parsedType}),fr.INVALID;let n=r.parsedType===oi.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,fr.OK)(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};cr.ZodPromise=tD;tD.create=(t,e)=>new tD({type:t,typeName:vo.ZodPromise,...na(e)});var Rx=class extends ia{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===vo.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:c=>{(0,fr.addIssueToContext)(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return fr.INVALID;let p=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return p.status==="aborted"?fr.INVALID:p.status==="dirty"||r.value==="dirty"?(0,fr.DIRTY)(p.value):p});{if(r.value==="aborted")return fr.INVALID;let u=this._def.schema._parseSync({data:c,path:n.path,parent:n});return u.status==="aborted"?fr.INVALID:u.status==="dirty"||r.value==="dirty"?(0,fr.DIRTY)(u.value):u}}if(o.type==="refinement"){let c=u=>{let p=o.refinement(u,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?fr.INVALID:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?fr.INVALID:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,fr.isValid)(c))return fr.INVALID;let u=o.transform(c.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>(0,fr.isValid)(c)?Promise.resolve(o.transform(c.value,s)).then(u=>({status:r.value,value:u})):fr.INVALID);oi.util.assertNever(o)}};cr.ZodEffects=Rx;cr.ZodTransformer=Rx;Rx.create=(t,e,r)=>new Rx({schema:t,typeName:vo.ZodEffects,effect:e,...na(r)});Rx.createWithPreprocess=(t,e,r)=>new Rx({schema:e,effect:{type:"preprocess",transform:t},typeName:vo.ZodEffects,...na(r)});var Yb=class extends ia{_parse(e){return this._getType(e)===oi.ZodParsedType.undefined?(0,fr.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};cr.ZodOptional=Yb;Yb.create=(t,e)=>new Yb({innerType:t,typeName:vo.ZodOptional,...na(e)});var lS=class extends ia{_parse(e){return this._getType(e)===oi.ZodParsedType.null?(0,fr.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};cr.ZodNullable=lS;lS.create=(t,e)=>new lS({innerType:t,typeName:vo.ZodNullable,...na(e)});var ZR=class extends ia{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===oi.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};cr.ZodDefault=ZR;ZR.create=(t,e)=>new ZR({innerType:t,typeName:vo.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...na(e)});var XR=class extends ia{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,fr.isAsync)(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Xn.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Xn.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};cr.ZodCatch=XR;XR.create=(t,e)=>new XR({innerType:t,typeName:vo.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...na(e)});var Zj=class extends ia{_parse(e){if(this._getType(e)!==oi.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:oi.ZodParsedType.nan,received:n.parsedType}),fr.INVALID}return{status:"valid",value:e.data}}};cr.ZodNaN=Zj;Zj.create=t=>new Zj({typeName:vo.ZodNaN,...na(t)});cr.BRAND=Symbol("zod_brand");var YU=class extends ia{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};cr.ZodBranded=YU;var JU=class t extends ia{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?fr.INVALID:s.status==="dirty"?(r.dirty(),(0,fr.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?fr.INVALID:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:vo.ZodPipeline})}};cr.ZodPipeline=JU;var eO=class extends ia{_parse(e){let r=this._def.innerType._parse(e),n=o=>((0,fr.isValid)(o)&&(o.value=Object.freeze(o.value)),o);return(0,fr.isAsync)(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};cr.ZodReadonly=eO;eO.create=(t,e)=>new eO({innerType:t,typeName:vo.ZodReadonly,...na(e)});function uUe(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function hUe(t,e={},r){return t?eD.create().superRefine((n,o)=>{var c,u;let s=t(n);if(s instanceof Promise)return s.then(p=>{var f,h;if(!p){let m=uUe(e,n),y=(h=(f=m.fatal)!=null?f:r)!=null?h:!0;o.addIssue({code:"custom",...m,fatal:y})}});if(!s){let p=uUe(e,n),f=(u=(c=p.fatal)!=null?c:r)!=null?u:!0;o.addIssue({code:"custom",...p,fatal:f})}}):eD.create()}cr.late={object:tv.lazycreate};var vo;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(vo||(cr.ZodFirstPartyTypeKind=vo={}));var Ncr=(t,e={message:`Input not instance of ${t.name}`})=>hUe(r=>r instanceof t,e);cr.instanceof=Ncr;var mUe=XT.create;cr.string=mUe;var gUe=QR.create;cr.number=gUe;var Fcr=Zj.create;cr.nan=Fcr;var Lcr=qR.create;cr.bigint=Lcr;var AUe=UR.create;cr.boolean=AUe;var jcr=zR.create;cr.date=jcr;var Mcr=Wj.create;cr.symbol=Mcr;var Qcr=$R.create;cr.undefined=Qcr;var qcr=HR.create;cr.null=qcr;var Ucr=eD.create;cr.any=Ucr;var zcr=sI.create;cr.unknown=zcr;var $cr=G1.create;cr.never=$cr;var Hcr=Yj.create;cr.void=Hcr;var Gcr=oI.create;cr.array=Gcr;var Vcr=tv.create;cr.object=Vcr;var Wcr=tv.strictCreate;cr.strictObject=Wcr;var Ycr=GR.create;cr.union=Ycr;var Jcr=DJ.create;cr.discriminatedUnion=Jcr;var Kcr=VR.create;cr.intersection=Kcr;var Zcr=uS.create;cr.tuple=Zcr;var Xcr=PJ.create;cr.record=Xcr;var eur=Jj.create;cr.map=eur;var tur=Kj.create;cr.set=tur;var rur=BJ.create;cr.function=rur;var nur=WR.create;cr.lazy=nur;var iur=YR.create;cr.literal=iur;var sur=JR.create;cr.enum=sur;var our=KR.create;cr.nativeEnum=our;var aur=tD.create;cr.promise=aur;var yUe=Rx.create;cr.effect=yUe;cr.transformer=yUe;var cur=Yb.create;cr.optional=cur;var uur=lS.create;cr.nullable=uur;var lur=Rx.createWithPreprocess;cr.preprocess=lur;var pur=JU.create;cr.pipeline=pur;var fur=()=>mUe().optional();cr.ostring=fur;var dur=()=>gUe().optional();cr.onumber=dur;var hur=()=>AUe().optional();cr.oboolean=hur;cr.coerce={string:t=>XT.create({...t,coerce:!0}),number:t=>QR.create({...t,coerce:!0}),boolean:t=>UR.create({...t,coerce:!0}),bigint:t=>qR.create({...t,coerce:!0}),date:t=>zR.create({...t,coerce:!0})};cr.NEVER=fr.INVALID});var lhe=R(Kb=>{"use strict";var mur=Kb&&Kb.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Xj=Kb&&Kb.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&mur(e,t,r)};Object.defineProperty(Kb,"__esModule",{value:!0});Xj(IJ(),Kb);Xj(ahe(),Kb);Xj(sUe(),Kb);Xj(VU(),Kb);Xj(vUe(),Kb);Xj(CJ(),Kb)});var EUe=R(rv=>{"use strict";var xUe=rv&&rv.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),gur=rv&&rv.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Aur=rv&&rv.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&xUe(e,t,r);return gur(e,t),e},yur=rv&&rv.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xUe(e,t,r)};Object.defineProperty(rv,"__esModule",{value:!0});rv.z=void 0;var bUe=Aur(lhe());rv.z=bUe;yur(lhe(),rv);rv.default=bUe});var mhe=R((Lpi,NUe)=>{var dhe=Object.defineProperty,vur=Object.getOwnPropertyDescriptor,xur=Object.getOwnPropertyNames,bur=Object.prototype.hasOwnProperty,Eur=(t,e)=>{for(var r in e)dhe(t,r,{get:e[r],enumerable:!0})},wur=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of xur(e))!bur.call(t,o)&&o!==r&&dhe(t,o,{get:()=>e[o],enumerable:!(n=vur(e,o))||n.enumerable});return t},_ur=t=>wur(dhe({},"__esModule",{value:!0}),t),SUe={};Eur(SUe,{defineConfig:()=>Uur,envConfigSchema:()=>qur,filteredTefConfigSchema:()=>Mur,nodeFunctionsConfigSchema:()=>BUe,pathMatch:()=>e4,sandboxConfigSchema:()=>OUe,showError:()=>KU,tefBuildConfigSchema:()=>CUe,tefConfCachesSchema:()=>RUe,tefConfigSchema:()=>hhe,tefDevConfigSchema:()=>kUe,tefDevSiteConfigSchema:()=>IUe,tefPublishConfigSchema:()=>PUe,tefRuleConditionSchema:()=>TUe,tefRuleConfigSchema:()=>DUe,validateConfig:()=>zur});NUe.exports=_ur(SUe);var Sr=EUe(),CUe=Sr.z.object({monitor:Sr.z.array(Sr.z.string()).optional(),command:Sr.z.string().optional(),cwd:Sr.z.string().optional(),target_file:Sr.z.string()}),IUe=Sr.z.object({assets_dir:Sr.z.string().optional(),proxy_path:Sr.z.string().optional()}),kUe=Sr.z.object({port:Sr.z.union([Sr.z.number(),Sr.z.string()]).optional(),origin:Sr.z.string().optional(),timeout:Sr.z.union([Sr.z.number(),Sr.z.string()]).optional(),sandbox:Sr.z.boolean().optional(),favicon:Sr.z.boolean().optional(),minify:Sr.z.boolean().optional(),site:IUe.optional()}),TUe=Sr.z.object({target:Sr.z.string(),operator:Sr.z.union([Sr.z.literal("equal"),Sr.z.literal("notequal")]),values:Sr.z.array(Sr.z.string())}),DUe=Sr.z.object({condition:Sr.z.array(TUe)}),PUe=Sr.z.object({minify:Sr.z.boolean().optional(),rule:Sr.z.array(DUe).optional()}),BUe=Sr.z.object({maxDuration:Sr.z.number().min(10).max(120).optional()}),Fpi=Sr.z.object({type:Sr.z.enum(["header","cookie","host","query"]),key:Sr.z.string(),value:Sr.z.string().optional()}),e4=(t,e)=>{var o,s;let r=t.replace(/\\([?*])/g,"$1");return r.length===0?e.addIssue({code:Sr.z.ZodIssueCode.custom,message:"length match error"}):/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(r)?e.addIssue({code:Sr.z.ZodIssueCode.custom,message:"char match error"}):((s=(o=r.match(/\*/g))==null?void 0:o.length)!=null?s:0)>1?e.addIssue({code:Sr.z.ZodIssueCode.custom,message:"* match error"}):/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(r)||/:(?![a-zA-Z0-9]+)/.test(r)?e.addIssue({code:Sr.z.ZodIssueCode.custom,message:": match error"}):!0},OJ=Sr.z.object({source:Sr.z.string().superRefine(e4)});function Sur(t){let e=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of e){let n=r.indexOf("="),o=n===-1?r.trim().toLowerCase():r.slice(0,n).trim().toLowerCase();if(o==="stale-while-revalidate"||o==="stale-if-error"){let s=`${o}=86400`;if(n===-1)return`value match error: Cache-Control directive "${o}" must be in k=v form (e.g. ${s})`;if(!r.slice(n+1).trim())return`value match error: Cache-Control directive "${r}" must have a value (e.g. ${s})`}}}var Cur=Sr.z.object({key:Sr.z.string().min(1).max(100).superRefine((t,e)=>/[^a-zA-Z0-9-]/.test(t)?e.addIssue({code:Sr.z.ZodIssueCode.custom,message:"char match error"}):!0),value:Sr.z.string().min(1).max(1e3).superRefine((t,e)=>/[\u4e00-\u9fa5]/.test(t)?e.addIssue({code:Sr.z.ZodIssueCode.custom,message:"char match error"}):!0)}).superRefine((t,e)=>{if(t.key.toLowerCase()==="cache-control"){let r=Sur(t.value);r&&e.addIssue({code:Sr.z.ZodIssueCode.custom,path:["value"],message:r})}}),Iur=Cur.array().min(1),kur=OJ.merge(Sr.z.object({headers:Iur})).array(),Tur=Sr.z.union([Sr.z.literal(307),Sr.z.literal(301),Sr.z.literal(302),Sr.z.literal(308),Sr.z.literal(303),Sr.z.literal(304)]),Dur=OJ.merge(Sr.z.object({destination:Sr.z.string().superRefine(e4),permanent:Sr.z.boolean().optional(),statusCode:Tur.optional()})).array(),Pur=OJ.merge(Sr.z.object({destination:Sr.z.string().superRefine(e4)})),Bur=Sr.z.object({src:Sr.z.string().superRefine(e4),dest:Sr.z.string().superRefine(e4)}),Rur=Sr.z.union([Pur,Bur]).array(),RUe=OJ.merge(Sr.z.object({cacheTtl:Sr.z.number()})).array(),wUe=Sr.z.object({included_files:Sr.z.array(Sr.z.string()).optional().describe("Glob patterns for files to include in the function bundle"),included_files_base_path:Sr.z.string().optional().describe("Base path for included_files patterns, defaults to project root"),external_node_modules:Sr.z.array(Sr.z.string()).optional().describe("Node modules to be treated as external dependencies")}),Our=Sr.z.object({includeFiles:Sr.z.array(Sr.z.string()).optional().describe("Glob patterns for files to include in the function bundle"),externalNodeModules:Sr.z.array(Sr.z.string()).optional().describe("Node modules to be treated as external dependencies"),maxDuration:Sr.z.number().min(10).max(120).optional().describe("Maximum execution duration for a single invocation (seconds)")}),_Ue=Sr.z.object({maxDuration:Sr.z.number().min(10).max(120).optional().describe("Maximum execution duration for a single invocation (seconds)")}),Nur=Sr.z.object({dir:Sr.z.string().optional().describe("Directory containing agent route files, relative to project root"),framework:Sr.z.enum(["claude-agent-sdk","openai-sdk","openai-agents-sdk","langgraph","crewai","deepagents"]).optional().describe("Agent framework hint for runtime adapters"),runtime:Sr.z.string().regex(/^(agent-node|agent-python):(\d+|\d+\.\d+\.\d+)(\|(agent-node|agent-python):(\d+|\d+\.\d+\.\d+))*$/).optional().describe("Agent runtime image tag, e.g. agent-node:1 or agent-python:1.2.0"),timeout:Sr.z.number().min(1).max(1800).optional().describe("Maximum execution duration for a single agent run (seconds)"),idleTimeout:Sr.z.number().int().min(1).max(21600).optional().describe("Maximum idle time for an agent session before recycling (seconds)"),maxLifetime:Sr.z.number().int().min(1).max(604800).optional().describe("Maximum lifetime of an agent session (seconds)"),memoryQuota:Sr.z.object({maxMessagesPerConversation:Sr.z.number().int().positive().optional().describe("Maximum messages allowed in a single memory conversation")}).optional().describe("Agent memory quota settings"),includeFiles:Sr.z.array(Sr.z.string()).optional().describe("Glob patterns for files to include in the agent bundle"),sandbox:Sr.z.object({timeout:Sr.z.number().int().positive().optional().describe("Sandbox instance lifetime/idle timeout in seconds")}).optional().describe("Sandbox configuration for agent runtime"),externalNodeModules:Sr.z.array(Sr.z.string()).optional().describe("Node modules to be treated as external dependencies for agent runtime"),auth:Sr.z.object({type:Sr.z.literal("jwt").optional().describe("Auth type. Only 'jwt' is supported; defaults to 'jwt' when omitted."),algorithm:Sr.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512"]).optional().describe("JWT signing algorithm (asymmetric only). Defaults to RS256."),verificationKeys:Sr.z.array(Sr.z.string().min(1)).min(1).describe("Array of PEM public keys for JWT verification. At least one required.")}).optional().describe('JWT auth config (agent-level, covers all routes including /mcp). Verification is done at the edge controller; the agent runtime exposes the verified identity as the "makers-user-id" request header.')}),OUe=Sr.z.object({timeout:Sr.z.number().int().positive().optional().describe("Sandbox instance lifetime/idle timeout in seconds")}),Fur=Sr.z.object({maxDuration:Sr.z.number().min(10).max(120).optional().describe("Maximum execution duration for a single invocation (seconds)"),regions:Sr.z.object({mainland:Sr.z.array(Sr.z.string()).optional().describe('\u56FD\u5185 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-beijing"]'),overseas:Sr.z.array(Sr.z.string()).optional().describe('\u6D77\u5916 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-tokyo"]')}).optional(),includeFiles:Sr.z.array(Sr.z.string()).optional().describe("Glob patterns for files to include in the function bundle"),externalNodeModules:Sr.z.array(Sr.z.string()).optional().describe("Node modules to be treated as external dependencies"),nodejs:Our.optional(),python:_Ue.optional(),go:_Ue.optional(),mainlandRegions:Sr.z.array(Sr.z.string()).optional().describe('\u56FD\u5185 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-shanghai"]'),overseasRegions:Sr.z.array(Sr.z.string()).optional().describe('\u6D77\u5916 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-bangkok"]')}),Lur=Sr.z.object({name:Sr.z.string().min(1).max(128).describe("Unique name for the schedule task within the project"),cron:Sr.z.string().min(1).describe("Standard 5-field cron expression, e.g. */5 * * * *"),timezone:Sr.z.string().optional().describe("Timezone for cron parsing, e.g. Asia/Shanghai. Defaults to local system timezone at build time"),method:Sr.z.enum(["GET","POST","PUT","DELETE","PATCH","HEAD"]).optional().default("POST").describe("HTTP method for the trigger request. Defaults to POST"),path:Sr.z.string().min(1).describe("HTTP path of the cloud function to trigger, e.g. /api/cron/tick"),payload:Sr.z.record(Sr.z.unknown()).optional().describe("JSON payload to send with the trigger request")}),jur=Sr.z.array(Lur).max(10),hhe=Sr.z.object({name:Sr.z.string().optional(),main:Sr.z.string().optional(),zone_id:Sr.z.string().optional(),create_date:Sr.z.string().optional(),dev:kUe.optional(),publish:PUe.optional(),build:CUe.optional(),$schema:Sr.z.string().transform(t=>"").optional(),outputDirectory:Sr.z.string().optional().describe("the output directory relative to project root directory after run build command."),installCommand:Sr.z.string().optional().describe("the install command to run."),buildCommand:Sr.z.string().optional().describe("the build command to run."),nodeVersion:Sr.z.string().optional().describe("the node version to use."),nodeFunctionsConfig:BUe.optional(),cloudFunctions:Fur.optional(),agents:Nur.optional(),sandbox:OUe.optional(),headers:kur.optional(),redirects:Dur.optional(),rewrites:Rur.optional(),caches:RUe.optional(),"node-functions":wUe.optional().describe("Node function specific configuration"),"edge-functions":wUe.optional().describe("Edge function specific configuration"),schedules:jur.optional().describe("Cron schedule tasks that trigger cloud functions"),isr:Sr.z.object({bypassToken:Sr.z.string().optional().describe("bypass token for x-prerender-revalidate header")}).optional()}),phe=Symbol("filteredSchema"),RJ=Symbol("symFilteredValue"),Mur=fhe(hhe);function Qur(t){return t.errors.map(e=>`${e.message}`).join(`
|
|
19
19
|
`)}function KU(){return!0}function fhe(t,e=["root"]){if(t[phe])return t;let r=t;if((t instanceof Sr.z.ZodOptional||t instanceof Sr.z.ZodNullable||t instanceof Sr.z.ZodReadonly||t instanceof Sr.z.ZodPromise||t instanceof Sr.z.ZodBranded)&&(r=t.unwrap()),r[phe])return r;let n=null;try{if(r instanceof Sr.z.ZodArray){let o=fhe(r.element,[...e,"[]"]);return n=Sr.z.array(Sr.z.any()).optional().transform(s=>{if(e.length===4&&e.includes("headers")&&(s?s!=null&&s.length||console.warn('"error in root.headers.[].headers": length is invalid, min 1 length error'):console.warn('"error in root.headers.[].headers": undefined is invalid, Required')),!s)return;if(!s.length)return[];let c=[];for(let p=0;p<s.length;p++){let f=s[p];if(f===RJ)continue;let h=o.safeParse(f,{path:[...e,`[${p}]`]});if(!h.success){KU();continue}!h.data||h.data===RJ||c.push(h.data)}let u=30;return e.length===4&&e[3]==="headers"&&c.length>3?(console.warn(`"error in root.headers.[].headers": length is invalid, max ${u} length error`),c.slice(0,u)):c}),n}return r instanceof Sr.z.ZodObject?(n=Sr.z.object(Object.fromEntries(Object.entries(r.shape).map(([o,s])=>[o,fhe(s,[...e,o])]))).transform(o=>{let s=t.safeParse(o,{path:e});return s.success?s.data:(KU(),RJ)}),n):(n=Sr.z.any().transform(o=>{if(o===RJ)return;let s=t.safeParse(o,{path:e});if(!s.success){KU()&&console.warn(`"error in ${e.join(".")}": ${JSON.stringify(o)} is invalid, ${Qur(s.error)}`);return}return s.data}),n)}catch(o){KU()&&console.error("%c [ e ]-220","font-size:13px; background:pink; color:#bf2c9f;",o)}finally{n&&(n[phe]=!0)}return n}var qur=Sr.z.object({TENCENT_SECRET_KEY:Sr.z.string(),TENCENT_SECRET_ID:Sr.z.string(),DEV_SERVER_ENDPOINT:Sr.z.string().optional(),DEV_SERVER_PORT:Sr.z.union([Sr.z.number(),Sr.z.string()]).optional()});function Uur(t){return t}function zur(t){return hhe.safeParse(t)}});var f0={};Nj(f0,{default:()=>ghe});var NJ,ghe,FJ=Yr(()=>{NJ=bt(mhe());PU(f0,bt(mhe()));ghe={tefConfigSchema:NJ.tefConfigSchema,envConfigSchema:NJ.envConfigSchema}});function $ur(t){return t.length===1?t[0].toString():t.reduce((e,r)=>{if(typeof r=="number")return`${e}[${r.toString()}]`;if(r.includes('"'))return`${e}["${r.replace(/"/g,'\\"')}"]`;if(!/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u.test(r))return`${e}["${r}"]`;let n=e.length===0?"":".";return e+n+r},"")}function FUe(t,e,r){var n;if(t.code==="invalid_union")return t.unionErrors.reduce((o,s)=>{let c=s.issues.map(u=>FUe(u,e,r)).join(e);return o.includes(c)||o.push(c),o},[]).join(r);if(((n=t.path)==null?void 0:n.length)!==0){if(t.path.length===1){let o=t.path[0];if(typeof o=="number")return`${t.message} at index ${o}`}return`${t.message} at "${$ur(t.path)}"`}return t.message}function Hur(t,e,r){return t.length>0?[e,t].join(r):e}function Gur(t,e){let{issueSeparator:r=`
|
|
20
20
|
`,unionSeparator:n=", or ",prefixSeparator:o=`
|
|
21
|
-
`,prefix:s}=e,c=t.errors.map(u=>FUe(u,r,n)).join(r);return Hur(c,s,o)}var ZU,tO,LJ,jJ,Ahe=Yr(()=>{ZU=class extends Error{handled;constructor(e){super(e),this.handled=!0,this.name=this.constructor.name}},tO=class extends ZU{constructor(e){super(`[ConfigLoadError] ${e}`)}},LJ=class extends ZU{constructor(e){super(`[ConfigSaveError] ${e}`)}};jJ=class extends ZU{details;constructor(e,r){let n=Gur(r,{prefix:`${e}:`});super(`[ValidationError] ${n}`),this.details=r.errors}}});var yhe,Qpi,LUe=Yr(()=>{yhe=class{log(e,r){try{let n=this.format(r),o=JSON.stringify({key:e,value:n});process.send(o)}catch{}}format(e){return typeof e=="object"?JSON.stringify(e):typeof e=="number"?String(e):e}},Qpi=new yhe});function ug(t){return Object.prototype.toString.call(t)==="[object Object]"}function aI(t){return Object.prototype.toString.call(t)==="[object Array]"}function nv(t){return Object.prototype.toString.call(t)==="[object String]"}function _he(t){return Object.prototype.toString.call(t)==="[object Number]"}function UUe(t){return Object.prototype.toString.call(t)==="[object Undefined]"}function t5(t){var n;let e=t.replace(/\\([?*])/g,"$1");if(t.length===0)return Cs.min_string;if(e.length>500)return Cs.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(e)||((n=e.match(/\*/g))==null?void 0:n.length)>1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(e)||/:(?![a-zA-Z0-9]+)/.test(e))return Cs.char_match;if(e.length){let o=e.split("/");if(o.some(u=>u.includes(":")&&(u.includes("*")||u.includes(".")))||o.some(u=>u.split(":").length>2))return Cs.char_match}}function whe(t){var r;if(t=t.replace(/^https?:\/\//,""),t.length===0)return Cs.min_string;if(t.length>500)return Cs.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(t)||((r=t.match(/\*/g))==null?void 0:r.length)>=1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(t)||/:(?![a-zA-Z0-9]+)/.test(t))return Cs.char_match}function Vur(t){if(t.length===0)return Cs.min_string;if(t.length>100)return Cs.max_string;if(/[^a-zA-Z0-9-]/.test(t))return Cs.char_match}function Wur(t){if(t.length===0)return Cs.min_string;if(t.length>1e3)return Cs.max_string;if(/[\u4e00-\u9fa5]/.test(t))return Cs.char_match}function Yur(t){let e=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of e){let n=r.indexOf("="),o=n===-1?r.trim().toLowerCase():r.slice(0,n).trim().toLowerCase();if(o==="stale-while-revalidate"||o==="stale-if-error"){let s=`${o}=86400`;if(n===-1)return`${Cs.value_match}: Cache-Control directive "${o}" must be in k=v form (e.g. ${s})`;if(!r.slice(n+1).trim())return`${Cs.value_match}: Cache-Control directive "${r}" must have a value (e.g. ${s})`}}}function Jur(t){if(![301,302,303,304,307,308].includes(t))return Cs.value_match}function Kur(t){if(typeof t!="number"||!Number.isInteger(t)||t<0)return Cs.value_match}function Zur(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{key:c,value:u}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"key"],message:Cs.invalid_type});continue}let p=Vur(c);if(p){n.push({path:[...e,`[${o}]`,"key"],message:p});continue}if(!nv(u)){n.push({path:[...e,`[${o}]`,"value"],message:Cs.invalid_type});continue}let f=Wur(u);if(f){n.push({path:[...e,`[${o}]`,"value"],message:f});continue}if(c.toLowerCase()==="cache-control"){let h=Yur(u);if(h){n.push({path:[...e,`[${o}]`,"value"],message:h});continue}}r.push({key:c,value:u})}return[r,n]}function Xur(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{source:c,headers:u}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let p=t5(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}let[f,h]=Zur(u,[...e,`[${o}]`,"headers"]);f.length>100&&(h.push({path:[...e,`[${o}]`,"headers"],message:Cs.max_length}),f=f.slice(0,100)),(u==null?void 0:u.length)<1&&f.length<1&&h.push({path:[...e,`[${o}]`,"headers"],message:Cs.min_length}),f.length&&r.push({source:c,headers:f}),n.push(...h)}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function elr(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{source:c,destination:u,statusCode:p}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let f=t5(c);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!nv(u)){n.push({path:[...e,`[${o}]`,"destination"],message:Cs.invalid_type});continue}let h=whe(u);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}if(!_he(p)){n.push({path:[...e,`[${o}]`,"statusCode"],message:Cs.invalid_type});continue}let m=Jur(p);if(m){n.push({path:[...e,`[${o}]`,"statusCode"],message:m});continue}r.push({source:c,destination:u,statusCode:p})}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function tlr(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}if("src"in s||"dest"in s){let{src:m,dest:y}=s;if(!nv(m)){n.push({path:[...e,`[${o}]`,"src"],message:Cs.invalid_type});continue}let x=t5(m);if(x){n.push({path:[...e,`[${o}]`,"src"],message:x});continue}if(!nv(y)){n.push({path:[...e,`[${o}]`,"dest"],message:Cs.invalid_type});continue}let A=whe(y);if(A){n.push({path:[...e,`[${o}]`,"dest"],message:A});continue}r.push({src:m,dest:y});continue}let{source:u,destination:p}=s;if(!nv(u)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let f=t5(u);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!nv(p)){n.push({path:[...e,`[${o}]`,"destination"],message:Cs.invalid_type});continue}let h=whe(p);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}r.push({source:u,destination:p})}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function rlr(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{source:c,cacheTtl:u}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let p=t5(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}if(!_he(u)){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:Cs.invalid_type});continue}let f=Kur(u);if(f){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:f});continue}r.push({source:c,cacheTtl:u})}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function rD(t){if(!aI(t))return;let e=t.filter(r=>nv(r)&&r.trim().length>0);return e.length>0?e:[]}function XU(t){if(!nv(t))return;let e=t.trim();return e.length>0?e:void 0}function MJ(t,e,r,n){let o=[],s=[];if(UUe(t))return[void 0,s];if(!aI(t))return s.push({path:[...e],message:Cs.invalid_type}),[void 0,s];for(let c in t){let u=t[c];if(!nv(u)){s.push({path:[...e,`[${c}]`],message:Cs.invalid_type});continue}let p=u.trim();if(!r.has(p)){s.push({code:"invalid_region",path:[...e,`[${c}]`],message:`${Cs.value_match}: region id must be one of [${n.join(", ")}]`});continue}o.push(p)}return[o,s]}function zUe(t,e){return aI(t)&&aI(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t===e}function qUe({newValue:t,newPath:e,legacySources:r,path:n}){let o=[],s=rD(t),c=s!==void 0?e:void 0;for(let u of r){let p=rD(u.value);if(p!==void 0){if(o.push({code:"deprecated_config",path:[...n,...u.path],message:u.deprecatedMessage}),s===void 0){s=p,c=u.displayPath;continue}u.checkConflict!==!1&&!zUe(s,p)&&o.push({code:e5.conflict,path:[...n,...u.path],message:`[CONFIG_CONFLICT] ${c} and ${u.displayPath} have conflicting values. Please keep only ${e}.`})}}return[s,o]}function vhe(t,e,r){if(!UUe(t)){if(!_he(t)||!Number.isFinite(t)){r.push({path:[...e],message:Cs.invalid_type});return}return t}}function nlr(t,e){var ze,Tt,Dt;let r=ug(t.cloudFunctions)?t.cloudFunctions:{},n=ug(r.nodejs)?r.nodejs:{},o=ug(r.regions)?r.regions:{},s=ug(t["node-functions"])?t["node-functions"]:{},c=ug(t.nodeFunctionsConfig)?t.nodeFunctionsConfig:{},u=[];!QUe&&nv(s.included_files_base_path)&&s.included_files_base_path.trim()&&(QUe=!0,console.warn("`node-functions.included_files_base_path` is deprecated and no longer takes effect. `cloudFunctions.includeFiles` is always resolved from the project root."));let[p,f]=qUe({newValue:r.includeFiles,newPath:"cloudFunctions.includeFiles",path:e,legacySources:[{value:n.includeFiles,path:["cloudFunctions","nodejs","includeFiles"],displayPath:"cloudFunctions.nodejs.includeFiles",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.includeFiles, please migrate to cloudFunctions.includeFiles. The old field will be removed in a future version."},{value:s.included_files,path:["node-functions","included_files"],displayPath:"node-functions.included_files",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.included_files, which has been mapped to cloudFunctions.includeFiles. Please migrate to the new field."}]}),[h,m]=qUe({newValue:r.externalNodeModules,newPath:"cloudFunctions.externalNodeModules",path:e,legacySources:[{value:n.externalNodeModules,path:["cloudFunctions","nodejs","externalNodeModules"],displayPath:"cloudFunctions.nodejs.externalNodeModules",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.externalNodeModules, please migrate to cloudFunctions.externalNodeModules. The old field will be removed in a future version."},{value:s.external_node_modules,path:["node-functions","external_node_modules"],displayPath:"node-functions.external_node_modules",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.external_node_modules, which has been mapped to cloudFunctions.externalNodeModules. Please migrate to the new field."}]});u.push(...f,...m);let y={};p!==void 0&&(y.includeFiles=p),h!==void 0&&(y.externalNodeModules=h);let x=vhe(r.maxDuration,[...e,"cloudFunctions","maxDuration"],u),A=[];for(let ut of["nodejs","python","go"]){let qe=ug(r[ut])?r[ut]:{},Ke=vhe(qe.maxDuration,[...e,"cloudFunctions",ut,"maxDuration"],u);Ke!==void 0&&(A.push({runtime:ut,value:Ke,displayPath:`cloudFunctions.${ut}.maxDuration`}),u.push({code:"deprecated_config",path:[...e,"cloudFunctions",ut,"maxDuration"],message:`[DEPRECATED] Detected cloudFunctions.${ut}.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field.`}))}let I=vhe(c.maxDuration,[...e,"nodeFunctionsConfig","maxDuration"],u);I!==void 0&&u.push({code:"deprecated_config",path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[DEPRECATED] Detected nodeFunctionsConfig.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field."});let w=A.find(({runtime:ut})=>ut==="nodejs");w&&I!==void 0&&w.value!==I&&u.push({code:e5.conflict,path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[CONFIG_CONFLICT] cloudFunctions.nodejs.maxDuration and nodeFunctionsConfig.maxDuration have conflicting values. Please keep only cloudFunctions.maxDuration."});let k=[...A];I!==void 0&&w===void 0&&k.push({runtime:"nodejs",value:I,displayPath:"nodeFunctionsConfig.maxDuration"});let B=x;if(x!==void 0)for(let{displayPath:ut,value:qe}of k)qe!==x&&u.push({code:e5.conflict,path:[...e,...ut.split(".")],message:`[CONFIG_CONFLICT] cloudFunctions.maxDuration and ${ut} have conflicting values. Please keep only cloudFunctions.maxDuration.`});else if(k.length>0)if(new Set(k.map(({value:qe})=>qe)).size>1){let qe=k.map(({runtime:Ke,value:rt})=>`${Ke}: ${rt}`).join(", ");u.push({code:e5.migrationRequired,path:[...e,"cloudFunctions"],message:`[MIGRATION_REQUIRED] Detected conflicting cloudFunctions.*.maxDuration values (${qe}). The new structure only supports a single cloudFunctions.maxDuration; please choose one value and migrate.`})}else B=k[0].value;B!==void 0&&(y.maxDuration=B);let[j,Q]=MJ(o.mainland,[...e,"cloudFunctions","regions","mainland"],jUe,bhe),[H,te]=MJ(r.mainlandRegions,[...e,"cloudFunctions","mainlandRegions"],jUe,bhe),[Z,xe]=MJ(o.overseas,[...e,"cloudFunctions","regions","overseas"],MUe,Ehe),[le,he]=MJ(r.overseasRegions,[...e,"cloudFunctions","overseasRegions"],MUe,Ehe);u.push(...Q,...te,...xe,...he);function ne({newValue:ut,legacyValue:qe,legacyField:Ke,newField:rt}){return qe!==void 0&&(u.push({code:"deprecated_config",path:[...e,...Ke.split(".")],message:`[DEPRECATED] Detected ${Ke}, please migrate to ${rt}. The old field will be removed in a future version.`}),ut!==void 0&&!zUe(ut,qe)&&u.push({code:e5.conflict,path:[...e,...Ke.split(".")],message:`[CONFIG_CONFLICT] ${Ke} and ${rt} have conflicting values. Please keep only ${rt}.`})),ut!==void 0?ut:qe}let be=ne({newValue:j,legacyValue:H,legacyField:"cloudFunctions.mainlandRegions",newField:"cloudFunctions.regions.mainland"}),ae=ne({newValue:Z,legacyValue:le,legacyField:"cloudFunctions.overseasRegions",newField:"cloudFunctions.regions.overseas"});(be!==void 0||ae!==void 0)&&(y.regions={},be!==void 0&&(y.regions.mainland=be),ae!==void 0&&(y.regions.overseas=ae));let G={},me=(ze=rD(n.includeFiles))!=null?ze:rD(s.included_files),Ce=(Tt=rD(n.externalNodeModules))!=null?Tt:rD(s.external_node_modules);me!==void 0&&(G.includeFiles=me),Ce!==void 0&&(G.externalNodeModules=Ce);let Te=(Dt=w==null?void 0:w.value)!=null?Dt:I;Te!==void 0&&(G.maxDuration=Te),Object.keys(G).length>0&&Object.defineProperty(y,"nodejs",{configurable:!0,value:G});for(let ut of["python","go"]){let qe=A.find(Ke=>Ke.runtime===ut);qe&&Object.defineProperty(y,ut,{configurable:!0,value:{maxDuration:qe.value}})}return H!==void 0&&Object.defineProperty(y,"mainlandRegions",{configurable:!0,value:H}),le!==void 0&&Object.defineProperty(y,"overseasRegions",{configurable:!0,value:le}),[y,u]}function xhe(t,e,r){return typeof t!="number"||!Number.isFinite(t)?e:Math.min(Math.max(Math.floor(t),1),r)}function alr(t){let e=ug(t.agents),r=e?t.agents:{},n=XU(r.dir),o=XU(r.framework),s=XU(r.runtime),c=e?xhe(r.timeout,void 0,ilr):void 0,u=e?xhe(r.idleTimeout,void 0,slr):void 0,p=e?xhe(r.maxLifetime,void 0,olr):void 0,f=rD(r.includeFiles),h=rD(r.externalNodeModules),m=ug(r.sandbox)?r.sandbox:void 0,y=$Ue(m==null?void 0:m.timeout),x=ug(r.memoryQuota)?r.memoryQuota:void 0,A=x&&typeof x.maxMessagesPerConversation=="number"?x.maxMessagesPerConversation:void 0,I={},w=ug(r.auth)?r.auth:void 0;if(w!==void 0){let k=XU(w.type);if(k!==void 0&&k!=="jwt"){let Z=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.type "${k}" is not supported. Only "jwt" is available.`);throw Z.code="BLOCKING_CONFIG_ERROR",Z}let B=new Set(["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512"]),j=XU(w.algorithm);if(j!==void 0&&!B.has(j)){let Z=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.algorithm "${j}" is not supported. Only asymmetric algorithms are allowed (RS256/RS384/RS512/ES256/ES384/ES512/PS256/PS384/PS512). Symmetric algorithms (HS*) are not supported because the edge controller would have to hold the signing key.`);throw Z.code="BLOCKING_CONFIG_ERROR",Z}let Q=j||"RS256",te=(Array.isArray(w.verificationKeys)?w.verificationKeys:[]).filter(Z=>typeof Z=="string"&&Z.trim().length>0).map(Z=>Z.trim()).filter((Z,xe,le)=>le.indexOf(Z)===xe);if(te.length===0){let Z=new Error("[BLOCKING_CONFIG_ERROR] agents.auth.verificationKeys must contain at least one non-empty PEM public key.");throw Z.code="BLOCKING_CONFIG_ERROR",Z}I.auth={type:"jwt",algorithm:Q,verificationKeys:te}}return n!==void 0&&(I.dir=n),o!==void 0&&(I.framework=o),s!==void 0&&(I.runtime=s),c!==void 0&&(I.timeout=c),u!==void 0&&(I.idleTimeout=u),p!==void 0&&(I.maxLifetime=p),A!==void 0&&(I.memoryQuota={maxMessagesPerConversation:A}),y!==void 0&&(I.sandbox={timeout:y}),f!==void 0&&(I.includeFiles=f),h!==void 0&&(I.externalNodeModules=h),I}function $Ue(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.floor(t);return e>0?e:void 0}function clr(t){let e=ug(t.sandbox)?t.sandbox:void 0,r={};if(!e)return r;let n=$Ue(e.timeout);return n!==void 0?r.timeout=n:e.timeout!==void 0&&(r.timeout=e.timeout),r}function r5(t,e){let r={headers:[],redirects:[],rewrites:[],caches:[]},n=[];if(!ug(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];let{headers:o=[],redirects:s=[],rewrites:c=[],caches:u=[]}=t,[p,f]=Xur(o,[...e,"headers"]),[h,m]=elr(s,[...e,"redirects"]),[y,x]=tlr(c,[...e,"rewrites"]),[A,I]=rlr(u,[...e,"caches"]);r.headers=p,r.redirects=h,r.rewrites=y,r.caches=A;let[w,k]=nlr(t,e),B=k.filter(Z=>(Z==null?void 0:Z.code)==="deprecated_config"),j=k.filter(Z=>(Z==null?void 0:Z.code)!=="deprecated_config"),Q=alr(t),H=clr(t);r["edge-functions"]=t["edge-functions"],r.trailingSlash=t.trailingSlash,Object.keys(w).length>0&&(r.cloudFunctions=w),Object.keys(Q).length>0&&(r.agents=Q),Object.keys(H).length>0&&(r.sandbox=H);let te=["outputDirectory","installCommand","buildCommand","nodeVersion","buildMachine","schedules","isr"];for(let Z in t)te.includes(Z)&&t[Z]&&(r[Z]=t[Z]);return n.push(...j,...f,...m,...x,...I),[r,n,B]}var Cs,bhe,Ehe,jUe,MUe,QUe,e5,ilr,slr,olr,She=Yr(()=>{Cs={invalid_type:"invalid type error",max_length:"max length error",min_length:"min length error",min_string:"string min error",max_string:"string max error",char_match:"char match error",value_match:"value match error"},bhe=["ap-guangzhou","ap-shanghai","ap-nanjing","ap-beijing","ap-chengdu"],Ehe=["ap-singapore","ap-hongkong","ap-bangkok","ap-jakarta","ap-seoul","ap-tokyo","eu-frankfurt","na-ashburn","na-siliconvalley"],jUe=new Set(bhe),MUe=new Set(Ehe);QUe=!1,e5={conflict:"config_conflict",migrationRequired:"migration_required"};ilr=60*60,slr=30*60,olr=6*60*60});var Za,Che,Ii,pS,n5=Yr(()=>{(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(let u of s)c[u]=o[u];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Za||(Za={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Che||(Che={}));Ii=Za.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pS=t=>{switch(typeof t){case"undefined":return Ii.undefined;case"string":return Ii.string;case"number":return Number.isNaN(t)?Ii.nan:Ii.number;case"boolean":return Ii.boolean;case"function":return Ii.function;case"bigint":return Ii.bigint;case"symbol":return Ii.symbol;case"object":return Array.isArray(t)?Ii.array:t===null?Ii.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ii.promise:typeof Map<"u"&&t instanceof Map?Ii.map:typeof Set<"u"&&t instanceof Set?Ii.set:typeof Date<"u"&&t instanceof Date?Ii.date:Ii.object;default:return Ii.unknown}}});var Fn,ulr,iv,QJ=Yr(()=>{n5();Fn=Za.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ulr=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),iv=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let u=n,p=0;for(;p<c.path.length;){let f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Za.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};iv.create=t=>new iv(t)});var llr,cI,Ihe=Yr(()=>{QJ();n5();llr=(t,e)=>{let r;switch(t.code){case Fn.invalid_type:t.received===Ii.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Fn.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Za.jsonStringifyReplacer)}`;break;case Fn.unrecognized_keys:r=`Unrecognized key(s) in object: ${Za.joinValues(t.keys,", ")}`;break;case Fn.invalid_union:r="Invalid input";break;case Fn.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Za.joinValues(t.options)}`;break;case Fn.invalid_enum_value:r=`Invalid enum value. Expected ${Za.joinValues(t.options)}, received '${t.received}'`;break;case Fn.invalid_arguments:r="Invalid function arguments";break;case Fn.invalid_return_type:r="Invalid function return type";break;case Fn.invalid_date:r="Invalid date";break;case Fn.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Za.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Fn.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Fn.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Fn.custom:r="Invalid input";break;case Fn.invalid_intersection_types:r="Intersection results could not be merged";break;case Fn.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Fn.not_finite:r="Number must be finite";break;default:r=e.defaultError,Za.assertNever(t)}return{message:r}},cI=llr});function plr(t){HUe=t}function t4(){return HUe}var HUe,qJ=Yr(()=>{Ihe();HUe=cI});function Ai(t,e){let r=t4(),n=i5({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===cI?void 0:cI].filter(o=>!!o)});t.common.issues.push(n)}var i5,flr,lg,to,rO,d0,UJ,zJ,nD,r4,khe=Yr(()=>{qJ();Ihe();i5=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let u="",p=n.filter(f=>!!f).slice().reverse();for(let f of p)u=f(c,{data:e,defaultError:u}).message;return{...o,path:s,message:u}},flr=[];lg=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return to;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return to;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}},to=Object.freeze({status:"aborted"}),rO=t=>({status:"dirty",value:t}),d0=t=>({status:"valid",value:t}),UJ=t=>t.status==="aborted",zJ=t=>t.status==="dirty",nD=t=>t.status==="valid",r4=t=>typeof Promise<"u"&&t instanceof Promise});var GUe=Yr(()=>{});var ls,VUe=Yr(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ls||(ls={}))});function sa(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,u)=>{var f,h;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:u.defaultError}:typeof u.data>"u"?{message:(f=p!=null?p:n)!=null?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p!=null?p:r)!=null?h:u.defaultError}},description:o}}function KUe(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Tlr(t){return new RegExp(`^${KUe(t)}$`)}function ZUe(t){let e=`${JUe}T${KUe(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Dlr(t,e){return!!((e==="v4"||!e)&&Elr.test(t)||(e==="v6"||!e)&&_lr.test(t))}function Plr(t,e){if(!ylr.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Blr(t,e){return!!((e==="v4"||!e)&&wlr.test(t)||(e==="v6"||!e)&&Slr.test(t))}function Rlr(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}function n4(t){if(t instanceof sv){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Zb.create(n4(n))}return new sv({...t._def,shape:()=>e})}else return t instanceof pI?new pI({...t._def,type:n4(t.element)}):t instanceof Zb?Zb.create(n4(t.unwrap())):t instanceof dS?dS.create(n4(t.unwrap())):t instanceof fS?fS.create(t.items.map(e=>n4(e))):t}function Dhe(t,e){let r=pS(t),n=pS(e);if(t===e)return{valid:!0,data:t};if(r===Ii.object&&n===Ii.object){let o=Za.objectKeys(e),s=Za.objectKeys(t).filter(u=>o.indexOf(u)!==-1),c={...t,...e};for(let u of s){let p=Dhe(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===Ii.array&&n===Ii.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let c=t[s],u=e[s],p=Dhe(c,u);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===Ii.date&&n===Ii.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function XUe(t,e){return new dO({values:t,typeName:ho.ZodEnum,...sa(e)})}function YUe(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function e5e(t,e={},r){return t?sD.create().superRefine((n,o)=>{var c,u;let s=t(n);if(s instanceof Promise)return s.then(p=>{var f,h;if(!p){let m=YUe(e,n),y=(h=(f=m.fatal)!=null?f:r)!=null?h:!0;o.addIssue({code:"custom",...m,fatal:y})}});if(!s){let p=YUe(e,n),f=(u=(c=p.fatal)!=null?c:r)!=null?u:!0;o.addIssue({code:"custom",...p,fatal:f})}}):sD.create()}var Xb,WUe,Ea,dlr,hlr,mlr,glr,Alr,ylr,vlr,xlr,blr,The,Elr,wlr,_lr,Slr,Clr,Ilr,JUe,klr,iD,nO,iO,sO,oO,i4,aO,cO,sD,lI,V1,s4,pI,sv,uO,uI,$J,lO,fS,HJ,o4,a4,GJ,pO,fO,dO,hO,oD,eE,Zb,dS,mO,gO,c4,Olr,s5,o5,AO,Nlr,ho,Flr,t5e,r5e,Llr,jlr,n5e,Mlr,Qlr,qlr,Ulr,zlr,$lr,Hlr,Glr,Vlr,Wlr,Ylr,Jlr,Klr,Zlr,Xlr,epr,tpr,rpr,npr,ipr,spr,opr,apr,cpr,upr,lpr,ppr,fpr,dpr,hpr,mpr,gpr,Apr,ypr,i5e=Yr(()=>{QJ();qJ();VUe();khe();n5();Xb=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},WUe=(t,e)=>{if(nD(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new iv(t.common.issues);return this._error=r,this._error}}};Ea=class{get description(){return this._def.description}_getType(e){return pS(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:pS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new lg,ctx:{common:e.parent.common,data:e.data,parsedType:pS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(r4(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pS(e)},o=this._parseSync({data:e,path:n.path,parent:n});return WUe(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pS(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return nD(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>nD(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pS(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(r4(o)?o:Promise.resolve(o));return WUe(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let c=e(o),u=()=>s.addIssue({code:Fn.custom,...n(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new eE({schema:this,typeName:ho.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Zb.create(this,this._def)}nullable(){return dS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pI.create(this)}promise(){return oD.create(this,this._def)}or(e){return uO.create([this,e],this._def)}and(e){return lO.create(this,e,this._def)}transform(e){return new eE({...sa(this._def),schema:this,typeName:ho.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new mO({...sa(this._def),innerType:this,defaultValue:r,typeName:ho.ZodDefault})}brand(){return new s5({typeName:ho.ZodBranded,type:this,...sa(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new gO({...sa(this._def),innerType:this,catchValue:r,typeName:ho.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return o5.create(this,e)}readonly(){return AO.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},dlr=/^c[^\s-]{8,}$/i,hlr=/^[0-9a-z]+$/,mlr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,glr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Alr=/^[a-z0-9_-]{21}$/i,ylr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vlr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xlr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,blr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Elr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wlr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_lr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Slr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Clr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ilr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,JUe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",klr=new RegExp(`^${JUe}$`);iD=class t extends Ea{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ii.string){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_type,expected:Ii.string,received:s.parsedType}),to}let n=new lg,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,u=e.data.length<s.value;(c||u)&&(o=this._getOrReturnCtx(e,o),c?Ai(o,{code:Fn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&Ai(o,{code:Fn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")xlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"email",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")The||(The=new RegExp(blr,"u")),The.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"emoji",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")glr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"uuid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Alr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"nanoid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")dlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"cuid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")hlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"cuid2",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")mlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"ulid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Ai(o,{validation:"url",code:Fn.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"regex",code:Fn.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?ZUe(s).test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?klr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Tlr(s).test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?vlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"duration",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Dlr(e.data,s.version)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"ip",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Plr(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"jwt",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Blr(e.data,s.version)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"cidr",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Clr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"base64",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Ilr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"base64url",code:Fn.invalid_string,message:s.message}),n.dirty()):Za.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:Fn.invalid_string,...ls.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ls.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ls.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ls.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ls.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ls.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ls.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ls.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ls.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ls.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ls.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ls.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ls.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ls.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!1,...ls.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ls.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ls.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ls.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ls.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ls.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ls.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ls.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ls.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ls.errToObj(r)})}nonempty(e){return this.min(1,ls.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};iD.create=t=>{var e;return new iD({checks:[],typeName:ho.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...sa(t)})};nO=class t extends Ea{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ii.number){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_type,expected:Ii.number,received:s.parsedType}),to}let n,o=new lg;for(let s of this._def.checks)s.kind==="int"?Za.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Rlr(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.not_finite,message:s.message}),o.dirty()):Za.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ls.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ls.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ls.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ls.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ls.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ls.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ls.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ls.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ls.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ls.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ls.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ls.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ls.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ls.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Za.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};nO.create=t=>new nO({checks:[],typeName:ho.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...sa(t)});iO=class t extends Ea{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ii.bigint)return this._getInvalidInput(e);let n,o=new lg;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Za.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return Ai(r,{code:Fn.invalid_type,expected:Ii.bigint,received:r.parsedType}),to}gte(e,r){return this.setLimit("min",e,!0,ls.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ls.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ls.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ls.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ls.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ls.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ls.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ls.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ls.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ls.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};iO.create=t=>{var e;return new iO({checks:[],typeName:ho.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...sa(t)})};sO=class extends Ea{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ii.boolean){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.boolean,received:n.parsedType}),to}return d0(e.data)}};sO.create=t=>new sO({typeName:ho.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...sa(t)});oO=class t extends Ea{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ii.date){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_type,expected:Ii.date,received:s.parsedType}),to}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_date}),to}let n=new lg,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Za.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ls.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ls.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};oO.create=t=>new oO({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ho.ZodDate,...sa(t)});i4=class extends Ea{_parse(e){if(this._getType(e)!==Ii.symbol){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.symbol,received:n.parsedType}),to}return d0(e.data)}};i4.create=t=>new i4({typeName:ho.ZodSymbol,...sa(t)});aO=class extends Ea{_parse(e){if(this._getType(e)!==Ii.undefined){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.undefined,received:n.parsedType}),to}return d0(e.data)}};aO.create=t=>new aO({typeName:ho.ZodUndefined,...sa(t)});cO=class extends Ea{_parse(e){if(this._getType(e)!==Ii.null){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.null,received:n.parsedType}),to}return d0(e.data)}};cO.create=t=>new cO({typeName:ho.ZodNull,...sa(t)});sD=class extends Ea{constructor(){super(...arguments),this._any=!0}_parse(e){return d0(e.data)}};sD.create=t=>new sD({typeName:ho.ZodAny,...sa(t)});lI=class extends Ea{constructor(){super(...arguments),this._unknown=!0}_parse(e){return d0(e.data)}};lI.create=t=>new lI({typeName:ho.ZodUnknown,...sa(t)});V1=class extends Ea{_parse(e){let r=this._getOrReturnCtx(e);return Ai(r,{code:Fn.invalid_type,expected:Ii.never,received:r.parsedType}),to}};V1.create=t=>new V1({typeName:ho.ZodNever,...sa(t)});s4=class extends Ea{_parse(e){if(this._getType(e)!==Ii.undefined){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.void,received:n.parsedType}),to}return d0(e.data)}};s4.create=t=>new s4({typeName:ho.ZodVoid,...sa(t)});pI=class t extends Ea{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Ii.array)return Ai(r,{code:Fn.invalid_type,expected:Ii.array,received:r.parsedType}),to;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,u=r.data.length<o.exactLength.value;(c||u)&&(Ai(r,{code:c?Fn.too_big:Fn.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(Ai(r,{code:Fn.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(Ai(r,{code:Fn.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>o.type._parseAsync(new Xb(r,c,r.path,u)))).then(c=>lg.mergeArray(n,c));let s=[...r.data].map((c,u)=>o.type._parseSync(new Xb(r,c,r.path,u)));return lg.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:ls.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:ls.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:ls.toString(r)}})}nonempty(e){return this.min(1,e)}};pI.create=(t,e)=>new pI({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ho.ZodArray,...sa(e)});sv=class t extends Ea{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Za.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Ii.object){let f=this._getOrReturnCtx(e);return Ai(f,{code:Fn.invalid_type,expected:Ii.object,received:f.parsedType}),to}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof V1&&this._def.unknownKeys==="strip"))for(let f in o.data)c.includes(f)||u.push(f);let p=[];for(let f of c){let h=s[f],m=o.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Xb(o,m,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof V1){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)p.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&(Ai(o,{code:Fn.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let m=o.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Xb(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of p){let m=await h.key,y=await h.value;f.push({key:m,value:y,alwaysSet:h.alwaysSet})}return f}).then(f=>lg.mergeObjectSync(n,f)):lg.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return ls.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,c,u,p;let o=(u=(c=(s=this._def).errorMap)==null?void 0:c.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(p=ls.errToObj(e).message)!=null?p:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ho.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Za.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Za.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return n4(this)}partial(e){let r={};for(let n of Za.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Za.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Zb;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return XUe(Za.objectKeys(this.shape))}};sv.create=(t,e)=>new sv({shape:()=>t,unknownKeys:"strip",catchall:V1.create(),typeName:ho.ZodObject,...sa(e)});sv.strictCreate=(t,e)=>new sv({shape:()=>t,unknownKeys:"strict",catchall:V1.create(),typeName:ho.ZodObject,...sa(e)});sv.lazycreate=(t,e)=>new sv({shape:t,unknownKeys:"strip",catchall:V1.create(),typeName:ho.ZodObject,...sa(e)});uO=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let c=s.map(u=>new iv(u.ctx.common.issues));return Ai(r,{code:Fn.invalid_union,unionErrors:c}),to}if(r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let p of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=p._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=c.map(p=>new iv(p));return Ai(r,{code:Fn.invalid_union,unionErrors:u}),to}}get options(){return this._def.options}};uO.create=(t,e)=>new uO({options:t,typeName:ho.ZodUnion,...sa(e)});uI=t=>t instanceof pO?uI(t.schema):t instanceof eE?uI(t.innerType()):t instanceof fO?[t.value]:t instanceof dO?t.options:t instanceof hO?Za.objectValues(t.enum):t instanceof mO?uI(t._def.innerType):t instanceof aO?[void 0]:t instanceof cO?[null]:t instanceof Zb?[void 0,...uI(t.unwrap())]:t instanceof dS?[null,...uI(t.unwrap())]:t instanceof s5||t instanceof AO?uI(t.unwrap()):t instanceof gO?uI(t._def.innerType):[],$J=class t extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ii.object)return Ai(r,{code:Fn.invalid_type,expected:Ii.object,received:r.parsedType}),to;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ai(r,{code:Fn.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),to)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=uI(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of c){if(o.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);o.set(u,s)}}return new t({typeName:ho.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...sa(n)})}};lO=class extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,c)=>{if(UJ(s)||UJ(c))return to;let u=Dhe(s.value,c.value);return u.valid?((zJ(s)||zJ(c))&&r.dirty(),{status:r.value,value:u.data}):(Ai(n,{code:Fn.invalid_intersection_types}),to)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lO.create=(t,e,r)=>new lO({left:t,right:e,typeName:ho.ZodIntersection,...sa(r)});fS=class t extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.array)return Ai(n,{code:Fn.invalid_type,expected:Ii.array,received:n.parsedType}),to;if(n.data.length<this._def.items.length)return Ai(n,{code:Fn.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),to;!this._def.rest&&n.data.length>this._def.items.length&&(Ai(n,{code:Fn.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,u)=>{let p=this._def.items[u]||this._def.rest;return p?p._parse(new Xb(n,c,n.path,u)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>lg.mergeArray(r,c)):lg.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};fS.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fS({items:t,typeName:ho.ZodTuple,rest:null,...sa(e)})};HJ=class t extends Ea{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.object)return Ai(n,{code:Fn.invalid_type,expected:Ii.object,received:n.parsedType}),to;let o=[],s=this._def.keyType,c=this._def.valueType;for(let u in n.data)o.push({key:s._parse(new Xb(n,u,n.path,u)),value:c._parse(new Xb(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?lg.mergeObjectAsync(r,o):lg.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ea?new t({keyType:e,valueType:r,typeName:ho.ZodRecord,...sa(n)}):new t({keyType:iD.create(),valueType:e,typeName:ho.ZodRecord,...sa(r)})}},o4=class extends Ea{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.map)return Ai(n,{code:Fn.invalid_type,expected:Ii.map,received:n.parsedType}),to;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([u,p],f)=>({key:o._parse(new Xb(n,u,n.path,[f,"key"])),value:s._parse(new Xb(n,p,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let p of c){let f=await p.key,h=await p.value;if(f.status==="aborted"||h.status==="aborted")return to;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let p of c){let f=p.key,h=p.value;if(f.status==="aborted"||h.status==="aborted")return to;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}}}};o4.create=(t,e,r)=>new o4({valueType:e,keyType:t,typeName:ho.ZodMap,...sa(r)});a4=class t extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.set)return Ai(n,{code:Fn.invalid_type,expected:Ii.set,received:n.parsedType}),to;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Ai(n,{code:Fn.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(Ai(n,{code:Fn.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(p){let f=new Set;for(let h of p){if(h.status==="aborted")return to;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}let u=[...n.data.values()].map((p,f)=>s._parse(new Xb(n,p,n.path,f)));return n.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:ls.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:ls.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};a4.create=(t,e)=>new a4({valueType:t,minSize:null,maxSize:null,typeName:ho.ZodSet,...sa(e)});GJ=class t extends Ea{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ii.function)return Ai(r,{code:Fn.invalid_type,expected:Ii.function,received:r.parsedType}),to;function n(u,p){return i5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t4(),cI].filter(f=>!!f),issueData:{code:Fn.invalid_arguments,argumentsError:p}})}function o(u,p){return i5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t4(),cI].filter(f=>!!f),issueData:{code:Fn.invalid_return_type,returnTypeError:p}})}let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof oD){let u=this;return d0(async function(...p){let f=new iv([]),h=await u._def.args.parseAsync(p,s).catch(x=>{throw f.addIssue(n(p,x)),f}),m=await Reflect.apply(c,this,h);return await u._def.returns._def.type.parseAsync(m,s).catch(x=>{throw f.addIssue(o(m,x)),f})})}else{let u=this;return d0(function(...p){let f=u._def.args.safeParse(p,s);if(!f.success)throw new iv([n(p,f.error)]);let h=Reflect.apply(c,this,f.data),m=u._def.returns.safeParse(h,s);if(!m.success)throw new iv([o(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:fS.create(e).rest(lI.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||fS.create([]).rest(lI.create()),returns:r||lI.create(),typeName:ho.ZodFunction,...sa(n)})}},pO=class extends Ea{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};pO.create=(t,e)=>new pO({getter:t,typeName:ho.ZodLazy,...sa(e)});fO=class extends Ea{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Ai(r,{received:r.data,code:Fn.invalid_literal,expected:this._def.value}),to}return{status:"valid",value:e.data}}get value(){return this._def.value}};fO.create=(t,e)=>new fO({value:t,typeName:ho.ZodLiteral,...sa(e)});dO=class t extends Ea{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return Ai(r,{expected:Za.joinValues(n),received:r.parsedType,code:Fn.invalid_type}),to}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return Ai(r,{received:r.data,code:Fn.invalid_enum_value,options:n}),to}return d0(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};dO.create=XUe;hO=class extends Ea{_parse(e){let r=Za.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ii.string&&n.parsedType!==Ii.number){let o=Za.objectValues(r);return Ai(n,{expected:Za.joinValues(o),received:n.parsedType,code:Fn.invalid_type}),to}if(this._cache||(this._cache=new Set(Za.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Za.objectValues(r);return Ai(n,{received:n.data,code:Fn.invalid_enum_value,options:o}),to}return d0(e.data)}get enum(){return this._def.values}};hO.create=(t,e)=>new hO({values:t,typeName:ho.ZodNativeEnum,...sa(e)});oD=class extends Ea{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ii.promise&&r.common.async===!1)return Ai(r,{code:Fn.invalid_type,expected:Ii.promise,received:r.parsedType}),to;let n=r.parsedType===Ii.promise?r.data:Promise.resolve(r.data);return d0(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};oD.create=(t,e)=>new oD({type:t,typeName:ho.ZodPromise,...sa(e)});eE=class extends Ea{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ho.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:c=>{Ai(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return to;let p=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return p.status==="aborted"?to:p.status==="dirty"?rO(p.value):r.value==="dirty"?rO(p.value):p});{if(r.value==="aborted")return to;let u=this._def.schema._parseSync({data:c,path:n.path,parent:n});return u.status==="aborted"?to:u.status==="dirty"?rO(u.value):r.value==="dirty"?rO(u.value):u}}if(o.type==="refinement"){let c=u=>{let p=o.refinement(u,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?to:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?to:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!nD(c))return to;let u=o.transform(c.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>nD(c)?Promise.resolve(o.transform(c.value,s)).then(u=>({status:r.value,value:u})):to);Za.assertNever(o)}};eE.create=(t,e,r)=>new eE({schema:t,typeName:ho.ZodEffects,effect:e,...sa(r)});eE.createWithPreprocess=(t,e,r)=>new eE({schema:e,effect:{type:"preprocess",transform:t},typeName:ho.ZodEffects,...sa(r)});Zb=class extends Ea{_parse(e){return this._getType(e)===Ii.undefined?d0(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Zb.create=(t,e)=>new Zb({innerType:t,typeName:ho.ZodOptional,...sa(e)});dS=class extends Ea{_parse(e){return this._getType(e)===Ii.null?d0(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};dS.create=(t,e)=>new dS({innerType:t,typeName:ho.ZodNullable,...sa(e)});mO=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Ii.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};mO.create=(t,e)=>new mO({innerType:t,typeName:ho.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...sa(e)});gO=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return r4(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new iv(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new iv(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};gO.create=(t,e)=>new gO({innerType:t,typeName:ho.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...sa(e)});c4=class extends Ea{_parse(e){if(this._getType(e)!==Ii.nan){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.nan,received:n.parsedType}),to}return{status:"valid",value:e.data}}};c4.create=t=>new c4({typeName:ho.ZodNaN,...sa(t)});Olr=Symbol("zod_brand"),s5=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},o5=class t extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?to:s.status==="dirty"?(r.dirty(),rO(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?to:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:ho.ZodPipeline})}},AO=class extends Ea{_parse(e){let r=this._def.innerType._parse(e),n=o=>(nD(o)&&(o.value=Object.freeze(o.value)),o);return r4(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};AO.create=(t,e)=>new AO({innerType:t,typeName:ho.ZodReadonly,...sa(e)});Nlr={object:sv.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ho||(ho={}));Flr=(t,e={message:`Input not instance of ${t.name}`})=>e5e(r=>r instanceof t,e),t5e=iD.create,r5e=nO.create,Llr=c4.create,jlr=iO.create,n5e=sO.create,Mlr=oO.create,Qlr=i4.create,qlr=aO.create,Ulr=cO.create,zlr=sD.create,$lr=lI.create,Hlr=V1.create,Glr=s4.create,Vlr=pI.create,Wlr=sv.create,Ylr=sv.strictCreate,Jlr=uO.create,Klr=$J.create,Zlr=lO.create,Xlr=fS.create,epr=HJ.create,tpr=o4.create,rpr=a4.create,npr=GJ.create,ipr=pO.create,spr=fO.create,opr=dO.create,apr=hO.create,cpr=oD.create,upr=eE.create,lpr=Zb.create,ppr=dS.create,fpr=eE.createWithPreprocess,dpr=o5.create,hpr=()=>t5e().optional(),mpr=()=>r5e().optional(),gpr=()=>n5e().optional(),Apr={string:t=>iD.create({...t,coerce:!0}),number:t=>nO.create({...t,coerce:!0}),boolean:t=>sO.create({...t,coerce:!0}),bigint:t=>iO.create({...t,coerce:!0}),date:t=>oO.create({...t,coerce:!0})},ypr=to});var Ox={};Nj(Ox,{BRAND:()=>Olr,DIRTY:()=>rO,EMPTY_PATH:()=>flr,INVALID:()=>to,NEVER:()=>ypr,OK:()=>d0,ParseStatus:()=>lg,Schema:()=>Ea,ZodAny:()=>sD,ZodArray:()=>pI,ZodBigInt:()=>iO,ZodBoolean:()=>sO,ZodBranded:()=>s5,ZodCatch:()=>gO,ZodDate:()=>oO,ZodDefault:()=>mO,ZodDiscriminatedUnion:()=>$J,ZodEffects:()=>eE,ZodEnum:()=>dO,ZodError:()=>iv,ZodFirstPartyTypeKind:()=>ho,ZodFunction:()=>GJ,ZodIntersection:()=>lO,ZodIssueCode:()=>Fn,ZodLazy:()=>pO,ZodLiteral:()=>fO,ZodMap:()=>o4,ZodNaN:()=>c4,ZodNativeEnum:()=>hO,ZodNever:()=>V1,ZodNull:()=>cO,ZodNullable:()=>dS,ZodNumber:()=>nO,ZodObject:()=>sv,ZodOptional:()=>Zb,ZodParsedType:()=>Ii,ZodPipeline:()=>o5,ZodPromise:()=>oD,ZodReadonly:()=>AO,ZodRecord:()=>HJ,ZodSchema:()=>Ea,ZodSet:()=>a4,ZodString:()=>iD,ZodSymbol:()=>i4,ZodTransformer:()=>eE,ZodTuple:()=>fS,ZodType:()=>Ea,ZodUndefined:()=>aO,ZodUnion:()=>uO,ZodUnknown:()=>lI,ZodVoid:()=>s4,addIssueToContext:()=>Ai,any:()=>zlr,array:()=>Vlr,bigint:()=>jlr,boolean:()=>n5e,coerce:()=>Apr,custom:()=>e5e,date:()=>Mlr,datetimeRegex:()=>ZUe,defaultErrorMap:()=>cI,discriminatedUnion:()=>Klr,effect:()=>upr,enum:()=>opr,function:()=>npr,getErrorMap:()=>t4,getParsedType:()=>pS,instanceof:()=>Flr,intersection:()=>Zlr,isAborted:()=>UJ,isAsync:()=>r4,isDirty:()=>zJ,isValid:()=>nD,late:()=>Nlr,lazy:()=>ipr,literal:()=>spr,makeIssue:()=>i5,map:()=>tpr,nan:()=>Llr,nativeEnum:()=>apr,never:()=>Hlr,null:()=>Ulr,nullable:()=>ppr,number:()=>r5e,object:()=>Wlr,objectUtil:()=>Che,oboolean:()=>gpr,onumber:()=>mpr,optional:()=>lpr,ostring:()=>hpr,pipeline:()=>dpr,preprocess:()=>fpr,promise:()=>cpr,quotelessJson:()=>ulr,record:()=>epr,set:()=>rpr,setErrorMap:()=>plr,strictObject:()=>Ylr,string:()=>t5e,symbol:()=>Qlr,transformer:()=>upr,tuple:()=>Xlr,undefined:()=>qlr,union:()=>Jlr,unknown:()=>$lr,util:()=>Za,void:()=>Glr});var Phe=Yr(()=>{qJ();khe();GUe();n5();i5e();QJ()});var s5e=Yr(()=>{Phe();Phe()});var vpr,o5e,xpr,bpr,Epr,wpr,_pr,Spr,Cpr,a5e,c5e=Yr(()=>{s5e();vpr=/^(?=.{2,30}$)[a-z0-9]+(-[a-z0-9]+)*-?[a-z0-9]+$/,o5e=Ox.string().refine(t=>vpr.test(t)),xpr=Ox.enum(["vps-react-ts","vps-react","vps-vue-ts","vps-vue","manaia-demo","manaia-demo-ts"]),bpr=Ox.object({name:o5e}),Epr=Ox.object({name:o5e,template:xpr}),wpr=Ox.object({script:Ox.string().optional()}),_pr=Ox.object({script:Ox.string().optional()}),Spr=Ox.object({}),Cpr=Ox.object({}),a5e={initArgsSchema:bpr,generateArgsSchema:Epr,devArgsSchema:wpr,publishArgsSchema:_pr,deleteArgsSchema:Spr,testArgsSchema:Cpr}});function Ipr(t,e){return r=>{try{t.parse(r)}catch(n){throw new jJ(`Failed to validate ${e}`,n)}}}function kpr(){let t={};return Object.entries({...a5e,...ghe}).forEach(([e,r])=>{let n=e.replace("Schema","");t[n]=Ipr(r,n)}),t}var xfi,u5e=Yr(()=>{c5e();FJ();Ahe();xfi=kpr()});function u4(t="",e={confPath:""}){try{t=t||process.cwd();let[r,n]=c5(t);if(e.exists=n,!n)return e.showError||(0,f0.showError)(),{headers:[],redirects:[],rewrites:[]};if(e.confPath=r,r.endsWith(".ts"))return Dpr(r);let o=wJ(r);return f5e.default.parse(o)}catch{e.showError||(0,f0.showError)()}}function Dpr(t){var m,y,x,A,I,w,k,B,j;let e=Bhe.default.statSync(t),r=l5e.get(t);if(r&&r.mtimeMs===e.mtimeMs)return r.config;let n=(0,a5.createRequire)("file:///data/__qci/root-workspaces/__qci-pipeline-11895869-1/packages/tef-cli/edgeone-dist/cli.js"),o=Nx.default.join(Nx.default.dirname((0,d5e.fileURLToPath)("file:///data/__qci/root-workspaces/__qci-pipeline-11895869-1/packages/tef-cli/edgeone-dist/cli.js")),"config-schema.js"),s=Bhe.default.existsSync(o)?o:n.resolve("@edgeone/types/config"),c;try{c=(0,p5e.buildSync)({entryPoints:[t],bundle:!0,platform:"node",format:"cjs",write:!1,target:"node12",logLevel:"silent",absWorkingDir:Nx.default.dirname(t),alias:{"@edgeone/types/config":s},external:[]})}catch(Q){throw new tO(`Failed to load ${Nx.default.basename(t)}:
|
|
21
|
+
`,prefix:s}=e,c=t.errors.map(u=>FUe(u,r,n)).join(r);return Hur(c,s,o)}var ZU,tO,LJ,jJ,Ahe=Yr(()=>{ZU=class extends Error{handled;constructor(e){super(e),this.handled=!0,this.name=this.constructor.name}},tO=class extends ZU{constructor(e){super(`[ConfigLoadError] ${e}`)}},LJ=class extends ZU{constructor(e){super(`[ConfigSaveError] ${e}`)}};jJ=class extends ZU{details;constructor(e,r){let n=Gur(r,{prefix:`${e}:`});super(`[ValidationError] ${n}`),this.details=r.errors}}});var yhe,Qpi,LUe=Yr(()=>{yhe=class{log(e,r){try{let n=this.format(r),o=JSON.stringify({key:e,value:n});process.send(o)}catch{}}format(e){return typeof e=="object"?JSON.stringify(e):typeof e=="number"?String(e):e}},Qpi=new yhe});function ug(t){return Object.prototype.toString.call(t)==="[object Object]"}function aI(t){return Object.prototype.toString.call(t)==="[object Array]"}function nv(t){return Object.prototype.toString.call(t)==="[object String]"}function _he(t){return Object.prototype.toString.call(t)==="[object Number]"}function UUe(t){return Object.prototype.toString.call(t)==="[object Undefined]"}function t5(t){var n;let e=t.replace(/\\([?*])/g,"$1");if(t.length===0)return Cs.min_string;if(e.length>500)return Cs.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(e)||((n=e.match(/\*/g))==null?void 0:n.length)>1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(e)||/:(?![a-zA-Z0-9]+)/.test(e))return Cs.char_match;if(e.length){let o=e.split("/");if(o.some(u=>u.includes(":")&&(u.includes("*")||u.includes(".")))||o.some(u=>u.split(":").length>2))return Cs.char_match}}function whe(t){var r;if(t=t.replace(/^https?:\/\//,""),t.length===0)return Cs.min_string;if(t.length>500)return Cs.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(t)||((r=t.match(/\*/g))==null?void 0:r.length)>=1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(t)||/:(?![a-zA-Z0-9]+)/.test(t))return Cs.char_match}function Vur(t){if(t.length===0)return Cs.min_string;if(t.length>100)return Cs.max_string;if(/[^a-zA-Z0-9-]/.test(t))return Cs.char_match}function Wur(t){if(t.length===0)return Cs.min_string;if(t.length>1e3)return Cs.max_string;if(/[\u4e00-\u9fa5]/.test(t))return Cs.char_match}function Yur(t){let e=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of e){let n=r.indexOf("="),o=n===-1?r.trim().toLowerCase():r.slice(0,n).trim().toLowerCase();if(o==="stale-while-revalidate"||o==="stale-if-error"){let s=`${o}=86400`;if(n===-1)return`${Cs.value_match}: Cache-Control directive "${o}" must be in k=v form (e.g. ${s})`;if(!r.slice(n+1).trim())return`${Cs.value_match}: Cache-Control directive "${r}" must have a value (e.g. ${s})`}}}function Jur(t){if(![301,302,303,304,307,308].includes(t))return Cs.value_match}function Kur(t){if(typeof t!="number"||!Number.isInteger(t)||t<0)return Cs.value_match}function Zur(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{key:c,value:u}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"key"],message:Cs.invalid_type});continue}let p=Vur(c);if(p){n.push({path:[...e,`[${o}]`,"key"],message:p});continue}if(!nv(u)){n.push({path:[...e,`[${o}]`,"value"],message:Cs.invalid_type});continue}let f=Wur(u);if(f){n.push({path:[...e,`[${o}]`,"value"],message:f});continue}if(c.toLowerCase()==="cache-control"){let h=Yur(u);if(h){n.push({path:[...e,`[${o}]`,"value"],message:h});continue}}r.push({key:c,value:u})}return[r,n]}function Xur(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{source:c,headers:u}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let p=t5(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}let[f,h]=Zur(u,[...e,`[${o}]`,"headers"]);f.length>100&&(h.push({path:[...e,`[${o}]`,"headers"],message:Cs.max_length}),f=f.slice(0,100)),(u==null?void 0:u.length)<1&&f.length<1&&h.push({path:[...e,`[${o}]`,"headers"],message:Cs.min_length}),f.length&&r.push({source:c,headers:f}),n.push(...h)}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function elr(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{source:c,destination:u,statusCode:p}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let f=t5(c);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!nv(u)){n.push({path:[...e,`[${o}]`,"destination"],message:Cs.invalid_type});continue}let h=whe(u);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}if(!_he(p)){n.push({path:[...e,`[${o}]`,"statusCode"],message:Cs.invalid_type});continue}let m=Jur(p);if(m){n.push({path:[...e,`[${o}]`,"statusCode"],message:m});continue}r.push({source:c,destination:u,statusCode:p})}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function tlr(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}if("src"in s||"dest"in s){let{src:m,dest:y}=s;if(!nv(m)){n.push({path:[...e,`[${o}]`,"src"],message:Cs.invalid_type});continue}let x=t5(m);if(x){n.push({path:[...e,`[${o}]`,"src"],message:x});continue}if(!nv(y)){n.push({path:[...e,`[${o}]`,"dest"],message:Cs.invalid_type});continue}let A=whe(y);if(A){n.push({path:[...e,`[${o}]`,"dest"],message:A});continue}r.push({src:m,dest:y});continue}let{source:u,destination:p}=s;if(!nv(u)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let f=t5(u);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!nv(p)){n.push({path:[...e,`[${o}]`,"destination"],message:Cs.invalid_type});continue}let h=whe(p);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}r.push({source:u,destination:p})}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function rlr(t,e){let r=[],n=[];if(!aI(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!ug(s)){n.push({path:[...e,`[${o}]`],message:Cs.invalid_type});continue}let{source:c,cacheTtl:u}=s;if(!nv(c)){n.push({path:[...e,`[${o}]`,"source"],message:Cs.invalid_type});continue}let p=t5(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}if(!_he(u)){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:Cs.invalid_type});continue}let f=Kur(u);if(f){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:f});continue}r.push({source:c,cacheTtl:u})}return r.length>100&&(n.push({path:[...e],message:Cs.max_length}),r=r.slice(0,100)),[r,n]}function rD(t){if(!aI(t))return;let e=t.filter(r=>nv(r)&&r.trim().length>0);return e.length>0?e:[]}function XU(t){if(!nv(t))return;let e=t.trim();return e.length>0?e:void 0}function MJ(t,e,r,n){let o=[],s=[];if(UUe(t))return[void 0,s];if(!aI(t))return s.push({path:[...e],message:Cs.invalid_type}),[void 0,s];for(let c in t){let u=t[c];if(!nv(u)){s.push({path:[...e,`[${c}]`],message:Cs.invalid_type});continue}let p=u.trim();if(!r.has(p)){s.push({code:"invalid_region",path:[...e,`[${c}]`],message:`${Cs.value_match}: region id must be one of [${n.join(", ")}]`});continue}o.push(p)}return[o,s]}function zUe(t,e){return aI(t)&&aI(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t===e}function qUe({newValue:t,newPath:e,legacySources:r,path:n}){let o=[],s=rD(t),c=s!==void 0?e:void 0;for(let u of r){let p=rD(u.value);if(p!==void 0){if(o.push({code:"deprecated_config",path:[...n,...u.path],message:u.deprecatedMessage}),s===void 0){s=p,c=u.displayPath;continue}u.checkConflict!==!1&&!zUe(s,p)&&o.push({code:e5.conflict,path:[...n,...u.path],message:`[CONFIG_CONFLICT] ${c} and ${u.displayPath} have conflicting values. Please keep only ${e}.`})}}return[s,o]}function vhe(t,e,r){if(!UUe(t)){if(!_he(t)||!Number.isFinite(t)){r.push({path:[...e],message:Cs.invalid_type});return}return t}}function nlr(t,e){var ze,Tt,Dt;let r=ug(t.cloudFunctions)?t.cloudFunctions:{},n=ug(r.nodejs)?r.nodejs:{},o=ug(r.regions)?r.regions:{},s=ug(t["node-functions"])?t["node-functions"]:{},c=ug(t.nodeFunctionsConfig)?t.nodeFunctionsConfig:{},u=[];!QUe&&nv(s.included_files_base_path)&&s.included_files_base_path.trim()&&(QUe=!0,console.warn("`node-functions.included_files_base_path` is deprecated and no longer takes effect. `cloudFunctions.includeFiles` is always resolved from the project root."));let[p,f]=qUe({newValue:r.includeFiles,newPath:"cloudFunctions.includeFiles",path:e,legacySources:[{value:n.includeFiles,path:["cloudFunctions","nodejs","includeFiles"],displayPath:"cloudFunctions.nodejs.includeFiles",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.includeFiles, please migrate to cloudFunctions.includeFiles. The old field will be removed in a future version."},{value:s.included_files,path:["node-functions","included_files"],displayPath:"node-functions.included_files",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.included_files, which has been mapped to cloudFunctions.includeFiles. Please migrate to the new field."}]}),[h,m]=qUe({newValue:r.externalNodeModules,newPath:"cloudFunctions.externalNodeModules",path:e,legacySources:[{value:n.externalNodeModules,path:["cloudFunctions","nodejs","externalNodeModules"],displayPath:"cloudFunctions.nodejs.externalNodeModules",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.externalNodeModules, please migrate to cloudFunctions.externalNodeModules. The old field will be removed in a future version."},{value:s.external_node_modules,path:["node-functions","external_node_modules"],displayPath:"node-functions.external_node_modules",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.external_node_modules, which has been mapped to cloudFunctions.externalNodeModules. Please migrate to the new field."}]});u.push(...f,...m);let y={};p!==void 0&&(y.includeFiles=p),h!==void 0&&(y.externalNodeModules=h);let x=vhe(r.maxDuration,[...e,"cloudFunctions","maxDuration"],u),A=[];for(let ut of["nodejs","python","go"]){let qe=ug(r[ut])?r[ut]:{},Ke=vhe(qe.maxDuration,[...e,"cloudFunctions",ut,"maxDuration"],u);Ke!==void 0&&(A.push({runtime:ut,value:Ke,displayPath:`cloudFunctions.${ut}.maxDuration`}),u.push({code:"deprecated_config",path:[...e,"cloudFunctions",ut,"maxDuration"],message:`[DEPRECATED] Detected cloudFunctions.${ut}.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field.`}))}let I=vhe(c.maxDuration,[...e,"nodeFunctionsConfig","maxDuration"],u);I!==void 0&&u.push({code:"deprecated_config",path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[DEPRECATED] Detected nodeFunctionsConfig.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field."});let w=A.find(({runtime:ut})=>ut==="nodejs");w&&I!==void 0&&w.value!==I&&u.push({code:e5.conflict,path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[CONFIG_CONFLICT] cloudFunctions.nodejs.maxDuration and nodeFunctionsConfig.maxDuration have conflicting values. Please keep only cloudFunctions.maxDuration."});let k=[...A];I!==void 0&&w===void 0&&k.push({runtime:"nodejs",value:I,displayPath:"nodeFunctionsConfig.maxDuration"});let B=x;if(x!==void 0)for(let{displayPath:ut,value:qe}of k)qe!==x&&u.push({code:e5.conflict,path:[...e,...ut.split(".")],message:`[CONFIG_CONFLICT] cloudFunctions.maxDuration and ${ut} have conflicting values. Please keep only cloudFunctions.maxDuration.`});else if(k.length>0)if(new Set(k.map(({value:qe})=>qe)).size>1){let qe=k.map(({runtime:Ke,value:rt})=>`${Ke}: ${rt}`).join(", ");u.push({code:e5.migrationRequired,path:[...e,"cloudFunctions"],message:`[MIGRATION_REQUIRED] Detected conflicting cloudFunctions.*.maxDuration values (${qe}). The new structure only supports a single cloudFunctions.maxDuration; please choose one value and migrate.`})}else B=k[0].value;B!==void 0&&(y.maxDuration=B);let[j,Q]=MJ(o.mainland,[...e,"cloudFunctions","regions","mainland"],jUe,bhe),[H,te]=MJ(r.mainlandRegions,[...e,"cloudFunctions","mainlandRegions"],jUe,bhe),[Z,xe]=MJ(o.overseas,[...e,"cloudFunctions","regions","overseas"],MUe,Ehe),[le,he]=MJ(r.overseasRegions,[...e,"cloudFunctions","overseasRegions"],MUe,Ehe);u.push(...Q,...te,...xe,...he);function ne({newValue:ut,legacyValue:qe,legacyField:Ke,newField:rt}){return qe!==void 0&&(u.push({code:"deprecated_config",path:[...e,...Ke.split(".")],message:`[DEPRECATED] Detected ${Ke}, please migrate to ${rt}. The old field will be removed in a future version.`}),ut!==void 0&&!zUe(ut,qe)&&u.push({code:e5.conflict,path:[...e,...Ke.split(".")],message:`[CONFIG_CONFLICT] ${Ke} and ${rt} have conflicting values. Please keep only ${rt}.`})),ut!==void 0?ut:qe}let be=ne({newValue:j,legacyValue:H,legacyField:"cloudFunctions.mainlandRegions",newField:"cloudFunctions.regions.mainland"}),ae=ne({newValue:Z,legacyValue:le,legacyField:"cloudFunctions.overseasRegions",newField:"cloudFunctions.regions.overseas"});(be!==void 0||ae!==void 0)&&(y.regions={},be!==void 0&&(y.regions.mainland=be),ae!==void 0&&(y.regions.overseas=ae));let G={},me=(ze=rD(n.includeFiles))!=null?ze:rD(s.included_files),Ce=(Tt=rD(n.externalNodeModules))!=null?Tt:rD(s.external_node_modules);me!==void 0&&(G.includeFiles=me),Ce!==void 0&&(G.externalNodeModules=Ce);let Te=(Dt=w==null?void 0:w.value)!=null?Dt:I;Te!==void 0&&(G.maxDuration=Te),Object.keys(G).length>0&&Object.defineProperty(y,"nodejs",{configurable:!0,value:G});for(let ut of["python","go"]){let qe=A.find(Ke=>Ke.runtime===ut);qe&&Object.defineProperty(y,ut,{configurable:!0,value:{maxDuration:qe.value}})}return H!==void 0&&Object.defineProperty(y,"mainlandRegions",{configurable:!0,value:H}),le!==void 0&&Object.defineProperty(y,"overseasRegions",{configurable:!0,value:le}),[y,u]}function xhe(t,e,r){return typeof t!="number"||!Number.isFinite(t)?e:Math.min(Math.max(Math.floor(t),1),r)}function alr(t){let e=ug(t.agents),r=e?t.agents:{},n=XU(r.dir),o=XU(r.framework),s=XU(r.runtime),c=e?xhe(r.timeout,void 0,ilr):void 0,u=e?xhe(r.idleTimeout,void 0,slr):void 0,p=e?xhe(r.maxLifetime,void 0,olr):void 0,f=rD(r.includeFiles),h=rD(r.externalNodeModules),m=ug(r.sandbox)?r.sandbox:void 0,y=$Ue(m==null?void 0:m.timeout),x=ug(r.memoryQuota)?r.memoryQuota:void 0,A=x&&typeof x.maxMessagesPerConversation=="number"?x.maxMessagesPerConversation:void 0,I={},w=ug(r.auth)?r.auth:void 0;if(w!==void 0){let k=XU(w.type);if(k!==void 0&&k!=="jwt"){let Z=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.type "${k}" is not supported. Only "jwt" is available.`);throw Z.code="BLOCKING_CONFIG_ERROR",Z}let B=new Set(["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512"]),j=XU(w.algorithm);if(j!==void 0&&!B.has(j)){let Z=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.algorithm "${j}" is not supported. Only asymmetric algorithms are allowed (RS256/RS384/RS512/ES256/ES384/ES512/PS256/PS384/PS512). Symmetric algorithms (HS*) are not supported because the edge controller would have to hold the signing key.`);throw Z.code="BLOCKING_CONFIG_ERROR",Z}let Q=j||"RS256",te=(Array.isArray(w.verificationKeys)?w.verificationKeys:[]).filter(Z=>typeof Z=="string"&&Z.trim().length>0).map(Z=>Z.trim()).filter((Z,xe,le)=>le.indexOf(Z)===xe);if(te.length===0){let Z=new Error("[BLOCKING_CONFIG_ERROR] agents.auth.verificationKeys must contain at least one non-empty PEM public key.");throw Z.code="BLOCKING_CONFIG_ERROR",Z}I.auth={type:"jwt",algorithm:Q,verificationKeys:te}}return n!==void 0&&(I.dir=n),o!==void 0&&(I.framework=o),s!==void 0&&(I.runtime=s),c!==void 0&&(I.timeout=c),u!==void 0&&(I.idleTimeout=u),p!==void 0&&(I.maxLifetime=p),A!==void 0&&(I.memoryQuota={maxMessagesPerConversation:A}),y!==void 0&&(I.sandbox={timeout:y}),f!==void 0&&(I.includeFiles=f),h!==void 0&&(I.externalNodeModules=h),I}function $Ue(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.floor(t);return e>0?e:void 0}function clr(t){let e=ug(t.sandbox)?t.sandbox:void 0,r={};if(!e)return r;let n=$Ue(e.timeout);return n!==void 0?r.timeout=n:e.timeout!==void 0&&(r.timeout=e.timeout),r}function r5(t,e){let r={headers:[],redirects:[],rewrites:[],caches:[]},n=[];if(!ug(t))return n.push({path:[...e],message:Cs.invalid_type}),[r,n];let{headers:o=[],redirects:s=[],rewrites:c=[],caches:u=[]}=t,[p,f]=Xur(o,[...e,"headers"]),[h,m]=elr(s,[...e,"redirects"]),[y,x]=tlr(c,[...e,"rewrites"]),[A,I]=rlr(u,[...e,"caches"]);r.headers=p,r.redirects=h,r.rewrites=y,r.caches=A;let[w,k]=nlr(t,e),B=k.filter(Z=>(Z==null?void 0:Z.code)==="deprecated_config"),j=k.filter(Z=>(Z==null?void 0:Z.code)!=="deprecated_config"),Q=alr(t),H=clr(t);r["edge-functions"]=t["edge-functions"],r.trailingSlash=t.trailingSlash,Object.keys(w).length>0&&(r.cloudFunctions=w),Object.keys(Q).length>0&&(r.agents=Q),Object.keys(H).length>0&&(r.sandbox=H);let te=["outputDirectory","installCommand","buildCommand","nodeVersion","buildMachine","schedules","isr"];for(let Z in t)te.includes(Z)&&t[Z]&&(r[Z]=t[Z]);return n.push(...j,...f,...m,...x,...I),[r,n,B]}var Cs,bhe,Ehe,jUe,MUe,QUe,e5,ilr,slr,olr,She=Yr(()=>{Cs={invalid_type:"invalid type error",max_length:"max length error",min_length:"min length error",min_string:"string min error",max_string:"string max error",char_match:"char match error",value_match:"value match error"},bhe=["ap-guangzhou","ap-shanghai","ap-nanjing","ap-beijing","ap-chengdu"],Ehe=["ap-singapore","ap-hongkong","ap-bangkok","ap-jakarta","ap-seoul","ap-tokyo","eu-frankfurt","na-ashburn","na-siliconvalley"],jUe=new Set(bhe),MUe=new Set(Ehe);QUe=!1,e5={conflict:"config_conflict",migrationRequired:"migration_required"};ilr=60*60,slr=30*60,olr=6*60*60});var Za,Che,Ii,pS,n5=Yr(()=>{(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(let u of s)c[u]=o[u];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Za||(Za={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Che||(Che={}));Ii=Za.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pS=t=>{switch(typeof t){case"undefined":return Ii.undefined;case"string":return Ii.string;case"number":return Number.isNaN(t)?Ii.nan:Ii.number;case"boolean":return Ii.boolean;case"function":return Ii.function;case"bigint":return Ii.bigint;case"symbol":return Ii.symbol;case"object":return Array.isArray(t)?Ii.array:t===null?Ii.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ii.promise:typeof Map<"u"&&t instanceof Map?Ii.map:typeof Set<"u"&&t instanceof Set?Ii.set:typeof Date<"u"&&t instanceof Date?Ii.date:Ii.object;default:return Ii.unknown}}});var Fn,ulr,iv,QJ=Yr(()=>{n5();Fn=Za.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ulr=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),iv=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let u=n,p=0;for(;p<c.path.length;){let f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Za.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};iv.create=t=>new iv(t)});var llr,cI,Ihe=Yr(()=>{QJ();n5();llr=(t,e)=>{let r;switch(t.code){case Fn.invalid_type:t.received===Ii.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Fn.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Za.jsonStringifyReplacer)}`;break;case Fn.unrecognized_keys:r=`Unrecognized key(s) in object: ${Za.joinValues(t.keys,", ")}`;break;case Fn.invalid_union:r="Invalid input";break;case Fn.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Za.joinValues(t.options)}`;break;case Fn.invalid_enum_value:r=`Invalid enum value. Expected ${Za.joinValues(t.options)}, received '${t.received}'`;break;case Fn.invalid_arguments:r="Invalid function arguments";break;case Fn.invalid_return_type:r="Invalid function return type";break;case Fn.invalid_date:r="Invalid date";break;case Fn.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Za.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Fn.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Fn.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Fn.custom:r="Invalid input";break;case Fn.invalid_intersection_types:r="Intersection results could not be merged";break;case Fn.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Fn.not_finite:r="Number must be finite";break;default:r=e.defaultError,Za.assertNever(t)}return{message:r}},cI=llr});function plr(t){HUe=t}function t4(){return HUe}var HUe,qJ=Yr(()=>{Ihe();HUe=cI});function Ai(t,e){let r=t4(),n=i5({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===cI?void 0:cI].filter(o=>!!o)});t.common.issues.push(n)}var i5,flr,lg,to,rO,d0,UJ,zJ,nD,r4,khe=Yr(()=>{qJ();Ihe();i5=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let u="",p=n.filter(f=>!!f).slice().reverse();for(let f of p)u=f(c,{data:e,defaultError:u}).message;return{...o,path:s,message:u}},flr=[];lg=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return to;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return to;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}},to=Object.freeze({status:"aborted"}),rO=t=>({status:"dirty",value:t}),d0=t=>({status:"valid",value:t}),UJ=t=>t.status==="aborted",zJ=t=>t.status==="dirty",nD=t=>t.status==="valid",r4=t=>typeof Promise<"u"&&t instanceof Promise});var GUe=Yr(()=>{});var ls,VUe=Yr(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ls||(ls={}))});function sa(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,u)=>{var f,h;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:u.defaultError}:typeof u.data>"u"?{message:(f=p!=null?p:n)!=null?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p!=null?p:r)!=null?h:u.defaultError}},description:o}}function KUe(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Tlr(t){return new RegExp(`^${KUe(t)}$`)}function ZUe(t){let e=`${JUe}T${KUe(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Dlr(t,e){return!!((e==="v4"||!e)&&Elr.test(t)||(e==="v6"||!e)&&_lr.test(t))}function Plr(t,e){if(!ylr.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Blr(t,e){return!!((e==="v4"||!e)&&wlr.test(t)||(e==="v6"||!e)&&Slr.test(t))}function Rlr(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}function n4(t){if(t instanceof sv){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Zb.create(n4(n))}return new sv({...t._def,shape:()=>e})}else return t instanceof pI?new pI({...t._def,type:n4(t.element)}):t instanceof Zb?Zb.create(n4(t.unwrap())):t instanceof dS?dS.create(n4(t.unwrap())):t instanceof fS?fS.create(t.items.map(e=>n4(e))):t}function Dhe(t,e){let r=pS(t),n=pS(e);if(t===e)return{valid:!0,data:t};if(r===Ii.object&&n===Ii.object){let o=Za.objectKeys(e),s=Za.objectKeys(t).filter(u=>o.indexOf(u)!==-1),c={...t,...e};for(let u of s){let p=Dhe(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===Ii.array&&n===Ii.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let c=t[s],u=e[s],p=Dhe(c,u);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===Ii.date&&n===Ii.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function XUe(t,e){return new dO({values:t,typeName:ho.ZodEnum,...sa(e)})}function YUe(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function e5e(t,e={},r){return t?sD.create().superRefine((n,o)=>{var c,u;let s=t(n);if(s instanceof Promise)return s.then(p=>{var f,h;if(!p){let m=YUe(e,n),y=(h=(f=m.fatal)!=null?f:r)!=null?h:!0;o.addIssue({code:"custom",...m,fatal:y})}});if(!s){let p=YUe(e,n),f=(u=(c=p.fatal)!=null?c:r)!=null?u:!0;o.addIssue({code:"custom",...p,fatal:f})}}):sD.create()}var Xb,WUe,Ea,dlr,hlr,mlr,glr,Alr,ylr,vlr,xlr,blr,The,Elr,wlr,_lr,Slr,Clr,Ilr,JUe,klr,iD,nO,iO,sO,oO,i4,aO,cO,sD,lI,V1,s4,pI,sv,uO,uI,$J,lO,fS,HJ,o4,a4,GJ,pO,fO,dO,hO,oD,eE,Zb,dS,mO,gO,c4,Olr,s5,o5,AO,Nlr,ho,Flr,t5e,r5e,Llr,jlr,n5e,Mlr,Qlr,qlr,Ulr,zlr,$lr,Hlr,Glr,Vlr,Wlr,Ylr,Jlr,Klr,Zlr,Xlr,epr,tpr,rpr,npr,ipr,spr,opr,apr,cpr,upr,lpr,ppr,fpr,dpr,hpr,mpr,gpr,Apr,ypr,i5e=Yr(()=>{QJ();qJ();VUe();khe();n5();Xb=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},WUe=(t,e)=>{if(nD(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new iv(t.common.issues);return this._error=r,this._error}}};Ea=class{get description(){return this._def.description}_getType(e){return pS(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:pS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new lg,ctx:{common:e.parent.common,data:e.data,parsedType:pS(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(r4(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pS(e)},o=this._parseSync({data:e,path:n.path,parent:n});return WUe(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pS(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return nD(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>nD(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pS(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(r4(o)?o:Promise.resolve(o));return WUe(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let c=e(o),u=()=>s.addIssue({code:Fn.custom,...n(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new eE({schema:this,typeName:ho.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Zb.create(this,this._def)}nullable(){return dS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pI.create(this)}promise(){return oD.create(this,this._def)}or(e){return uO.create([this,e],this._def)}and(e){return lO.create(this,e,this._def)}transform(e){return new eE({...sa(this._def),schema:this,typeName:ho.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new mO({...sa(this._def),innerType:this,defaultValue:r,typeName:ho.ZodDefault})}brand(){return new s5({typeName:ho.ZodBranded,type:this,...sa(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new gO({...sa(this._def),innerType:this,catchValue:r,typeName:ho.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return o5.create(this,e)}readonly(){return AO.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},dlr=/^c[^\s-]{8,}$/i,hlr=/^[0-9a-z]+$/,mlr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,glr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Alr=/^[a-z0-9_-]{21}$/i,ylr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vlr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xlr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,blr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Elr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wlr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_lr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Slr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Clr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ilr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,JUe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",klr=new RegExp(`^${JUe}$`);iD=class t extends Ea{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ii.string){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_type,expected:Ii.string,received:s.parsedType}),to}let n=new lg,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,u=e.data.length<s.value;(c||u)&&(o=this._getOrReturnCtx(e,o),c?Ai(o,{code:Fn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&Ai(o,{code:Fn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")xlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"email",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")The||(The=new RegExp(blr,"u")),The.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"emoji",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")glr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"uuid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Alr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"nanoid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")dlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"cuid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")hlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"cuid2",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")mlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"ulid",code:Fn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Ai(o,{validation:"url",code:Fn.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"regex",code:Fn.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?ZUe(s).test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?klr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Tlr(s).test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?vlr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"duration",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Dlr(e.data,s.version)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"ip",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Plr(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"jwt",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Blr(e.data,s.version)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"cidr",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Clr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"base64",code:Fn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Ilr.test(e.data)||(o=this._getOrReturnCtx(e,o),Ai(o,{validation:"base64url",code:Fn.invalid_string,message:s.message}),n.dirty()):Za.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:Fn.invalid_string,...ls.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ls.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ls.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ls.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ls.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ls.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ls.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ls.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ls.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ls.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ls.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ls.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ls.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ls.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!1,...ls.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ls.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ls.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ls.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ls.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ls.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ls.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ls.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ls.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ls.errToObj(r)})}nonempty(e){return this.min(1,ls.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};iD.create=t=>{var e;return new iD({checks:[],typeName:ho.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...sa(t)})};nO=class t extends Ea{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ii.number){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_type,expected:Ii.number,received:s.parsedType}),to}let n,o=new lg;for(let s of this._def.checks)s.kind==="int"?Za.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Rlr(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.not_finite,message:s.message}),o.dirty()):Za.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ls.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ls.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ls.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ls.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ls.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ls.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ls.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ls.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ls.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ls.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ls.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ls.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ls.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ls.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Za.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};nO.create=t=>new nO({checks:[],typeName:ho.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...sa(t)});iO=class t extends Ea{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ii.bigint)return this._getInvalidInput(e);let n,o=new lg;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Ai(n,{code:Fn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Za.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return Ai(r,{code:Fn.invalid_type,expected:Ii.bigint,received:r.parsedType}),to}gte(e,r){return this.setLimit("min",e,!0,ls.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ls.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ls.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ls.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ls.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ls.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ls.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ls.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ls.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ls.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};iO.create=t=>{var e;return new iO({checks:[],typeName:ho.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...sa(t)})};sO=class extends Ea{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ii.boolean){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.boolean,received:n.parsedType}),to}return d0(e.data)}};sO.create=t=>new sO({typeName:ho.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...sa(t)});oO=class t extends Ea{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ii.date){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_type,expected:Ii.date,received:s.parsedType}),to}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return Ai(s,{code:Fn.invalid_date}),to}let n=new lg,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),Ai(o,{code:Fn.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Za.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ls.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ls.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};oO.create=t=>new oO({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ho.ZodDate,...sa(t)});i4=class extends Ea{_parse(e){if(this._getType(e)!==Ii.symbol){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.symbol,received:n.parsedType}),to}return d0(e.data)}};i4.create=t=>new i4({typeName:ho.ZodSymbol,...sa(t)});aO=class extends Ea{_parse(e){if(this._getType(e)!==Ii.undefined){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.undefined,received:n.parsedType}),to}return d0(e.data)}};aO.create=t=>new aO({typeName:ho.ZodUndefined,...sa(t)});cO=class extends Ea{_parse(e){if(this._getType(e)!==Ii.null){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.null,received:n.parsedType}),to}return d0(e.data)}};cO.create=t=>new cO({typeName:ho.ZodNull,...sa(t)});sD=class extends Ea{constructor(){super(...arguments),this._any=!0}_parse(e){return d0(e.data)}};sD.create=t=>new sD({typeName:ho.ZodAny,...sa(t)});lI=class extends Ea{constructor(){super(...arguments),this._unknown=!0}_parse(e){return d0(e.data)}};lI.create=t=>new lI({typeName:ho.ZodUnknown,...sa(t)});V1=class extends Ea{_parse(e){let r=this._getOrReturnCtx(e);return Ai(r,{code:Fn.invalid_type,expected:Ii.never,received:r.parsedType}),to}};V1.create=t=>new V1({typeName:ho.ZodNever,...sa(t)});s4=class extends Ea{_parse(e){if(this._getType(e)!==Ii.undefined){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.void,received:n.parsedType}),to}return d0(e.data)}};s4.create=t=>new s4({typeName:ho.ZodVoid,...sa(t)});pI=class t extends Ea{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Ii.array)return Ai(r,{code:Fn.invalid_type,expected:Ii.array,received:r.parsedType}),to;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,u=r.data.length<o.exactLength.value;(c||u)&&(Ai(r,{code:c?Fn.too_big:Fn.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(Ai(r,{code:Fn.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(Ai(r,{code:Fn.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>o.type._parseAsync(new Xb(r,c,r.path,u)))).then(c=>lg.mergeArray(n,c));let s=[...r.data].map((c,u)=>o.type._parseSync(new Xb(r,c,r.path,u)));return lg.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:ls.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:ls.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:ls.toString(r)}})}nonempty(e){return this.min(1,e)}};pI.create=(t,e)=>new pI({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ho.ZodArray,...sa(e)});sv=class t extends Ea{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Za.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Ii.object){let f=this._getOrReturnCtx(e);return Ai(f,{code:Fn.invalid_type,expected:Ii.object,received:f.parsedType}),to}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof V1&&this._def.unknownKeys==="strip"))for(let f in o.data)c.includes(f)||u.push(f);let p=[];for(let f of c){let h=s[f],m=o.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Xb(o,m,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof V1){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)p.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&(Ai(o,{code:Fn.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let m=o.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Xb(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of p){let m=await h.key,y=await h.value;f.push({key:m,value:y,alwaysSet:h.alwaysSet})}return f}).then(f=>lg.mergeObjectSync(n,f)):lg.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return ls.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,c,u,p;let o=(u=(c=(s=this._def).errorMap)==null?void 0:c.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(p=ls.errToObj(e).message)!=null?p:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ho.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Za.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Za.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return n4(this)}partial(e){let r={};for(let n of Za.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Za.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Zb;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return XUe(Za.objectKeys(this.shape))}};sv.create=(t,e)=>new sv({shape:()=>t,unknownKeys:"strip",catchall:V1.create(),typeName:ho.ZodObject,...sa(e)});sv.strictCreate=(t,e)=>new sv({shape:()=>t,unknownKeys:"strict",catchall:V1.create(),typeName:ho.ZodObject,...sa(e)});sv.lazycreate=(t,e)=>new sv({shape:t,unknownKeys:"strip",catchall:V1.create(),typeName:ho.ZodObject,...sa(e)});uO=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let c=s.map(u=>new iv(u.ctx.common.issues));return Ai(r,{code:Fn.invalid_union,unionErrors:c}),to}if(r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let p of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=p._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=c.map(p=>new iv(p));return Ai(r,{code:Fn.invalid_union,unionErrors:u}),to}}get options(){return this._def.options}};uO.create=(t,e)=>new uO({options:t,typeName:ho.ZodUnion,...sa(e)});uI=t=>t instanceof pO?uI(t.schema):t instanceof eE?uI(t.innerType()):t instanceof fO?[t.value]:t instanceof dO?t.options:t instanceof hO?Za.objectValues(t.enum):t instanceof mO?uI(t._def.innerType):t instanceof aO?[void 0]:t instanceof cO?[null]:t instanceof Zb?[void 0,...uI(t.unwrap())]:t instanceof dS?[null,...uI(t.unwrap())]:t instanceof s5||t instanceof AO?uI(t.unwrap()):t instanceof gO?uI(t._def.innerType):[],$J=class t extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ii.object)return Ai(r,{code:Fn.invalid_type,expected:Ii.object,received:r.parsedType}),to;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Ai(r,{code:Fn.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),to)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=uI(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of c){if(o.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);o.set(u,s)}}return new t({typeName:ho.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...sa(n)})}};lO=class extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,c)=>{if(UJ(s)||UJ(c))return to;let u=Dhe(s.value,c.value);return u.valid?((zJ(s)||zJ(c))&&r.dirty(),{status:r.value,value:u.data}):(Ai(n,{code:Fn.invalid_intersection_types}),to)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};lO.create=(t,e,r)=>new lO({left:t,right:e,typeName:ho.ZodIntersection,...sa(r)});fS=class t extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.array)return Ai(n,{code:Fn.invalid_type,expected:Ii.array,received:n.parsedType}),to;if(n.data.length<this._def.items.length)return Ai(n,{code:Fn.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),to;!this._def.rest&&n.data.length>this._def.items.length&&(Ai(n,{code:Fn.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,u)=>{let p=this._def.items[u]||this._def.rest;return p?p._parse(new Xb(n,c,n.path,u)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>lg.mergeArray(r,c)):lg.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};fS.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fS({items:t,typeName:ho.ZodTuple,rest:null,...sa(e)})};HJ=class t extends Ea{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.object)return Ai(n,{code:Fn.invalid_type,expected:Ii.object,received:n.parsedType}),to;let o=[],s=this._def.keyType,c=this._def.valueType;for(let u in n.data)o.push({key:s._parse(new Xb(n,u,n.path,u)),value:c._parse(new Xb(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?lg.mergeObjectAsync(r,o):lg.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Ea?new t({keyType:e,valueType:r,typeName:ho.ZodRecord,...sa(n)}):new t({keyType:iD.create(),valueType:e,typeName:ho.ZodRecord,...sa(r)})}},o4=class extends Ea{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.map)return Ai(n,{code:Fn.invalid_type,expected:Ii.map,received:n.parsedType}),to;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([u,p],f)=>({key:o._parse(new Xb(n,u,n.path,[f,"key"])),value:s._parse(new Xb(n,p,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let p of c){let f=await p.key,h=await p.value;if(f.status==="aborted"||h.status==="aborted")return to;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let p of c){let f=p.key,h=p.value;if(f.status==="aborted"||h.status==="aborted")return to;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}}}};o4.create=(t,e,r)=>new o4({valueType:e,keyType:t,typeName:ho.ZodMap,...sa(r)});a4=class t extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ii.set)return Ai(n,{code:Fn.invalid_type,expected:Ii.set,received:n.parsedType}),to;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Ai(n,{code:Fn.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(Ai(n,{code:Fn.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(p){let f=new Set;for(let h of p){if(h.status==="aborted")return to;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}let u=[...n.data.values()].map((p,f)=>s._parse(new Xb(n,p,n.path,f)));return n.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:ls.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:ls.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};a4.create=(t,e)=>new a4({valueType:t,minSize:null,maxSize:null,typeName:ho.ZodSet,...sa(e)});GJ=class t extends Ea{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ii.function)return Ai(r,{code:Fn.invalid_type,expected:Ii.function,received:r.parsedType}),to;function n(u,p){return i5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t4(),cI].filter(f=>!!f),issueData:{code:Fn.invalid_arguments,argumentsError:p}})}function o(u,p){return i5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t4(),cI].filter(f=>!!f),issueData:{code:Fn.invalid_return_type,returnTypeError:p}})}let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof oD){let u=this;return d0(async function(...p){let f=new iv([]),h=await u._def.args.parseAsync(p,s).catch(x=>{throw f.addIssue(n(p,x)),f}),m=await Reflect.apply(c,this,h);return await u._def.returns._def.type.parseAsync(m,s).catch(x=>{throw f.addIssue(o(m,x)),f})})}else{let u=this;return d0(function(...p){let f=u._def.args.safeParse(p,s);if(!f.success)throw new iv([n(p,f.error)]);let h=Reflect.apply(c,this,f.data),m=u._def.returns.safeParse(h,s);if(!m.success)throw new iv([o(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:fS.create(e).rest(lI.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||fS.create([]).rest(lI.create()),returns:r||lI.create(),typeName:ho.ZodFunction,...sa(n)})}},pO=class extends Ea{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};pO.create=(t,e)=>new pO({getter:t,typeName:ho.ZodLazy,...sa(e)});fO=class extends Ea{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Ai(r,{received:r.data,code:Fn.invalid_literal,expected:this._def.value}),to}return{status:"valid",value:e.data}}get value(){return this._def.value}};fO.create=(t,e)=>new fO({value:t,typeName:ho.ZodLiteral,...sa(e)});dO=class t extends Ea{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return Ai(r,{expected:Za.joinValues(n),received:r.parsedType,code:Fn.invalid_type}),to}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return Ai(r,{received:r.data,code:Fn.invalid_enum_value,options:n}),to}return d0(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};dO.create=XUe;hO=class extends Ea{_parse(e){let r=Za.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ii.string&&n.parsedType!==Ii.number){let o=Za.objectValues(r);return Ai(n,{expected:Za.joinValues(o),received:n.parsedType,code:Fn.invalid_type}),to}if(this._cache||(this._cache=new Set(Za.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Za.objectValues(r);return Ai(n,{received:n.data,code:Fn.invalid_enum_value,options:o}),to}return d0(e.data)}get enum(){return this._def.values}};hO.create=(t,e)=>new hO({values:t,typeName:ho.ZodNativeEnum,...sa(e)});oD=class extends Ea{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ii.promise&&r.common.async===!1)return Ai(r,{code:Fn.invalid_type,expected:Ii.promise,received:r.parsedType}),to;let n=r.parsedType===Ii.promise?r.data:Promise.resolve(r.data);return d0(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};oD.create=(t,e)=>new oD({type:t,typeName:ho.ZodPromise,...sa(e)});eE=class extends Ea{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ho.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:c=>{Ai(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return to;let p=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return p.status==="aborted"?to:p.status==="dirty"?rO(p.value):r.value==="dirty"?rO(p.value):p});{if(r.value==="aborted")return to;let u=this._def.schema._parseSync({data:c,path:n.path,parent:n});return u.status==="aborted"?to:u.status==="dirty"?rO(u.value):r.value==="dirty"?rO(u.value):u}}if(o.type==="refinement"){let c=u=>{let p=o.refinement(u,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?to:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?to:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!nD(c))return to;let u=o.transform(c.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>nD(c)?Promise.resolve(o.transform(c.value,s)).then(u=>({status:r.value,value:u})):to);Za.assertNever(o)}};eE.create=(t,e,r)=>new eE({schema:t,typeName:ho.ZodEffects,effect:e,...sa(r)});eE.createWithPreprocess=(t,e,r)=>new eE({schema:e,effect:{type:"preprocess",transform:t},typeName:ho.ZodEffects,...sa(r)});Zb=class extends Ea{_parse(e){return this._getType(e)===Ii.undefined?d0(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Zb.create=(t,e)=>new Zb({innerType:t,typeName:ho.ZodOptional,...sa(e)});dS=class extends Ea{_parse(e){return this._getType(e)===Ii.null?d0(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};dS.create=(t,e)=>new dS({innerType:t,typeName:ho.ZodNullable,...sa(e)});mO=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Ii.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};mO.create=(t,e)=>new mO({innerType:t,typeName:ho.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...sa(e)});gO=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return r4(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new iv(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new iv(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};gO.create=(t,e)=>new gO({innerType:t,typeName:ho.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...sa(e)});c4=class extends Ea{_parse(e){if(this._getType(e)!==Ii.nan){let n=this._getOrReturnCtx(e);return Ai(n,{code:Fn.invalid_type,expected:Ii.nan,received:n.parsedType}),to}return{status:"valid",value:e.data}}};c4.create=t=>new c4({typeName:ho.ZodNaN,...sa(t)});Olr=Symbol("zod_brand"),s5=class extends Ea{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},o5=class t extends Ea{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?to:s.status==="dirty"?(r.dirty(),rO(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?to:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:ho.ZodPipeline})}},AO=class extends Ea{_parse(e){let r=this._def.innerType._parse(e),n=o=>(nD(o)&&(o.value=Object.freeze(o.value)),o);return r4(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};AO.create=(t,e)=>new AO({innerType:t,typeName:ho.ZodReadonly,...sa(e)});Nlr={object:sv.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ho||(ho={}));Flr=(t,e={message:`Input not instance of ${t.name}`})=>e5e(r=>r instanceof t,e),t5e=iD.create,r5e=nO.create,Llr=c4.create,jlr=iO.create,n5e=sO.create,Mlr=oO.create,Qlr=i4.create,qlr=aO.create,Ulr=cO.create,zlr=sD.create,$lr=lI.create,Hlr=V1.create,Glr=s4.create,Vlr=pI.create,Wlr=sv.create,Ylr=sv.strictCreate,Jlr=uO.create,Klr=$J.create,Zlr=lO.create,Xlr=fS.create,epr=HJ.create,tpr=o4.create,rpr=a4.create,npr=GJ.create,ipr=pO.create,spr=fO.create,opr=dO.create,apr=hO.create,cpr=oD.create,upr=eE.create,lpr=Zb.create,ppr=dS.create,fpr=eE.createWithPreprocess,dpr=o5.create,hpr=()=>t5e().optional(),mpr=()=>r5e().optional(),gpr=()=>n5e().optional(),Apr={string:t=>iD.create({...t,coerce:!0}),number:t=>nO.create({...t,coerce:!0}),boolean:t=>sO.create({...t,coerce:!0}),bigint:t=>iO.create({...t,coerce:!0}),date:t=>oO.create({...t,coerce:!0})},ypr=to});var Ox={};Nj(Ox,{BRAND:()=>Olr,DIRTY:()=>rO,EMPTY_PATH:()=>flr,INVALID:()=>to,NEVER:()=>ypr,OK:()=>d0,ParseStatus:()=>lg,Schema:()=>Ea,ZodAny:()=>sD,ZodArray:()=>pI,ZodBigInt:()=>iO,ZodBoolean:()=>sO,ZodBranded:()=>s5,ZodCatch:()=>gO,ZodDate:()=>oO,ZodDefault:()=>mO,ZodDiscriminatedUnion:()=>$J,ZodEffects:()=>eE,ZodEnum:()=>dO,ZodError:()=>iv,ZodFirstPartyTypeKind:()=>ho,ZodFunction:()=>GJ,ZodIntersection:()=>lO,ZodIssueCode:()=>Fn,ZodLazy:()=>pO,ZodLiteral:()=>fO,ZodMap:()=>o4,ZodNaN:()=>c4,ZodNativeEnum:()=>hO,ZodNever:()=>V1,ZodNull:()=>cO,ZodNullable:()=>dS,ZodNumber:()=>nO,ZodObject:()=>sv,ZodOptional:()=>Zb,ZodParsedType:()=>Ii,ZodPipeline:()=>o5,ZodPromise:()=>oD,ZodReadonly:()=>AO,ZodRecord:()=>HJ,ZodSchema:()=>Ea,ZodSet:()=>a4,ZodString:()=>iD,ZodSymbol:()=>i4,ZodTransformer:()=>eE,ZodTuple:()=>fS,ZodType:()=>Ea,ZodUndefined:()=>aO,ZodUnion:()=>uO,ZodUnknown:()=>lI,ZodVoid:()=>s4,addIssueToContext:()=>Ai,any:()=>zlr,array:()=>Vlr,bigint:()=>jlr,boolean:()=>n5e,coerce:()=>Apr,custom:()=>e5e,date:()=>Mlr,datetimeRegex:()=>ZUe,defaultErrorMap:()=>cI,discriminatedUnion:()=>Klr,effect:()=>upr,enum:()=>opr,function:()=>npr,getErrorMap:()=>t4,getParsedType:()=>pS,instanceof:()=>Flr,intersection:()=>Zlr,isAborted:()=>UJ,isAsync:()=>r4,isDirty:()=>zJ,isValid:()=>nD,late:()=>Nlr,lazy:()=>ipr,literal:()=>spr,makeIssue:()=>i5,map:()=>tpr,nan:()=>Llr,nativeEnum:()=>apr,never:()=>Hlr,null:()=>Ulr,nullable:()=>ppr,number:()=>r5e,object:()=>Wlr,objectUtil:()=>Che,oboolean:()=>gpr,onumber:()=>mpr,optional:()=>lpr,ostring:()=>hpr,pipeline:()=>dpr,preprocess:()=>fpr,promise:()=>cpr,quotelessJson:()=>ulr,record:()=>epr,set:()=>rpr,setErrorMap:()=>plr,strictObject:()=>Ylr,string:()=>t5e,symbol:()=>Qlr,transformer:()=>upr,tuple:()=>Xlr,undefined:()=>qlr,union:()=>Jlr,unknown:()=>$lr,util:()=>Za,void:()=>Glr});var Phe=Yr(()=>{qJ();khe();GUe();n5();i5e();QJ()});var s5e=Yr(()=>{Phe();Phe()});var vpr,o5e,xpr,bpr,Epr,wpr,_pr,Spr,Cpr,a5e,c5e=Yr(()=>{s5e();vpr=/^(?=.{2,30}$)[a-z0-9]+(-[a-z0-9]+)*-?[a-z0-9]+$/,o5e=Ox.string().refine(t=>vpr.test(t)),xpr=Ox.enum(["vps-react-ts","vps-react","vps-vue-ts","vps-vue","manaia-demo","manaia-demo-ts"]),bpr=Ox.object({name:o5e}),Epr=Ox.object({name:o5e,template:xpr}),wpr=Ox.object({script:Ox.string().optional()}),_pr=Ox.object({script:Ox.string().optional()}),Spr=Ox.object({}),Cpr=Ox.object({}),a5e={initArgsSchema:bpr,generateArgsSchema:Epr,devArgsSchema:wpr,publishArgsSchema:_pr,deleteArgsSchema:Spr,testArgsSchema:Cpr}});function Ipr(t,e){return r=>{try{t.parse(r)}catch(n){throw new jJ(`Failed to validate ${e}`,n)}}}function kpr(){let t={};return Object.entries({...a5e,...ghe}).forEach(([e,r])=>{let n=e.replace("Schema","");t[n]=Ipr(r,n)}),t}var xfi,u5e=Yr(()=>{c5e();FJ();Ahe();xfi=kpr()});function u4(t="",e={confPath:""}){try{t=t||process.cwd();let[r,n]=c5(t);if(e.exists=n,!n)return e.showError||(0,f0.showError)(),{headers:[],redirects:[],rewrites:[]};if(e.confPath=r,r.endsWith(".ts"))return Dpr(r);let o=wJ(r);return f5e.default.parse(o)}catch{e.showError||(0,f0.showError)()}}function Dpr(t){var m,y,x,A,I,w,k,B,j;let e=Bhe.default.statSync(t),r=l5e.get(t);if(r&&r.mtimeMs===e.mtimeMs)return r.config;let n=(0,a5.createRequire)(__edgeoneImportMetaUrl),o=Nx.default.join(Nx.default.dirname((0,d5e.fileURLToPath)(__edgeoneImportMetaUrl)),"config-schema.js"),s=Bhe.default.existsSync(o)?o:n.resolve("@edgeone/types/config"),c;try{c=(0,p5e.buildSync)({entryPoints:[t],bundle:!0,platform:"node",format:"cjs",write:!1,target:"node12",logLevel:"silent",absWorkingDir:Nx.default.dirname(t),alias:{"@edgeone/types/config":s},external:[]})}catch(Q){throw new tO(`Failed to load ${Nx.default.basename(t)}:
|
|
22
22
|
${(m=Q==null?void 0:Q.message)!=null?m:Q}`)}if((y=c.errors)!=null&&y.length)throw new tO(`Failed to load ${Nx.default.basename(t)}:
|
|
23
23
|
`+c.errors.map(Q=>`${Q.text}${Q.location?` (${Q.location.file}:${Q.location.line})`:""}`).join(`
|
|
24
24
|
`));let u=(I=(A=(x=c.outputFiles)==null?void 0:x[0])==null?void 0:A.text)!=null?I:"",p=new a5.default(t);p.filename=t,p.paths=a5.default._nodeModulePaths(Nx.default.dirname(t)),p._compile(u,t);let f=(j=(B=(w=p.exports)==null?void 0:w.default)!=null?B:(k=p.exports)==null?void 0:k.config)!=null?j:p.exports,h=typeof f=="function"?f():f;if(!h||typeof h!="object"||Array.isArray(h))throw new tO(`${Nx.default.basename(t)} must default-export a config object.`);return l5e.set(t,{mtimeMs:e.mtimeMs,config:h}),h}function Bpr(t){let e=new Error(t);return e.code=m5e,e}function Rpr(t){if((t==null?void 0:t.code)===m5e)return!0;let e=typeof t=="string"?t:t==null?void 0:t.message;return e==null?void 0:e.includes(Ppr)}async function l4(t=!1){var s,c,u,p,f,h,m,y,x;!t&&console.log(`
|
|
@@ -967,7 +967,7 @@ caused by: `+Xc.fullStack(e):t.stack};Xc.errorFromList=function(t){return ah.arr
|
|
|
967
967
|
`)}rowToString(e,r){return this.rasterize(e).forEach((n,o)=>{let s="";n.forEach((c,u)=>{let{width:p}=e[u],f=this.negatePadding(e[u]),h=c;if(f>kx.stringWidth(c)&&(h+=" ".repeat(f-kx.stringWidth(c))),e[u].align&&e[u].align!=="left"&&this.wrap){let y=_ir[e[u].align];h=y(h,f),kx.stringWidth(h)<f&&(h+=" ".repeat((p||0)-kx.stringWidth(h)-1))}let m=e[u].padding||[0,0,0,0];m[eJ]&&(s+=" ".repeat(m[eJ])),s+=WQe(e[u],h,"| "),s+=h,s+=WQe(e[u],h," |"),m[XY]&&(s+=" ".repeat(m[XY])),o===0&&r.length>0&&(s=this.renderInline(s,r[r.length-1]))}),r.push({text:s.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),o=n?n[0].length:0,s=r.text,c=kx.stringWidth(s.trimRight());return r.span?this.wrap?o<c?e:(r.hidden=!0,s.trimRight()+" ".repeat(o-c)+e.trimLeft()):(r.hidden=!0,s+e):e}rasterize(e){let r=[],n=this.columnWidths(e),o;return e.forEach((s,c)=>{s.width=n[c],this.wrap?o=kx.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
|
|
968
968
|
`):o=s.text.split(`
|
|
969
969
|
`),s.border&&(o.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),o.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(o.unshift(...new Array(s.padding[Sir]||0).fill("")),o.push(...new Array(s.padding[Cir]||0).fill(""))),o.forEach((u,p)=>{r[p]||r.push([]);let f=r[p];for(let h=0;h<c;h++)f[h]===void 0&&f.push("");f.push(u)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[eJ]||0)+(e.padding[XY]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(c=>c.width||kx.stringWidth(c.text));let r=e.length,n=this.width,o=e.map(c=>{if(c.width)return r--,n-=c.width,c.width}),s=r?Math.floor(n/r):0;return o.map((c,u)=>c===void 0?Math.max(s,Iir(e[u])):c)}};function WQe(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function Iir(t){let e=t.padding||[],r=1+(e[eJ]||0)+(e[XY]||0);return t.border?r+4:r}function kir(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Tir(t,e){t=t.trim();let r=kx.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function Dir(t,e){t=t.trim();let r=kx.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}var kx;function YQe(t,e){return kx=e,new pde({width:(t==null?void 0:t.width)||kir(),wrap:t==null?void 0:t.wrap})}var JQe=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function fde(t){return t.replace(JQe,"")}function KQe(t,e){let[r,n]=t.match(JQe)||["",""];t=fde(t);let o="";for(let s=0;s<t.length;s++)s!==0&&s%e===0&&(o+=`
|
|
970
|
-
`),o+=t.charAt(s);return r&&n&&(o=`${r}${o}${n}`),o}function dde(t){return YQe(t,{stringWidth:e=>[...e].length,stripAnsi:fde,wrap:KQe})}var Fj=require("path"),tJ=require("fs");function ZQe(t,e){let r=(0,Fj.resolve)(".",t),n;for((0,tJ.statSync)(r).isDirectory()||(r=(0,Fj.dirname)(r));;){if(n=e(r,(0,tJ.readdirSync)(r)),n)return(0,Fj.resolve)(r,n);if(r=(0,Fj.dirname)(n=r),n===r)break}}var s8e=require("util"),o8e=require("fs"),a8e=require("url");var U1=require("path");var Lj=require("fs"),XQe=require("util"),e8e=require("path"),t8e={fs:{readFileSync:Lj.readFileSync,writeFile:Lj.writeFile},format:XQe.format,resolve:e8e.resolve,exists:t=>{try{return(0,Lj.statSync)(t).isFile()}catch{return!1}}};var q1,hde=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),q1.format.apply(q1.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),o=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=o===1?r:n;this.cache[this.locale][r]&&(c=this.cache[this.locale][r][o===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let u=[c];return~c.indexOf("%d")&&u.push(o),q1.format.apply(q1.format,u.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(o,s){let c=r[s+1];n+=o,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,o=r.locale,s=r.cb,c=this._resolveLocaleFile(n,o),u=JSON.stringify(this.cache[o],null,2);q1.fs.writeFile(c,u,"utf-8",function(p){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(p)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{q1.fs.readFileSync&&(e=JSON.parse(q1.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=q1.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let o=q1.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(o)&&(n=o)}return n}_fileExistsSync(e){return q1.exists(e)}};function r8e(t,e){q1=e;let r=new hde(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var Pir=t=>r8e(t,t8e),n8e=Pir;var Bir="require is not supported by ESM",i8e="loading a directory of commands is not supported yet for ESM",NU;try{NU=(0,a8e.fileURLToPath)("file:///data/__qci/root-workspaces/__qci-pipeline-11895869-1/packages/tef-cli/edgeone-dist/cli.js")}catch{NU=process.cwd()}var Rir=NU.substring(0,NU.lastIndexOf("node_modules")),mde={assert:{notStrictEqual:rJ.notStrictEqual,strictEqual:rJ.strictEqual},cliui:dde,findUp:ZQe,getEnv:t=>process.env[t],inspect:s8e.inspect,getCallerFile:()=>{throw new fp(i8e)},getProcessArgvBin:QQe,mainFilename:Rir||process.cwd(),Parser:lde,path:{basename:U1.basename,dirname:U1.dirname,extname:U1.extname,relative:U1.relative,resolve:U1.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:o8e.readFileSync,require:()=>{throw new fp(Bir)},requireDirectory:()=>{throw new fp(i8e)},stringWidth:t=>[...t].length,y18n:n8e({directory:(0,U1.resolve)(NU,"../../../locales"),updateFiles:!1})};function SA(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function gde(t,e){e.assert.strictEqual(typeof t,"string")}function jj(t){return Object.keys(t)}function dp(t){return!!t&&!!t.then&&typeof t.then=="function"}function UT(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,o=r.shift();if(!o)throw new Error(`No command found in: ${t}`);let s={cmd:o.replace(n,""),demanded:[],optional:[]};return r.forEach((c,u)=>{let p=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&u===r.length-1&&(p=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:p}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:p})}),s}var Oir=["first","second","third","fourth","fifth","sixth"];function qi(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[UT(`cmd ${t}`),e,r]}try{let o=0,[s,c,u]=n(),p=[].slice.call(c);for(;p.length&&p[p.length-1]===void 0;)p.pop();let f=u||p.length;if(f<s.demanded.length)throw new fp(`Not enough arguments provided. Expected ${s.demanded.length} but received ${p.length}.`);let h=s.demanded.length+s.optional.length;if(f>h)throw new fp(`Too many arguments provided. Expected max ${h} but received ${f}.`);s.demanded.forEach(m=>{let y=p.shift(),x=c8e(y);m.cmd.filter(I=>I===x||I==="*").length===0&&u8e(x,m.cmd,o),o+=1}),s.optional.forEach(m=>{if(p.length===0)return;let y=p.shift(),x=c8e(y);m.cmd.filter(I=>I===x||I==="*").length===0&&u8e(x,m.cmd,o),o+=1})}catch(o){console.warn(o.stack)}}function c8e(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function u8e(t,e,r){throw new fp(`Invalid ${Oir[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var nJ=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,o=!1){if(qi("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");let c=e[s];c.applyBeforeValidation=r,c.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let s=e;s.applyBeforeValidation=r,s.global=n,s.mutates=o,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(o=>{let s=[...n[r]||[],r];return o.option?!s.includes(o.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function l8e(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function _R(t,e,r,n){return r.reduce((o,s)=>{if(s.applyBeforeValidation!==n)return o;if(s.mutates){if(s.applied)return o;s.applied=!0}if(dp(o))return o.then(c=>Promise.all([c,s(c,e)])).then(([c,u])=>Object.assign(c,u));{let c=s(o,e);return dp(c)?c.then(u=>Object.assign(o,u)):Object.assign(o,c)}},t)}function SR(t,e,r=n=>{throw n}){try{let n=Nir(t)?t():t;return dp(n)?n.then(o=>e(o)):e(n)}catch(n){return r(n)}}function Nir(t){return typeof t=="function"}function Ade(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}var Mj=/(^\*)|(^\$0)/,yde=class{constructor(e,r,n,o){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=o,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,o){o=o||{},typeof o.recurse!="boolean"&&(o.recurse=!1),Array.isArray(o.extensions)||(o.extensions=["js"]);let s=typeof o.visit=="function"?o.visit:c=>c;o.visit=(c,u,p)=>{let f=s(c,u,p);if(f){if(this.requireCache.has(u))return f;this.requireCache.add(u),this.addHandler(f)}return f},this.shim.requireDirectory({require:r,filename:n},e,o)}addHandler(e,r,n,o,s,c){let u=[],p=l8e(s);if(o=o||(()=>{}),Array.isArray(e))if(Fir(e))[e,...u]=e;else for(let f of e)this.addHandler(f);else if(jir(e)){let f=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(f=[].concat(f).concat(e.aliases)),this.addHandler(f,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(p8e(n)){this.addHandler([e].concat(u),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let f=UT(e);u=u.map(y=>UT(y).cmd);let h=!1,m=[f.cmd].concat(u).filter(y=>Mj.test(y)?(h=!0,!1):!0);m.length===0&&h&&m.push("$0"),h&&(f.cmd=m[0],u=m.slice(1),e=e.replace(Mj,f.cmd)),u.forEach(y=>{this.aliasMap[y]=f.cmd}),r!==!1&&this.usage.command(e,r,h,u,c),this.handlers[f.cmd]={original:e,description:r,handler:o,builder:n||{},middlewares:p,deprecated:c,demanded:f.demanded,optional:f.optional},h&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,o,s,c){let u=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,p=r.getInternalMethods().getContext(),f=p.commands.slice(),h=!e;e&&(p.commands.push(e),p.fullCommands.push(u.original));let m=this.applyBuilderUpdateUsageAndParse(h,u,r,n.aliases,f,o,s,c);return dp(m)?m.then(y=>this.applyMiddlewareAndGetResult(h,u,y.innerArgv,p,s,y.aliases,r)):this.applyMiddlewareAndGetResult(h,u,m.innerArgv,p,s,m.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,o,s,c,u,p){let f=r.builder,h=n;if(iJ(f)){n.getInternalMethods().getUsageInstance().freeze();let m=f(n.getInternalMethods().reset(o),p);if(dp(m))return m.then(y=>(h=d8e(y)?y:n,this.parseAndUpdateUsage(e,r,h,s,c,u)))}else Lir(f)&&(n.getInternalMethods().getUsageInstance().freeze(),h=n.getInternalMethods().reset(o),Object.keys(r.builder).forEach(m=>{h.option(m,f[m])}));return this.parseAndUpdateUsage(e,r,h,s,c,u)}parseAndUpdateUsage(e,r,n,o,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(o,r),r.description);let u=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return dp(u)?u.then(p=>({aliases:n.parsed.aliases,innerArgv:p})):{aliases:n.parsed.aliases,innerArgv:u}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Mj.test(r.original)?r.original.replace(Mj,"").trim():r.original,o=e.filter(s=>!Mj.test(s));return o.push(n),`$0 ${o.join(" ")}`}handleValidationAndGetResult(e,r,n,o,s,c,u,p){if(!c.getInternalMethods().getHasOutput()){let f=c.getInternalMethods().runValidation(s,p,c.parsed.error,e);n=SR(n,h=>(f(h),h))}if(r.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let f=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,f,!1,!1),n=_R(n,c,u,!1),n=SR(n,h=>{let m=r.handler(h);return dp(m)?m.then(()=>h):h}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),dp(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(h=>{try{c.getInternalMethods().getUsageInstance().fail(null,h)}catch{}})}return e||(o.commands.pop(),o.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,o,s,c,u){let p={};if(s)return n;u.getInternalMethods().getHasOutput()||(p=this.populatePositionals(r,n,o,u));let f=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),h=_R(n,u,f,!0);return dp(h)?h.then(m=>this.handleValidationAndGetResult(e,r,m,o,c,u,f,p)):this.handleValidationAndGetResult(e,r,h,o,c,u,f,p)}populatePositionals(e,r,n,o){r._=r._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),u={};for(this.validation.positionalCount(s.length,r._.length);s.length;){let p=s.shift();this.populatePositional(p,r,u)}for(;c.length;){let p=c.shift();this.populatePositional(p,r,u)}return r._=n.commands.concat(r._.map(p=>""+p)),this.postProcessPositionals(r,u,this.cmdToParseOptions(e.original),o),u}populatePositional(e,r,n){let o=e.cmd[0];e.variadic?n[o]=r._.splice(0).map(String):r._.length&&(n[o]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=UT(e);return n.demanded.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c,r.demand[s]=!0}),n.optional.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c}),r}postProcessPositionals(e,r,n,o){let s=Object.assign({},o.getOptions());s.default=Object.assign(n.default,s.default);for(let f of Object.keys(n.alias))s.alias[f]=(s.alias[f]||[]).concat(n.alias[f]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(r).forEach(f=>{r[f].map(h=>{s.configuration["unknown-options-as-args"]&&(s.key[f]=!0),c.push(`--${f}`),c.push(h)})}),!c.length)return;let u=Object.assign({},s.configuration,{"populate--":!1}),p=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:u}));if(p.error)o.getInternalMethods().getUsageInstance().fail(p.error.message,p.error);else{let f=Object.keys(r);Object.keys(r).forEach(h=>{f.push(...p.aliases[h])}),Object.keys(p.argv).forEach(h=>{f.includes(h)&&(r[h]||(r[h]=p.argv[h]),!this.isInConfigs(o,h)&&!this.isDefaulted(o,h)&&Object.prototype.hasOwnProperty.call(e,h)&&Object.prototype.hasOwnProperty.call(p.argv,h)&&(Array.isArray(e[h])||Array.isArray(p.argv[h]))?e[h]=[].concat(e[h],p.argv[h]):e[h]=p.argv[h])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(o=>Object.prototype.hasOwnProperty.call(o,r))||n.some(o=>Object.prototype.hasOwnProperty.call(o,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Mj.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(iJ(r))return r(e,!0);p8e(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=Ade(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let o of[e,r,n]){if(typeof o=="string"||o===!1)return o;SA(o,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();SA(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function f8e(t,e,r,n){return new yde(t,e,r,n)}function p8e(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function Fir(t){return t.every(e=>typeof e=="string")}function iJ(t){return typeof t=="function"}function Lir(t){return typeof t=="object"}function jir(t){return typeof t=="object"&&!Array.isArray(t)}function zT(t={},e=()=>!0){let r={};return jj(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function $T(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function Mir(t){return typeof t=="boolean"}function m8e(t,e){let r=e.y18n.__,n={},o=[];n.failFn=function(be){o.push(be)};let s=null,c=null,u=!0;n.showHelpOnFail=function(be=!0,ae){let[G,me]=typeof be=="string"?[!0,be]:[be,ae];return t.getInternalMethods().isGlobalContext()&&(c=me),s=me,u=G,n};let p=!1;n.fail=function(be,ae){let G=t.getInternalMethods().getLoggerInstance();if(o.length)for(let me=o.length-1;me>=0;--me){let Ce=o[me];if(Mir(Ce)){if(ae)throw ae;if(be)throw Error(be)}else Ce(be,ae,n)}else{if(t.getExitProcess()&&$T(!0),!p){p=!0,u&&(t.showHelp("error"),G.error()),(be||ae)&&G.error(be||ae);let me=s||c;me&&((be||ae)&&G.error(""),G.error(me))}if(ae=ae||new fp(be),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,ae);throw ae}};let f=[],h=!1;n.usage=(ne,be)=>ne===null?(h=!0,f=[],n):(h=!1,f.push([ne,be||""]),n),n.getUsage=()=>f,n.getUsageDisabled=()=>h,n.getPositionalGroupName=()=>r("Positionals:");let m=[];n.example=(ne,be)=>{m.push([ne,be||""])};let y=[];n.command=function(be,ae,G,me,Ce=!1){G&&(y=y.map(Te=>(Te[2]=!1,Te))),y.push([be,ae||"",G,me,Ce])},n.getCommands=()=>y;let x={};n.describe=function(be,ae){Array.isArray(be)?be.forEach(G=>{n.describe(G,ae)}):typeof be=="object"?Object.keys(be).forEach(G=>{n.describe(G,be[G])}):x[be]=ae},n.getDescriptions=()=>x;let A=[];n.epilog=ne=>{A.push(ne)};let I=!1,w;n.wrap=ne=>{I=!0,w=ne},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(I||(w=xe(),I=!0),w);let k="__yargsString__:";n.deferY18nLookup=ne=>k+ne,n.help=function(){if(Q)return Q;j();let be=t.customScriptName?t.$0:e.path.basename(t.$0),ae=t.getDemandedOptions(),G=t.getDemandedCommands(),me=t.getDeprecatedOptions(),Ce=t.getGroups(),Te=t.getOptions(),ze=[];ze=ze.concat(Object.keys(x)),ze=ze.concat(Object.keys(ae)),ze=ze.concat(Object.keys(G)),ze=ze.concat(Object.keys(Te.default)),ze=ze.filter(te),ze=Object.keys(ze.reduce((ft,gt)=>(gt!=="_"&&(ft[gt]=!0),ft),{}));let Tt=n.getWrap(),Dt=e.cliui({width:Tt,wrap:!!Tt});if(!h){if(f.length)f.forEach(ft=>{Dt.div({text:`${ft[0].replace(/\$0/g,be)}`}),ft[1]&&Dt.div({text:`${ft[1]}`,padding:[1,0,0,0]})}),Dt.div();else if(y.length){let ft=null;G._?ft=`${be} <${r("command")}>
|
|
970
|
+
`),o+=t.charAt(s);return r&&n&&(o=`${r}${o}${n}`),o}function dde(t){return YQe(t,{stringWidth:e=>[...e].length,stripAnsi:fde,wrap:KQe})}var Fj=require("path"),tJ=require("fs");function ZQe(t,e){let r=(0,Fj.resolve)(".",t),n;for((0,tJ.statSync)(r).isDirectory()||(r=(0,Fj.dirname)(r));;){if(n=e(r,(0,tJ.readdirSync)(r)),n)return(0,Fj.resolve)(r,n);if(r=(0,Fj.dirname)(n=r),n===r)break}}var s8e=require("util"),o8e=require("fs"),a8e=require("url");var U1=require("path");var Lj=require("fs"),XQe=require("util"),e8e=require("path"),t8e={fs:{readFileSync:Lj.readFileSync,writeFile:Lj.writeFile},format:XQe.format,resolve:e8e.resolve,exists:t=>{try{return(0,Lj.statSync)(t).isFile()}catch{return!1}}};var q1,hde=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),q1.format.apply(q1.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),o=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=o===1?r:n;this.cache[this.locale][r]&&(c=this.cache[this.locale][r][o===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let u=[c];return~c.indexOf("%d")&&u.push(o),q1.format.apply(q1.format,u.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(o,s){let c=r[s+1];n+=o,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,o=r.locale,s=r.cb,c=this._resolveLocaleFile(n,o),u=JSON.stringify(this.cache[o],null,2);q1.fs.writeFile(c,u,"utf-8",function(p){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(p)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{q1.fs.readFileSync&&(e=JSON.parse(q1.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=q1.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let o=q1.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(o)&&(n=o)}return n}_fileExistsSync(e){return q1.exists(e)}};function r8e(t,e){q1=e;let r=new hde(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var Pir=t=>r8e(t,t8e),n8e=Pir;var Bir="require is not supported by ESM",i8e="loading a directory of commands is not supported yet for ESM",NU;try{NU=(0,a8e.fileURLToPath)(__edgeoneImportMetaUrl)}catch{NU=process.cwd()}var Rir=NU.substring(0,NU.lastIndexOf("node_modules")),mde={assert:{notStrictEqual:rJ.notStrictEqual,strictEqual:rJ.strictEqual},cliui:dde,findUp:ZQe,getEnv:t=>process.env[t],inspect:s8e.inspect,getCallerFile:()=>{throw new fp(i8e)},getProcessArgvBin:QQe,mainFilename:Rir||process.cwd(),Parser:lde,path:{basename:U1.basename,dirname:U1.dirname,extname:U1.extname,relative:U1.relative,resolve:U1.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:o8e.readFileSync,require:()=>{throw new fp(Bir)},requireDirectory:()=>{throw new fp(i8e)},stringWidth:t=>[...t].length,y18n:n8e({directory:(0,U1.resolve)(NU,"../../../locales"),updateFiles:!1})};function SA(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function gde(t,e){e.assert.strictEqual(typeof t,"string")}function jj(t){return Object.keys(t)}function dp(t){return!!t&&!!t.then&&typeof t.then=="function"}function UT(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,o=r.shift();if(!o)throw new Error(`No command found in: ${t}`);let s={cmd:o.replace(n,""),demanded:[],optional:[]};return r.forEach((c,u)=>{let p=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&u===r.length-1&&(p=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:p}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:p})}),s}var Oir=["first","second","third","fourth","fifth","sixth"];function qi(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[UT(`cmd ${t}`),e,r]}try{let o=0,[s,c,u]=n(),p=[].slice.call(c);for(;p.length&&p[p.length-1]===void 0;)p.pop();let f=u||p.length;if(f<s.demanded.length)throw new fp(`Not enough arguments provided. Expected ${s.demanded.length} but received ${p.length}.`);let h=s.demanded.length+s.optional.length;if(f>h)throw new fp(`Too many arguments provided. Expected max ${h} but received ${f}.`);s.demanded.forEach(m=>{let y=p.shift(),x=c8e(y);m.cmd.filter(I=>I===x||I==="*").length===0&&u8e(x,m.cmd,o),o+=1}),s.optional.forEach(m=>{if(p.length===0)return;let y=p.shift(),x=c8e(y);m.cmd.filter(I=>I===x||I==="*").length===0&&u8e(x,m.cmd,o),o+=1})}catch(o){console.warn(o.stack)}}function c8e(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function u8e(t,e,r){throw new fp(`Invalid ${Oir[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var nJ=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,o=!1){if(qi("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");let c=e[s];c.applyBeforeValidation=r,c.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let s=e;s.applyBeforeValidation=r,s.global=n,s.mutates=o,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(o=>{let s=[...n[r]||[],r];return o.option?!s.includes(o.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function l8e(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function _R(t,e,r,n){return r.reduce((o,s)=>{if(s.applyBeforeValidation!==n)return o;if(s.mutates){if(s.applied)return o;s.applied=!0}if(dp(o))return o.then(c=>Promise.all([c,s(c,e)])).then(([c,u])=>Object.assign(c,u));{let c=s(o,e);return dp(c)?c.then(u=>Object.assign(o,u)):Object.assign(o,c)}},t)}function SR(t,e,r=n=>{throw n}){try{let n=Nir(t)?t():t;return dp(n)?n.then(o=>e(o)):e(n)}catch(n){return r(n)}}function Nir(t){return typeof t=="function"}function Ade(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}var Mj=/(^\*)|(^\$0)/,yde=class{constructor(e,r,n,o){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=o,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,o){o=o||{},typeof o.recurse!="boolean"&&(o.recurse=!1),Array.isArray(o.extensions)||(o.extensions=["js"]);let s=typeof o.visit=="function"?o.visit:c=>c;o.visit=(c,u,p)=>{let f=s(c,u,p);if(f){if(this.requireCache.has(u))return f;this.requireCache.add(u),this.addHandler(f)}return f},this.shim.requireDirectory({require:r,filename:n},e,o)}addHandler(e,r,n,o,s,c){let u=[],p=l8e(s);if(o=o||(()=>{}),Array.isArray(e))if(Fir(e))[e,...u]=e;else for(let f of e)this.addHandler(f);else if(jir(e)){let f=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(f=[].concat(f).concat(e.aliases)),this.addHandler(f,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(p8e(n)){this.addHandler([e].concat(u),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let f=UT(e);u=u.map(y=>UT(y).cmd);let h=!1,m=[f.cmd].concat(u).filter(y=>Mj.test(y)?(h=!0,!1):!0);m.length===0&&h&&m.push("$0"),h&&(f.cmd=m[0],u=m.slice(1),e=e.replace(Mj,f.cmd)),u.forEach(y=>{this.aliasMap[y]=f.cmd}),r!==!1&&this.usage.command(e,r,h,u,c),this.handlers[f.cmd]={original:e,description:r,handler:o,builder:n||{},middlewares:p,deprecated:c,demanded:f.demanded,optional:f.optional},h&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,o,s,c){let u=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,p=r.getInternalMethods().getContext(),f=p.commands.slice(),h=!e;e&&(p.commands.push(e),p.fullCommands.push(u.original));let m=this.applyBuilderUpdateUsageAndParse(h,u,r,n.aliases,f,o,s,c);return dp(m)?m.then(y=>this.applyMiddlewareAndGetResult(h,u,y.innerArgv,p,s,y.aliases,r)):this.applyMiddlewareAndGetResult(h,u,m.innerArgv,p,s,m.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,o,s,c,u,p){let f=r.builder,h=n;if(iJ(f)){n.getInternalMethods().getUsageInstance().freeze();let m=f(n.getInternalMethods().reset(o),p);if(dp(m))return m.then(y=>(h=d8e(y)?y:n,this.parseAndUpdateUsage(e,r,h,s,c,u)))}else Lir(f)&&(n.getInternalMethods().getUsageInstance().freeze(),h=n.getInternalMethods().reset(o),Object.keys(r.builder).forEach(m=>{h.option(m,f[m])}));return this.parseAndUpdateUsage(e,r,h,s,c,u)}parseAndUpdateUsage(e,r,n,o,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(o,r),r.description);let u=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return dp(u)?u.then(p=>({aliases:n.parsed.aliases,innerArgv:p})):{aliases:n.parsed.aliases,innerArgv:u}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=Mj.test(r.original)?r.original.replace(Mj,"").trim():r.original,o=e.filter(s=>!Mj.test(s));return o.push(n),`$0 ${o.join(" ")}`}handleValidationAndGetResult(e,r,n,o,s,c,u,p){if(!c.getInternalMethods().getHasOutput()){let f=c.getInternalMethods().runValidation(s,p,c.parsed.error,e);n=SR(n,h=>(f(h),h))}if(r.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let f=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,f,!1,!1),n=_R(n,c,u,!1),n=SR(n,h=>{let m=r.handler(h);return dp(m)?m.then(()=>h):h}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),dp(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(h=>{try{c.getInternalMethods().getUsageInstance().fail(null,h)}catch{}})}return e||(o.commands.pop(),o.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,o,s,c,u){let p={};if(s)return n;u.getInternalMethods().getHasOutput()||(p=this.populatePositionals(r,n,o,u));let f=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),h=_R(n,u,f,!0);return dp(h)?h.then(m=>this.handleValidationAndGetResult(e,r,m,o,c,u,f,p)):this.handleValidationAndGetResult(e,r,h,o,c,u,f,p)}populatePositionals(e,r,n,o){r._=r._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),u={};for(this.validation.positionalCount(s.length,r._.length);s.length;){let p=s.shift();this.populatePositional(p,r,u)}for(;c.length;){let p=c.shift();this.populatePositional(p,r,u)}return r._=n.commands.concat(r._.map(p=>""+p)),this.postProcessPositionals(r,u,this.cmdToParseOptions(e.original),o),u}populatePositional(e,r,n){let o=e.cmd[0];e.variadic?n[o]=r._.splice(0).map(String):r._.length&&(n[o]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=UT(e);return n.demanded.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c,r.demand[s]=!0}),n.optional.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c}),r}postProcessPositionals(e,r,n,o){let s=Object.assign({},o.getOptions());s.default=Object.assign(n.default,s.default);for(let f of Object.keys(n.alias))s.alias[f]=(s.alias[f]||[]).concat(n.alias[f]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(r).forEach(f=>{r[f].map(h=>{s.configuration["unknown-options-as-args"]&&(s.key[f]=!0),c.push(`--${f}`),c.push(h)})}),!c.length)return;let u=Object.assign({},s.configuration,{"populate--":!1}),p=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:u}));if(p.error)o.getInternalMethods().getUsageInstance().fail(p.error.message,p.error);else{let f=Object.keys(r);Object.keys(r).forEach(h=>{f.push(...p.aliases[h])}),Object.keys(p.argv).forEach(h=>{f.includes(h)&&(r[h]||(r[h]=p.argv[h]),!this.isInConfigs(o,h)&&!this.isDefaulted(o,h)&&Object.prototype.hasOwnProperty.call(e,h)&&Object.prototype.hasOwnProperty.call(p.argv,h)&&(Array.isArray(e[h])||Array.isArray(p.argv[h]))?e[h]=[].concat(e[h],p.argv[h]):e[h]=p.argv[h])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(o=>Object.prototype.hasOwnProperty.call(o,r))||n.some(o=>Object.prototype.hasOwnProperty.call(o,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=Mj.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(iJ(r))return r(e,!0);p8e(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=Ade(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let o of[e,r,n]){if(typeof o=="string"||o===!1)return o;SA(o,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();SA(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function f8e(t,e,r,n){return new yde(t,e,r,n)}function p8e(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function Fir(t){return t.every(e=>typeof e=="string")}function iJ(t){return typeof t=="function"}function Lir(t){return typeof t=="object"}function jir(t){return typeof t=="object"&&!Array.isArray(t)}function zT(t={},e=()=>!0){let r={};return jj(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function $T(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function Mir(t){return typeof t=="boolean"}function m8e(t,e){let r=e.y18n.__,n={},o=[];n.failFn=function(be){o.push(be)};let s=null,c=null,u=!0;n.showHelpOnFail=function(be=!0,ae){let[G,me]=typeof be=="string"?[!0,be]:[be,ae];return t.getInternalMethods().isGlobalContext()&&(c=me),s=me,u=G,n};let p=!1;n.fail=function(be,ae){let G=t.getInternalMethods().getLoggerInstance();if(o.length)for(let me=o.length-1;me>=0;--me){let Ce=o[me];if(Mir(Ce)){if(ae)throw ae;if(be)throw Error(be)}else Ce(be,ae,n)}else{if(t.getExitProcess()&&$T(!0),!p){p=!0,u&&(t.showHelp("error"),G.error()),(be||ae)&&G.error(be||ae);let me=s||c;me&&((be||ae)&&G.error(""),G.error(me))}if(ae=ae||new fp(be),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,ae);throw ae}};let f=[],h=!1;n.usage=(ne,be)=>ne===null?(h=!0,f=[],n):(h=!1,f.push([ne,be||""]),n),n.getUsage=()=>f,n.getUsageDisabled=()=>h,n.getPositionalGroupName=()=>r("Positionals:");let m=[];n.example=(ne,be)=>{m.push([ne,be||""])};let y=[];n.command=function(be,ae,G,me,Ce=!1){G&&(y=y.map(Te=>(Te[2]=!1,Te))),y.push([be,ae||"",G,me,Ce])},n.getCommands=()=>y;let x={};n.describe=function(be,ae){Array.isArray(be)?be.forEach(G=>{n.describe(G,ae)}):typeof be=="object"?Object.keys(be).forEach(G=>{n.describe(G,be[G])}):x[be]=ae},n.getDescriptions=()=>x;let A=[];n.epilog=ne=>{A.push(ne)};let I=!1,w;n.wrap=ne=>{I=!0,w=ne},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(I||(w=xe(),I=!0),w);let k="__yargsString__:";n.deferY18nLookup=ne=>k+ne,n.help=function(){if(Q)return Q;j();let be=t.customScriptName?t.$0:e.path.basename(t.$0),ae=t.getDemandedOptions(),G=t.getDemandedCommands(),me=t.getDeprecatedOptions(),Ce=t.getGroups(),Te=t.getOptions(),ze=[];ze=ze.concat(Object.keys(x)),ze=ze.concat(Object.keys(ae)),ze=ze.concat(Object.keys(G)),ze=ze.concat(Object.keys(Te.default)),ze=ze.filter(te),ze=Object.keys(ze.reduce((ft,gt)=>(gt!=="_"&&(ft[gt]=!0),ft),{}));let Tt=n.getWrap(),Dt=e.cliui({width:Tt,wrap:!!Tt});if(!h){if(f.length)f.forEach(ft=>{Dt.div({text:`${ft[0].replace(/\$0/g,be)}`}),ft[1]&&Dt.div({text:`${ft[1]}`,padding:[1,0,0,0]})}),Dt.div();else if(y.length){let ft=null;G._?ft=`${be} <${r("command")}>
|
|
971
971
|
`:ft=`${be} [${r("command")}]
|
|
972
972
|
`,Dt.div(`${ft}`)}}if(y.length>1||y.length===1&&!y[0][2]){Dt.div(r("Commands:"));let ft=t.getInternalMethods().getContext(),gt=ft.commands.length?`${ft.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(y=y.sort((jr,dr)=>jr[0].localeCompare(dr[0])));let Vt=be?`${be} `:"";y.forEach(jr=>{let dr=`${Vt}${gt}${jr[0].replace(/^\$0 ?/,"")}`;Dt.span({text:dr,padding:[0,2,0,2],width:B(y,Tt,`${be}${gt}`)+4},{text:jr[1]});let sr=[];jr[2]&&sr.push(`[${r("default")}]`),jr[3]&&jr[3].length&&sr.push(`[${r("aliases:")} ${jr[3].join(", ")}]`),jr[4]&&(typeof jr[4]=="string"?sr.push(`[${r("deprecated: %s",jr[4])}]`):sr.push(`[${r("deprecated")}]`)),sr.length?Dt.div({text:sr.join(" "),padding:[0,0,0,2],align:"right"}):Dt.div()}),Dt.div()}let ut=(Object.keys(Te.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);ze=ze.filter(ft=>!t.parsed.newAliases[ft]&&ut.every(gt=>(Te.alias[gt]||[]).indexOf(ft)===-1));let qe=r("Options:");Ce[qe]||(Ce[qe]=[]),H(ze,Te.alias,Ce,qe);let Ke=ft=>/^--/.test(sJ(ft)),rt=Object.keys(Ce).filter(ft=>Ce[ft].length>0).map(ft=>{let gt=Ce[ft].filter(te).map(Vt=>{if(ut.includes(Vt))return Vt;for(let jr=0,dr;(dr=ut[jr])!==void 0;jr++)if((Te.alias[dr]||[]).includes(Vt))return dr;return Vt});return{groupName:ft,normalizedKeys:gt}}).filter(({normalizedKeys:ft})=>ft.length>0).map(({groupName:ft,normalizedKeys:gt})=>{let Vt=gt.reduce((jr,dr)=>(jr[dr]=[dr].concat(Te.alias[dr]||[]).map(sr=>ft===n.getPositionalGroupName()?sr:(/^[0-9]$/.test(sr)?Te.boolean.includes(dr)?"-":"--":sr.length>1?"--":"-")+sr).sort((sr,O)=>Ke(sr)===Ke(O)?0:Ke(sr)?1:-1).join(", "),jr),{});return{groupName:ft,normalizedKeys:gt,switches:Vt}});if(rt.filter(({groupName:ft})=>ft!==n.getPositionalGroupName()).some(({normalizedKeys:ft,switches:gt})=>!ft.every(Vt=>Ke(gt[Vt])))&&rt.filter(({groupName:ft})=>ft!==n.getPositionalGroupName()).forEach(({normalizedKeys:ft,switches:gt})=>{ft.forEach(Vt=>{Ke(gt[Vt])&&(gt[Vt]=Qir(gt[Vt],4))})}),rt.forEach(({groupName:ft,normalizedKeys:gt,switches:Vt})=>{Dt.div(ft),gt.forEach(jr=>{let dr=Vt[jr],sr=x[jr]||"",O=null;sr.includes(k)&&(sr=r(sr.substring(k.length))),Te.boolean.includes(jr)&&(O=`[${r("boolean")}]`),Te.count.includes(jr)&&(O=`[${r("count")}]`),Te.string.includes(jr)&&(O=`[${r("string")}]`),Te.normalize.includes(jr)&&(O=`[${r("string")}]`),Te.array.includes(jr)&&(O=`[${r("array")}]`),Te.number.includes(jr)&&(O=`[${r("number")}]`);let We=Ie=>typeof Ie=="string"?`[${r("deprecated: %s",Ie)}]`:`[${r("deprecated")}]`,Xe=[jr in me?We(me[jr]):null,O,jr in ae?`[${r("required")}]`:null,Te.choices&&Te.choices[jr]?`[${r("choices:")} ${n.stringifiedValues(Te.choices[jr])}]`:null,Z(Te.default[jr],Te.defaultDescription[jr])].filter(Boolean).join(" ");Dt.span({text:sJ(dr),padding:[0,2,0,2+h8e(dr)],width:B(Vt,Tt)+4},sr);let De=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;Xe&&!De?Dt.div({text:Xe,padding:[0,0,0,2],align:"right"}):Dt.div()}),Dt.div()}),m.length&&(Dt.div(r("Examples:")),m.forEach(ft=>{ft[0]=ft[0].replace(/\$0/g,be)}),m.forEach(ft=>{ft[1]===""?Dt.div({text:ft[0],padding:[0,2,0,2]}):Dt.div({text:ft[0],padding:[0,2,0,2],width:B(m,Tt)+4},{text:ft[1]})}),Dt.div()),A.length>0){let ft=A.map(gt=>gt.replace(/\$0/g,be)).join(`
|
|
973
973
|
`);Dt.div(`${ft}
|
|
@@ -1027,7 +1027,7 @@ ${A.join(`
|
|
|
1027
1027
|
`,"f"),Gi(this,gm,pt(this,gm,"f")+e.join(" "),"f")},error:(...e)=>{this[hJ]()||console.error(...e),Gi(this,Dx,!0,"f"),pt(this,gm,"f").length&&Gi(this,gm,pt(this,gm,"f")+`
|
|
1028
1028
|
`,"f"),Gi(this,gm,pt(this,gm,"f")+e.join(" "),"f")}}}[bde](e){jj(pt(this,vs,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=pt(this,vs,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete pt(this,Oo,"f").getDescriptions()[e]}[_8e](e,r,n){pt(this,aJ,"f")[n]||(pt(this,yo,"f").process.emitWarning(e,r),pt(this,aJ,"f")[n]=!0)}[S8e](){pt(this,cJ,"f").push({options:pt(this,vs,"f"),configObjects:pt(this,vs,"f").configObjects.slice(0),exitProcess:pt(this,Gb,"f"),groups:pt(this,iS,"f"),strict:pt(this,DR,"f"),strictCommands:pt(this,PR,"f"),strictOptions:pt(this,BR,"f"),completionCommand:pt(this,Tx,"f"),output:pt(this,gm,"f"),exitError:pt(this,HT,"f"),hasOutput:pt(this,Dx,"f"),parsed:this.parsed,parseFn:pt(this,Px,"f"),parseContext:pt(this,kR,"f")}),pt(this,Oo,"f").freeze(),pt(this,$f,"f").freeze(),pt(this,md,"f").freeze(),pt(this,Vb,"f").freeze()}[C8e](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(pt(this,yo,"f").process.argv()[0])?r=pt(this,yo,"f").process.argv().slice(1,2):r=pt(this,yo,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[M8e](pt(this,CR,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),pt(this,yo,"f").getEnv("_")&&pt(this,yo,"f").getProcessArgvBin()===pt(this,yo,"f").getEnv("_")&&(e=pt(this,yo,"f").getEnv("_").replace(`${pt(this,yo,"f").path.dirname(pt(this,yo,"f").process.execPath())}/`,"")),e}[RR](){return pt(this,pJ,"f")}[I8e](){return pt(this,dJ,"f")}[Ede](){if(!pt(this,IR,"f"))return;let e=pt(this,yo,"f").getEnv("LC_ALL")||pt(this,yo,"f").getEnv("LC_MESSAGES")||pt(this,yo,"f").getEnv("LANG")||pt(this,yo,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[k8e](){return this[wde]().version||"unknown"}[T8e](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)pt(this,yo,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[wde](e){let r=e||"*";if(pt(this,qj,"f")[r])return pt(this,qj,"f")[r];let n={};try{let o=e||pt(this,yo,"f").mainFilename;!e&&pt(this,yo,"f").path.extname(o)&&(o=pt(this,yo,"f").path.dirname(o));let s=pt(this,yo,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});SA(s,void 0,pt(this,yo,"f")),n=JSON.parse(pt(this,yo,"f").readFileSync(s,"utf8"))}catch{}return pt(this,qj,"f")[r]=n||{},pt(this,qj,"f")[r]}[VT](e,r){r=[].concat(r),r.forEach(n=>{n=this[Cde](n),pt(this,vs,"f")[e].push(n)})}[Uj](e,r,n,o){this[Sde](e,r,n,o,(s,c,u)=>{pt(this,vs,"f")[s][c]=u})}[_de](e,r,n,o){this[Sde](e,r,n,o,(s,c,u)=>{pt(this,vs,"f")[s][c]=(pt(this,vs,"f")[s][c]||[]).concat(u)})}[Sde](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of jj(n))e(c,n[c]);else s(r,this[Cde](n),o)}[Cde](e){return e==="__proto__"?"___proto___":e}[Ide](e,r){return this[Uj](this[Ide].bind(this),"key",e,r),this}[kde](){var e,r,n,o,s,c,u,p,f,h,m,y;let x=pt(this,cJ,"f").pop();SA(x,void 0,pt(this,yo,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,m=this,y=this,{options:{set value(I){Gi(e,vs,I,"f")}}.value,configObjects:A,exitProcess:{set value(I){Gi(r,Gb,I,"f")}}.value,groups:{set value(I){Gi(n,iS,I,"f")}}.value,output:{set value(I){Gi(o,gm,I,"f")}}.value,exitError:{set value(I){Gi(s,HT,I,"f")}}.value,hasOutput:{set value(I){Gi(c,Dx,I,"f")}}.value,parsed:this.parsed,strict:{set value(I){Gi(u,DR,I,"f")}}.value,strictCommands:{set value(I){Gi(p,PR,I,"f")}}.value,strictOptions:{set value(I){Gi(f,BR,I,"f")}}.value,completionCommand:{set value(I){Gi(h,Tx,I,"f")}}.value,parseFn:{set value(I){Gi(m,Px,I,"f")}}.value,parseContext:{set value(I){Gi(y,kR,I,"f")}}.value}=x,pt(this,vs,"f").configObjects=A,pt(this,Oo,"f").unfreeze(),pt(this,$f,"f").unfreeze(),pt(this,md,"f").unfreeze(),pt(this,Vb,"f").unfreeze()}[D8e](e,r){return SR(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[P8e].bind(this),getContext:this[B8e].bind(this),getHasOutput:this[R8e].bind(this),getLoggerInstance:this[O8e].bind(this),getParseContext:this[N8e].bind(this),getParserConfiguration:this[RR].bind(this),getUsageConfiguration:this[I8e].bind(this),getUsageInstance:this[F8e].bind(this),getValidationInstance:this[L8e].bind(this),hasParseCallback:this[hJ].bind(this),isGlobalContext:this[j8e].bind(this),postProcess:this[OR].bind(this),reset:this[Tde].bind(this),runValidation:this[Dde].bind(this),runYargsParserAndExecuteCommands:this[LU].bind(this),setHasOutput:this[Q8e].bind(this)}}[P8e](){return pt(this,md,"f")}[B8e](){return pt(this,FU,"f")}[R8e](){return pt(this,Dx,"f")}[O8e](){return pt(this,Qj,"f")}[N8e](){return pt(this,kR,"f")||{}}[F8e](){return pt(this,Oo,"f")}[L8e](){return pt(this,$f,"f")}[hJ](){return!!pt(this,Px,"f")}[j8e](){return pt(this,uJ,"f")}[OR](e,r,n,o){return n||dp(e)||(r||(e=this[E8e](e)),(this[RR]()["parse-positional-numbers"]||this[RR]()["parse-positional-numbers"]===void 0)&&(e=this[T8e](e)),o&&(e=_R(e,this,pt(this,Vb,"f").getMiddleware(),!1))),e}[Tde](e={}){Gi(this,vs,pt(this,vs,"f")||{},"f");let r={};r.local=pt(this,vs,"f").local||[],r.configObjects=pt(this,vs,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(pt(this,TR,"f"),Object.keys(pt(this,iS,"f")).reduce((c,u)=>{let p=pt(this,iS,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),Gi(this,iS,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(pt(this,vs,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=zT(pt(this,vs,"f")[c],u=>!n[u])}),r.envPrefix=pt(this,vs,"f").envPrefix,Gi(this,vs,r,"f"),Gi(this,Oo,pt(this,Oo,"f")?pt(this,Oo,"f").reset(n):m8e(this,pt(this,yo,"f")),"f"),Gi(this,$f,pt(this,$f,"f")?pt(this,$f,"f").reset(n):b8e(this,pt(this,Oo,"f"),pt(this,yo,"f")),"f"),Gi(this,md,pt(this,md,"f")?pt(this,md,"f").reset():f8e(pt(this,Oo,"f"),pt(this,$f,"f"),pt(this,Vb,"f"),pt(this,yo,"f")),"f"),pt(this,Hb,"f")||Gi(this,Hb,y8e(this,pt(this,Oo,"f"),pt(this,md,"f"),pt(this,yo,"f")),"f"),pt(this,Vb,"f").reset(),Gi(this,Tx,null,"f"),Gi(this,gm,"","f"),Gi(this,HT,null,"f"),Gi(this,Dx,!1,"f"),this.parsed=!1,this}[M8e](e,r){return pt(this,yo,"f").path.relative(e,r)}[LU](e,r,n,o=0,s=!1){let c=!!n||s;e=e||pt(this,GT,"f"),pt(this,vs,"f").__=pt(this,yo,"f").y18n.__,pt(this,vs,"f").configuration=this[RR]();let u=!!pt(this,vs,"f").configuration["populate--"],p=Object.assign({},pt(this,vs,"f").configuration,{"populate--":!0}),f=pt(this,yo,"f").Parser.detailed(e,Object.assign({},pt(this,vs,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,pt(this,kR,"f")),m,y=f.aliases,x=!1,A=!1;Object.keys(h).forEach(I=>{I===pt(this,Wb,"f")&&h[I]?x=!0:I===pt(this,sS,"f")&&h[I]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&pt(this,Oo,"f").clearCachedHelpMessage();try{if(this[Ede](),r)return this[OR](h,u,!!n,!1);pt(this,Wb,"f")&&[pt(this,Wb,"f")].concat(y[pt(this,Wb,"f")]||[]).filter(j=>j.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),x=!0),Gi(this,uJ,!1,"f");let I=pt(this,md,"f").getCommands(),w=pt(this,Hb,"f").completionKey in h,k=x||w||s;if(h._.length){if(I.length){let B;for(let j=o||0,Q;h._[j]!==void 0;j++)if(Q=String(h._[j]),I.includes(Q)&&Q!==pt(this,Tx,"f")){let H=pt(this,md,"f").runCommand(Q,this,f,j+1,s,x||A||s);return this[OR](H,u,!!n,!1)}else if(!B&&Q!==pt(this,Tx,"f")){B=Q;break}!pt(this,md,"f").hasDefaultCommand()&&pt(this,fJ,"f")&&B&&!k&&pt(this,$f,"f").recommendCommands(B,I)}pt(this,Tx,"f")&&h._.includes(pt(this,Tx,"f"))&&!w&&(pt(this,Gb,"f")&&$T(!0),this.showCompletionScript(),this.exit(0))}if(pt(this,md,"f").hasDefaultCommand()&&!k){let B=pt(this,md,"f").runCommand(null,this,f,0,s,x||A||s);return this[OR](B,u,!!n,!1)}if(w){pt(this,Gb,"f")&&$T(!0),e=[].concat(e);let B=e.slice(e.indexOf(`--${pt(this,Hb,"f").completionKey}`)+1);return pt(this,Hb,"f").getCompletion(B,(j,Q)=>{if(j)throw new fp(j.message);(Q||[]).forEach(H=>{pt(this,Qj,"f").log(H)}),this.exit(0)}),this[OR](h,!u,!!n,!1)}if(pt(this,Dx,"f")||(x?(pt(this,Gb,"f")&&$T(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(pt(this,Gb,"f")&&$T(!0),c=!0,pt(this,Oo,"f").showVersion("log"),this.exit(0))),!c&&pt(this,vs,"f").skipValidation.length>0&&(c=Object.keys(h).some(B=>pt(this,vs,"f").skipValidation.indexOf(B)>=0&&h[B]===!0)),!c){if(f.error)throw new fp(f.error.message);if(!w){let B=this[Dde](y,{},f.error);n||(m=_R(h,this,pt(this,Vb,"f").getMiddleware(),!0)),m=this[D8e](B,m!=null?m:h),dp(m)&&!n&&(m=m.then(()=>_R(h,this,pt(this,Vb,"f").getMiddleware(),!1)))}}}catch(I){if(I instanceof fp)pt(this,Oo,"f").fail(I.message,I);else throw I}return this[OR](m!=null?m:h,u,!!n,!0)}[Dde](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new fp(n.message);pt(this,$f,"f").nonOptionCount(c),pt(this,$f,"f").requiredArguments(c,s);let u=!1;pt(this,PR,"f")&&(u=pt(this,$f,"f").unknownCommands(c)),pt(this,DR,"f")&&!u?pt(this,$f,"f").unknownArguments(c,e,r,!!o):pt(this,BR,"f")&&pt(this,$f,"f").unknownArguments(c,e,{},!1,!1),pt(this,$f,"f").limitedChoices(c),pt(this,$f,"f").implications(c),pt(this,$f,"f").conflicting(c)}}[Q8e](){Gi(this,Dx,!0,"f")}[NR](e){if(typeof e=="string")pt(this,vs,"f").key[e]=!0;else for(let r of e)pt(this,vs,"f").key[r]=!0}};function d8e(t){return!!t&&typeof t.getInternalMethods=="function"}var $ir=q8e(mde),U8e=$ir;jU();var yO=bt(require("fs")),vO=bt(require("path")),A5e=require("module"),y5e=require("url");W1();She();lc();function v5e(t){t.command("compile","Compile edgeone.config.ts to edgeone.json",()=>{},()=>Opr()).command("validate","Validate the current config file",()=>{},()=>Npr()).command("schema","Write edgeone.schema.json for IDE validation",()=>{},()=>Fpr())}async function Opr(t=process.cwd()){var u;let[e,r]=c5(t);if(!r){console.error("No config file found (edgeone.config.ts / edgeone.json / edgeone.json5)."),process.exitCode=1;return}if(e.endsWith(".json")||e.endsWith(".json5")){console.log("Config is already JSON, nothing to compile.");return}let n;try{n=u4(t)}catch(p){console.error((u=p==null?void 0:p.message)!=null?u:p),process.exitCode=1;return}let[o,s]=r5(n,["root"]);if((s||[]).forEach(p=>console.log(`error in ${p.path.join(".")}: ${p.message}`)),s!=null&&s.length){process.exitCode=1;return}let c=vO.default.join(t,"edgeone.json");await g5e(t,o),console.log(`Compiled to ${c}`)}function Npr(t=process.cwd()){var u;let[e,r]=c5(t);if(!r){console.error("No config file found (edgeone.config.ts / edgeone.json / edgeone.json5)."),process.exitCode=1;return}console.log(`
|
|
1029
1029
|
> Start validating the configuration file:`);let n;try{n=u4(t)}catch(p){console.error((u=p==null?void 0:p.message)!=null?u:p),process.exitCode=1;return}let[o,s,c]=r5(n,["root"]);(c||[]).forEach(p=>console.warn(p.message)),s!=null&&s.length?(s.forEach(p=>console.log(`error in ${p.path.join(".")}: ${p.message}`)),process.exitCode=1):console.log("none error in configuration file"),console.log(`End validating!
|
|
1030
|
-
`)}function Fpr(t=process.cwd()){let e;try{let n=(0,A5e.createRequire)(
|
|
1030
|
+
`)}function Fpr(t=process.cwd()){let e;try{let n=(0,A5e.createRequire)(__edgeoneImportMetaUrl),o=vO.default.join(vO.default.dirname((0,y5e.fileURLToPath)(__edgeoneImportMetaUrl)),"edgeone.schema.json");e=yO.default.existsSync(o)?JSON.parse(yO.default.readFileSync(o,"utf-8")):n("@edgeone/types/edgeone.schema.json")}catch(n){console.error(`Failed to load edgeone.schema.json: ${n==null?void 0:n.message}`),process.exitCode=1;return}let r=vO.default.join(t,h5e);YT(r,e),console.log(`Schema written to ${r}.`),Lpr(t)}function Lpr(t){let e=vO.default.join(t,".vscode"),r=vO.default.join(e,"settings.json"),n={fileMatch:["edgeone.json"],url:"./edgeone.schema.json"},o={};try{yO.default.existsSync(r)&&(o=JSON.parse(yO.default.readFileSync(r,"utf-8")),(typeof o!="object"||o===null||Array.isArray(o))&&(console.warn(`[schema] ${r} is not a JSON object, backing up as settings.json.bak`),yO.default.copyFileSync(r,`${r}.bak`),o={}))}catch(u){console.warn(`[schema] Failed to parse ${r}: ${u==null?void 0:u.message}; skipping VS Code association`);return}let s=Array.isArray(o["json.schemas"])?o["json.schemas"]:[],c=s.find(u=>Array.isArray(u==null?void 0:u.fileMatch)&&u.fileMatch.includes("edgeone.json"));c?c.url=n.url:s.push({...n}),o["json.schemas"]=s,yO.default.mkdirSync(e,{recursive:!0}),YT(r,o),console.log(`Registered VS Code schema association in ${r} \u2014 manual edgeone.json files will get hints without a $schema field.`)}bI();var Vtt=require("child_process"),Wtt=bt(require("net")),zve=bt(require("os")),E3=bt(require("path")),Ytt=bt(_tt());var B7=require("child_process"),lE=bt(require("fs")),Fve=bt(require("os")),wm=bt(require("path")),mX=require("module");var Nve=[];var Ctt="@deepseek-ai/dsh",Itt="TencentEdgeOne/edgeone-makers-tools",V_r="opencode",Stt="edgeone-makers-tools";function W_r(t){let e=process.platform==="win32"?"where":"which";return(0,B7.spawnSync)(e,[t],{stdio:"ignore"}).status===0}function Y_r(t){return lE.default.existsSync(wm.default.join(t,"pnpm-lock.yaml"))&&W_r("pnpm")?"pnpm":"npm"}function Lve(t){lE.default.mkdirSync(t,{recursive:!0});let e=wm.default.join(t,"package.json");lE.default.existsSync(e)||lE.default.writeFileSync(e,JSON.stringify({name:"edgeone-harness-runtime",private:!0,version:"0.0.0"},null,2))}function J_r(t){return wm.default.join(t,".npm-cache")}function jve(t,e){if(e.length===0)return Promise.resolve();let r=Y_r(t),n=J_r(t);lE.default.mkdirSync(n,{recursive:!0});let o=r==="pnpm"?["add","--prefer-offline",...e]:["install","--no-audit","--no-fund","--no-save","--prefer-offline","--loglevel=error",...e];return new Promise((s,c)=>{let u=(0,B7.spawn)(r,o,{cwd:t,stdio:"inherit",env:{...process.env,npm_config_cache:n},shell:process.platform==="win32"});u.on("error",c),u.on("exit",p=>{p===0?s():c(new Error(`Package install failed (${r} ${o.join(" ")}).`))})})}async function ktt(t){let e=process.platform==="win32"?"dsh.cmd":"dsh",r=wm.default.join(t,"node_modules",".bin",e);lE.default.existsSync(r)||await jve(t,[Ctt])}function Ttt(t,e){let r=(0,mX.createRequire)(wm.default.join(t,"package.json"));try{return r.resolve(e),!0}catch{return!1}}async function Dtt(t){let r=Nve.filter(o=>!o.local&&o.repo).filter(o=>!Ttt(t,o.pkgName));if(r.length===0)return;let n=r.map(o=>o.repo);await jve(t,n)}function K_r(t,e){let r=t.localEntry;if(!r)return"";let n=[];e&&n.push(wm.default.resolve(e,r)),n.push(wm.default.resolve(__dirname,r)),n.push(wm.default.resolve(__dirname,"..",r)),n.push(wm.default.resolve(process.cwd(),"edgeone-dist",r));for(let o of n)if(lE.default.existsSync(o))return o;return""}function Z_r(t,e){var o,s,c;let r=(0,mX.createRequire)(wm.default.join(t,"package.json")),n=[Ctt,"@deepseek-ai/dsh-base"];for(let u of n)try{let p=r.resolve(`${u}/package.json`),f=JSON.parse(lE.default.readFileSync(p,"utf8")),h=(c=(o=f.dependencies)==null?void 0:o[e])!=null?c:(s=f.peerDependencies)==null?void 0:s[e];if(h)return`${e}@${h}`}catch{}}async function Ptt(t){let r=["@deepseek-ai/dsh-llm-pi-ai","@deepseek-ai/dsh-agent-default-model"].filter(o=>!Ttt(t,o));if(r.length===0)return;let n=r.map(o=>{var s;return(s=Z_r(t,o))!=null?s:`${o}@^0.1.0-rc.6`});await jve(t,n)}function X_r(t,e){if(e.local)return K_r(e,t);let r=(0,mX.createRequire)(wm.default.join(t,"package.json"));try{return r.resolve(e.pkgName)}catch{return""}}function Btt(t){return typeof t=="boolean"||typeof t=="number"?String(t):`'${String(t).replace(/'/g,"''")}'`}function eSr(t){let e=[" config:"];for(let[r,n]of Object.entries(t))e.push(` ${r}: ${Btt(n)}`);return e}function Rtt(t,e){let r=[],n=[];for(let u of Nve){let p=X_r(t,u),f=p||`TODO_RESOLVE_ENTRY_FOR_${u.pkgName}`;p||r.push(u.pkgName);let h=[` # ${u.id} \u2014 ${u.desc}`,` - id: ${u.id}`,` name: '${f}'`];u.config&&Object.keys(u.config).length>0&&h.push(...eSr(u.config)),n.push(h.join(`
|
|
1031
1031
|
`))}let o=["# Auto-generated by `edgeone harness`. Do not edit by hand.","# Loaded via: dsh web --patch <this file>","","- insert:",n.join(`
|
|
1032
1032
|
`),""];if(e){let u=e.models&&e.models.length>0?e.models:[{id:e.modelId}],p=[];for(let h of u)p.push(` - id: '${h.id}'`,` name: '${h.name||h.id}'`," input: [text]");let f=e.baseUrl?` baseURL: ${Btt(e.baseUrl)}`:` baseURL: !!js process.env.${e.baseUrlEnv}`;o.push("# EdgeOne AI Gateway provider (OpenAI-compatible) \u2014 auto-injected, no manual key needed.","- id: llm-pi-ai"," name: '@deepseek-ai/dsh-llm-pi-ai'"," config:"," providers:"," edgeone:"," displayName: 'EdgeOne Makers Models'"," api: openai-completions",` apiKeyEnv: ${e.apiKeyEnv}`,f," models:",...p,"- id: agent-default-model"," name: '@deepseek-ai/dsh-agent-default-model'"," config:"," provider: edgeone",` model: '${e.modelId}'`,"")}let s=o.join(`
|
|
1033
1033
|
`),c=wm.default.join(t,"preset-plugins.generated.yml");return lE.default.writeFileSync(c,s),{overlayPath:c,workDir:t,unresolved:r}}async function Ott(t){var c;let e=wm.default.join(Fve.default.homedir(),".agents","skills"),r=wm.default.join(e,Stt),n=!!(t!=null&&t.force),o=(c=t==null?void 0:t.npmCache)!=null?c:wm.default.join(Fve.default.homedir(),".npm");if(lE.default.existsSync(wm.default.join(r,"SKILL.md"))&&!n)return e;try{if(await tSr(o),!lE.default.existsSync(wm.default.join(r,"SKILL.md")))throw new Error(`installed but anchor skill "${Stt}" not found at ${r}`);return e}catch(u){return console.warn(`[harness] failed to install official Makers skills "${Itt}": ${(u==null?void 0:u.message)||u}. Harness will start without them; Makers skills will be unavailable this session.`),""}}function tSr(t){let e=["skills","add",Itt,"-g","-a",V_r,"--yes"];return new Promise((r,n)=>{let o=(0,B7.spawn)("npx",e,{stdio:"inherit",shell:process.platform==="win32",env:{...process.env,npm_config_cache:t}});o.on("error",s=>n(s)),o.on("exit",s=>{s===0?r():n(new Error(`npx skills add exited with code ${s}`))})})}var Ftt=bt(require("crypto")),RS=bt(require("fs")),R7=bt(require("path")),Ltt=bt(xJ());W1();WO();Ps();b0();x0();var $x="AI_GATEWAY_API_KEY",fw="AI_GATEWAY_BASE_URL",rSr="makers-agent-default",nSr=[$x,fw];function gX(t={}){var e;return!!((e=t.skipAiGatewaySync)!=null?e:t["skip-ai-gateway-sync"])}function Mve(t){return Ltt.default.parse(t)}function pE(t){return typeof t=="string"&&t.trim()!==""}function iSr(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sSr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function oSr(t,e,r){let n=t.replace(/\r\n/g,`
|