dsh-edge 0.14.0-alpha.2 → 0.14.0
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/package.json
CHANGED
package/worker/direct/index.js
CHANGED
|
@@ -4021,7 +4021,7 @@ The web search request used endpoint ${JSON.stringify(e)}. Search endpoint confi
|
|
|
4021
4021
|
button, .button { display: inline-block; box-sizing: border-box; margin-top: 1rem; padding: .75rem 1rem; border: 0; border-radius: .6rem; background: #5a87ff; color: #071022; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
|
|
4022
4022
|
.secondary { background: #29314b; color: #edf2ff; }
|
|
4023
4023
|
.error { padding: .75rem; border-radius: .5rem; background: #461d2b; color: #ffd6df; }
|
|
4024
|
-
`}a(pee,"pageStyles");var l$={name:"dsh-edge",version:"0.14.0-alpha.2",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.2-rc.1"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.2-rc.1","@deepseek-ai/dsh-anonymous-user-id":"0.1.2-rc.1","@deepseek-ai/dsh-api-gateway":"0.1.2-rc.1","@deepseek-ai/dsh-api-remotes":"0.1.2-rc.1","@deepseek-ai/dsh-api-session-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-settings-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-workspace-controller":"0.1.2-rc.1","@deepseek-ai/dsh-attachment":"0.1.2-rc.1","@deepseek-ai/dsh-brand":"0.1.2-rc.1","@deepseek-ai/dsh-client-store":"0.1.2-rc.1","@deepseek-ai/dsh-commands":"0.1.2-rc.1","@deepseek-ai/dsh-compaction":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-basic":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.2-rc.1","@deepseek-ai/dsh-credentials":"0.1.2-rc.1","@deepseek-ai/dsh-file-reference":"0.1.2-rc.1","@deepseek-ai/dsh-fs":"0.1.2-rc.1","@deepseek-ai/dsh-goal":"0.1.2-rc.1","@deepseek-ai/dsh-goal-round-driver":"0.1.2-rc.1","@deepseek-ai/dsh-host-directory-picker":"0.1.2-rc.1","@deepseek-ai/dsh-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-jobs-local":"0.1.2-rc.1","@deepseek-ai/dsh-host-plugin-inventory":"0.1.2-rc.1","@deepseek-ai/dsh-launch-environment":"0.1.2-rc.1","@deepseek-ai/dsh-llm":"0.1.2-rc.1","@deepseek-ai/dsh-llm-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-message-feedback":"0.1.2-rc.1","@deepseek-ai/dsh-output-retention":"0.1.2-rc.1","@deepseek-ai/dsh-plan-mode":"0.1.2-rc.1","@deepseek-ai/dsh-sandbox":"0.1.2-rc.1","@deepseek-ai/dsh-scope":"0.1.2-rc.1","@deepseek-ai/dsh-schedule":"0.1.2-rc.1","@deepseek-ai/dsh-session":"0.1.2-rc.1","@deepseek-ai/dsh-session-persistence":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection-cache":"0.1.2-rc.1","@deepseek-ai/dsh-session-query":"0.1.2-rc.1","@deepseek-ai/dsh-session-reference":"0.1.2-rc.1","@deepseek-ai/dsh-session-title":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-llm":"0.1.2-rc.1","@deepseek-ai/dsh-settings":"0.1.2-rc.1","@deepseek-ai/dsh-skill":"0.1.2-rc.1","@deepseek-ai/dsh-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.2-rc.1","@deepseek-ai/dsh-tool-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-spill":"0.1.2-rc.1","@deepseek-ai/dsh-spill-policy":"0.1.2-rc.1","@deepseek-ai/dsh-storage":"0.1.2-rc.1","@deepseek-ai/dsh-storage-domain":"0.1.2-rc.1","@deepseek-ai/dsh-system-prompt":"0.1.2-rc.1","@deepseek-ai/dsh-timeout":"0.1.2-rc.1","@deepseek-ai/dsh-token-meter":"0.1.2-rc.1","@deepseek-ai/dsh-tool-ask-user":"0.1.2-rc.1","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.2-rc.1","@deepseek-ai/dsh-tool-fs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-goal":"0.1.2-rc.1","@deepseek-ai/dsh-tool-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-skill":"0.1.2-rc.1","@deepseek-ai/dsh-tool-web":"0.1.2-rc.1","@deepseek-ai/dsh-tools":"0.1.2-rc.1","@deepseek-ai/dsh-typert-protocol":"0.1.2-rc.1","@deepseek-ai/dsh-typert-registry":"0.1.2-rc.1","@deepseek-ai/dsh-user-questions":"0.1.2-rc.1","@deepseek-ai/dsh-util-values":"0.1.2-rc.1","@deepseek-ai/dsh-web":"0.1.2-rc.1","@deepseek-ai/dsh-web-fetch-http":"0.1.2-rc.1","@deepseek-ai/dsh-web-search-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-workspace":"0.1.2-rc.1","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var Ox=l$.version,fee=l$.dshEdge.upstreamVersion;function rMe(){return"dsh-edge@0.14.0-alpha.2/direct"}a(rMe,"resolveEdgeDeploymentId");function Pg(e){return{baseURL:_3(e.DEEPSEEK_BASE_URL),maxTokens:I3(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Eu(e.DEEPSEEK_MODEL),reasoningEffort:T3(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:zw(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:A3(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:Rg(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}a(Pg,"resolveEdgeDeploymentConfig");function nMe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}a(nMe,"edgeDeploymentApiKeyConfigured");function iMe(e){let t=_3(e),r=new URL(t);return r.search.length===0&&r.hash.length===0?t:(r.search="",r.hash="",r.href)}a(iMe,"projectedEdgeBaseURL");function c$(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:rMe(),apiKeyConfigured:nMe(e),baseURL:iMe(e.DEEPSEEK_BASE_URL),maxTokens:I3(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Eu(e.DEEPSEEK_MODEL),reasoningEffort:T3(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:zw(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:A3(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:Rg(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}a(c$,"resolveEdgeDeploymentProfile");function hee(e){Pg(e);let t=c$(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,version:Ox,upstreamVersion:fee,status:"ready"}}a(hee,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as pQe}from"node:async_hooks";import{WorkerEntrypoint as UEt}from"cloudflare:workers";var Sd=Ad(mee());var u$=a((e,t,r)=>{let n=e instanceof RegExp?gee(e,r):e,i=t instanceof RegExp?gee(t,r):t,s=n!==null&&i!=null&&sMe(n,i,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+i.length)}},"balanced"),gee=a((e,t)=>{let r=t.match(e);return r?r[0]:null},"maybeMatch"),sMe=a((e,t,r)=>{let n,i,s,o,l,c=r.indexOf(e),u=r.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(n=[],s=r.length;d>=0&&!l;){if(d===c)n.push(d),c=r.indexOf(e,d+1);else if(n.length===1){let p=n.pop();p!==void 0&&(l=[p,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=r.indexOf(t,d+1);d=c<u&&c>=0?c:u}n.length&&o!==void 0&&(l=[s,o])}return l},"range");var yee="\0SLASH"+Math.random()+"\0",vee="\0OPEN"+Math.random()+"\0",f$="\0CLOSE"+Math.random()+"\0",bee="\0COMMA"+Math.random()+"\0",wee="\0PERIOD"+Math.random()+"\0",oMe=new RegExp(yee,"g"),aMe=new RegExp(vee,"g"),lMe=new RegExp(f$,"g"),cMe=new RegExp(bee,"g"),uMe=new RegExp(wee,"g"),dMe=/\\\\/g,pMe=/\\{/g,fMe=/\\}/g,hMe=/\\,/g,mMe=/\\\./g,gMe=1e5,yMe=4e6;function d$(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}a(d$,"numeric");function vMe(e){return e.replace(dMe,yee).replace(pMe,vee).replace(fMe,f$).replace(hMe,bee).replace(mMe,wee)}a(vMe,"escapeBraces");function bMe(e){return e.replace(oMe,"\\").replace(aMe,"{").replace(lMe,"}").replace(cMe,",").replace(uMe,".")}a(bMe,"unescapeBraces");function xee(e){if(!e)return[""];let t=[],r=u$("{","}",e);if(!r)return e.split(",");let{pre:n,body:i,post:s}=r,o=n.split(",");o[o.length-1]+="{"+i+"}";let l=xee(s);return s.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),t.push.apply(t,o),t}a(xee,"parseCommaParts");function See(e,t={}){if(!e)return[];let{max:r=gMe,maxLength:n=yMe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),p$(vMe(e),r,n,!0).map(bMe)}a(See,"expand");function wMe(e){return"{"+e+"}"}a(wMe,"embrace");function xMe(e){return/^-?0\d/.test(e)}a(xMe,"isPadded");function SMe(e,t){return e<=t}a(SMe,"lte");function EMe(e,t){return e>=t}a(EMe,"gte");function Dg(e,t,r,n,i,s){let o=[],l=0;for(let c=0;c<e.length;c++)for(let u=0;u<r.length;u++){if(o.length>=n)return o;let d=e[c]+t+r[u];if(!(s&&!d)){if(l+d.length>i)return o;o.push(d),l+=d.length}}return o}a(Dg,"combine");function kMe(e,t,r,n){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=d$(i[0]),l=d$(i[1]),c=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(d$(i[2])),1):1,d=SMe;l<o&&(u*=-1,d=EMe);let h=i.some(xMe),f=0;for(let g=o;d(g,l)&&s.length<r;g+=u){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),h){let v=c-y.length;if(v>0){let w=new Array(v+1).join("0");g<0?y="-"+w+y.slice(1):y=w+y}}if(f+y.length>n)break;s.push(y),f+=y.length}return s}a(kMe,"expandSequence");function p$(e,t,r,n){let i=[""],s=!1,o=!0;for(;;){let l=u$("{","}",e);if(!l)return Dg(i,e,[""],t,r,s);let c=l.pre;if(/\$$/.test(c)){if(i=Dg(i,c+"{"+l.body+"}",[""],t,r,s&&!l.post.length),o=!1,!l.post.length)break;e=l.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=u||d,h=l.body.indexOf(",")>=0;if(!p&&!h){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+f$+l.post,n=!0;continue}return Dg(i,c+"{"+l.body+"}"+l.post,[""],t,r,s)}o&&(s=n&&!p,o=!1);let f;if(p)f=kMe(l.body,d,t,r);else{let g=xee(l.body);if(g.length===1&&g[0]!==void 0&&(g=p$(g[0],t,r,!1).map(wMe),g.length===1)){if(i=Dg(i,c+g[0],[""],t,r,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let w=0;y&&w<i.length;w++)i[w]&&(y=!1);f=[];let v=0;e:for(let w=0;w<g.length;w++){let b=p$(g[w],t,r,!1);for(let x=0;x<b.length;x++){let E=b[x];if(!(y&&!E)){if(f.length>=t||v+E.length>r)break e;f.push(E),v+=E.length}}}}if(i=Dg(i,c,f,t,r,s&&!l.post.length),!l.post.length)break;e=l.post}return i}a(p$,"expand_");var Mg=a(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var _Me={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Lg=a(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),TMe=a(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Eee=a(e=>e.join(""),"rangesToString"),kee=a((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=r+1,o=!1,l=!1,c=!1,u=!1,d=r,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===r+1){u=!0,s++;continue}if(y==="]"&&o&&!c){d=s+1;break}if(o=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[v,[w,b,x]]of Object.entries(_Me))if(e.startsWith(v,s)){if(p)return["$.",!1,e.length-r,!0];s+=v.length,x?i.push(w):n.push(w),l=l||b;continue e}}if(c=!1,p){y>p?n.push(Lg(p)+"-"+Lg(y)):y===p&&n.push(Lg(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){n.push(Lg(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}n.push(Lg(y)),s++}if(d<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let y=n[0].length===2?n[0].slice(-1):n[0];return[TMe(y),!1,d-r,!1]}let h="["+(u?"^":"")+Eee(n)+"]",f="["+(u?"":"^")+Eee(i)+"]";return[n.length&&i.length?"("+h+"|"+f+")":n.length?h:f,l,d-r,!0]},"parseClass");var fc=a((e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var Zi,AMe=new Set(["!","?","+","*","@"]),h$=a(e=>AMe.has(e),"isExtglobType"),_ee=a(e=>h$(e.type),"isExtglobAST"),IMe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),CMe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),RMe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Tee=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),OMe="(?!(?:^|/)\\.\\.?(?:$|/))",Nx="(?!\\.)",$Me=new Set(["[","."]),NMe=new Set(["..","."]),PMe=new Set("().*{}+?[]^$\\!"),DMe=a(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),m$="[^/]",Aee=m$+"*?",Iee=m$+"+?",MMe=0,Hu=class{static{a(this,"AST")}type;#e;#r;#n=!1;#t=[];#i;#s;#a;#d=!1;#l;#o;#c=!1;id=++MMe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,r,n={}){this.type=t,t&&(this.#r=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?n:this.#e.#l,this.#a=this.#e===this?[]:this.#e.#a,t==="!"&&!this.#e.#d&&this.#a.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#o=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let t;for(;t=this.#a.pop();){if(t.type!=="!")continue;let r=t,n=r.#i;for(;n;){for(let i=r.#s+1;!n.type&&i<n.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#i}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Zi&&r.#i===this))throw new Error("invalid part: "+r);this.#t.push(r)}}toJSON(){let t=this.type===null?this.#t.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#t.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let r=0;r<this.#s;r++){let n=t.#t[r];if(!(n instanceof Zi&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Zi(this.type,t);for(let n of this.#t)r.copyIn(n);return r}static#m(t,r,n,i,s){let o=i.maxExtglobRecursion??2,l=!1,c=!1,u=-1,d=!1;if(r.type===null){let y=n,v="";for(;y<t.length;){let w=t.charAt(y++);if(l||w==="\\"){l=!l,v+=w;continue}if(c){y===u+1?(w==="^"||w==="!")&&(d=!0):w==="]"&&!(y===u+2&&d)&&(c=!1),v+=w;continue}else if(w==="["){c=!0,u=y,d=!1,v+=w;continue}if(!i.noext&&h$(w)&&t.charAt(y)==="("&&s<=o){r.push(v),v="";let x=new Zi(w,r);y=Zi.#m(t,x,y,i,s+1),r.push(x);continue}v+=w}return r.push(v),y}let p=n+1,h=new Zi(null,r),f=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===u+1?(y==="^"||y==="!")&&(d=!0):y==="]"&&!(p===u+2&&d)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,u=p,d=!1,g+=y;continue}if(!i.noext&&h$(y)&&t.charAt(p)==="("&&(s<=o||r&&r.#y(y))){let w=r&&r.#y(y)?0:1;h.push(g),g="";let b=new Zi(y,h);h.push(b),p=Zi.#m(t,b,p,i,s+w);continue}if(y==="|"){h.push(g),g="",f.push(h),h=new Zi(null,r);continue}if(y===")")return g===""&&r.#t.length===0&&(r.#c=!0),h.push(g),g="",r.push(...f,h),p;g+=y}return r.type=null,r.#r=void 0,r.#t=[t.substring(n-1)],p}#N(t){return this.#g(t,CMe)}#g(t,r=IMe){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#y(n.type,r)}#y(t,r=RMe){return!!r.get(this.type)?.includes(t)}#p(t,r){let n=t.#t[0],i=new Zi(null,n,this.options);i.#t.push(""),n.push(i),this.#_(t,r)}#_(t,r){let n=t.#t[0];this.#t.splice(r,1,...n.#t);for(let i of n.#t)typeof i=="object"&&(i.#i=this);this.#o=void 0}#T(t){return!!Tee.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#T(r.type)}#v(t){let r=Tee.get(this.type),n=t.#t[0],i=r?.get(n.type);if(!i)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#o=void 0,this.#c=!1}static fromGlob(t,r={}){let n=new Zi(null,void 0,r);return Zi.#m(t,n,0,r,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,l),{_src:r,_glob:t})}get options(){return this.#l}toRegExpSource(t){let r=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!_ee(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(f=>typeof f!="string"),u=this.#t.map(f=>{let[g,y,v,w]=typeof f=="string"?Zi.#A(f,this.#r,c):f.toRegExpSource(t);return this.#r=this.#r||v,this.#n=this.#n||w,g}).join(""),d="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&NMe.has(this.#t[0]))){let g=$Me,y=r&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),v=!r&&!t&&g.has(u.charAt(0));d=y?OMe:v?Nx:""}let p="";return this.isEnd()&&this.#e.#d&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,fc(u),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#b(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#t=[c],u.type=null,u.#r=void 0,[c,fc(this.toString()),!1,!1]}let o=!n||t||r||!Nx?"":this.#b(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!r?Nx:"")+Iee;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Nx:"")+Aee+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;l=i+s+c}return[l,fc(s),this.#r=!!this.#r,this.#n]}#f(){if(_ee(this)){let t=0,r=!1;do{r=!0;for(let n=0;n<this.#t.length;n++){let i=this.#t[n];typeof i=="object"&&(i.#f(),this.#g(i)?(r=!1,this.#_(i,n)):this.#N(i)?(r=!1,this.#p(i,n)):this.#P(i)&&(r=!1,this.#v(i)))}}while(!r&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#o=void 0}#b(t){return this.#t.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=r.toRegExpSource(t);return this.#n=this.#n||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#A(t,r,n=!1){let i=!1,s="",o=!1,l=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(i){i=!1,s+=(PMe.has(u)?"\\":"")+u;continue}if(u==="*"){if(l)continue;l=!0,s+=n&&/^[*]+$/.test(t)?Iee:Aee,r=!0;continue}else l=!1;if(u==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[d,p,h,f]=kee(t,c);if(h){s+=d,o=o||p,c+=h-1,r=r||f;continue}}if(u==="?"){s+=m$,r=!0;continue}s+=DMe(u)}return[s,fc(t),!!r,o]}};Zi=Hu;var g$=a((e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var Zn=a((e,t,r={})=>(Mg(t),!r.nocomment&&t.charAt(0)==="#"?!1:new pf(t,r).match(e)),"minimatch"),LMe=/^\*+([^+@!?*[(]*)$/,FMe=a(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),jMe=a(e=>t=>t.endsWith(e),"starDotExtTestDot"),UMe=a(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),qMe=a(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),BMe=/^\*+\.\*+$/,zMe=a(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),WMe=a(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),HMe=/^\.\*+$/,GMe=a(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),VMe=/^\*+$/,ZMe=a(e=>e.length!==0&&!e.startsWith("."),"starTest"),KMe=a(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),JMe=/^\?+([^+@!?*[(]*)?$/,XMe=a(([e,t=""])=>{let r=Oee([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),YMe=a(([e,t=""])=>{let r=$ee([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),QMe=a(([e,t=""])=>{let r=$ee([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),eLe=a(([e,t=""])=>{let r=Oee([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),Oee=a(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),$ee=a(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),Nee=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Cee={win32:{sep:"\\"},posix:{sep:"/"}},tLe=Nee==="win32"?Cee.win32.sep:Cee.posix.sep;Zn.sep=tLe;var xi=Symbol("globstar **");Zn.GLOBSTAR=xi;var rLe="[^/]",nLe=rLe+"*?",iLe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",sLe="(?:(?!(?:\\/|^)\\.).)*?",oLe=a((e,t={})=>r=>Zn(r,e,t),"filter");Zn.filter=oLe;var Fs=a((e,t={})=>Object.assign({},e,t),"ext"),aLe=a(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Zn;let t=Zn;return Object.assign(a((n,i,s={})=>t(n,i,Fs(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{a(this,"Minimatch")}constructor(i,s={}){super(i,Fs(e,s))}static defaults(i){return t.defaults(Fs(e,i)).Minimatch}},AST:class extends t.AST{static{a(this,"AST")}constructor(i,s,o={}){super(i,s,Fs(e,o))}static fromGlob(i,s={}){return t.AST.fromGlob(i,Fs(e,s))}},unescape:a((n,i={})=>t.unescape(n,Fs(e,i)),"unescape"),escape:a((n,i={})=>t.escape(n,Fs(e,i)),"escape"),filter:a((n,i={})=>t.filter(n,Fs(e,i)),"filter"),defaults:a(n=>t.defaults(Fs(e,n)),"defaults"),makeRe:a((n,i={})=>t.makeRe(n,Fs(e,i)),"makeRe"),braceExpand:a((n,i={})=>t.braceExpand(n,Fs(e,i)),"braceExpand"),match:a((n,i,s={})=>t.match(n,i,Fs(e,s)),"match"),sep:t.sep,GLOBSTAR:xi})},"defaults");Zn.defaults=aLe;var Pee=a((e,t={})=>(Mg(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:See(e,{max:t.braceExpandMax})),"braceExpand");Zn.braceExpand=Pee;var lLe=a((e,t={})=>new pf(e,t).makeRe(),"makeRe");Zn.makeRe=lLe;var cLe=a((e,t,r={})=>{let n=new pf(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");Zn.match=cLe;var Ree=/[?*]|[+@!]\(.*?\)|\[|\]/,uLe=a(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),pf=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){Mg(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||Nee,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!Ree.test(s[2]))&&!Ree.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(u)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n of t)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let l=n[i+1],c=n[i+2],u=n[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(i,1);let d=n.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let l=n[o];o===1&&l===""&&n[0]===""||(l==="."||l==="")&&(r=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let c=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...c),n.length===0&&n.push(""),s-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);if(i){t[r]=[],t[n]=i;break}}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,s=0,o=[],l="";for(;i<t.length&&s<r.length;)if(t[i]===r[s])o.push(l==="b"?r[s]:t[i]),i++,s++;else if(n&&t[i]==="**"&&r[s]===t[i+1])o.push(t[i]),i++;else if(n&&r[s]==="**"&&t[i]===r[s+1])o.push(r[s]),s++;else if(t[i]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(l==="b")return!1;l="a",o.push(t[i]),i++,s++}else if(r[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",o.push(r[s]),i++,s++}else return!1;return t.length===r.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),p=c?3:l?0:void 0,h=d?3:u?0:void 0;if(typeof p=="number"&&typeof h=="number"){let[f,g]=[t[p],r[h]];f.toLowerCase()===g.toLowerCase()&&(r[h]=f,s=h,i=p)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(xi)?this.#e(t,r,n,i,s):this.#n(t,r,n,i,s)}#e(t,r,n,i,s){let o=r.indexOf(xi,s),l=r.lastIndexOf(xi),[c,u,d]=n?[r.slice(s,o),r.slice(o+1),[]]:[r.slice(s,o),r.slice(o+1,l),r.slice(l+1)];if(c.length){let b=t.slice(i,i+c.length);if(!this.#n(b,c,n,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(d.length){if(d.length+i>t.length)return!1;let b=t.length-d.length;if(this.#n(t,d,n,b,0))p=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(b--,!this.#n(t,d,n,b,0)))return!1;p=d.length+1}}if(!u.length){let b=!!p;for(let x=i;x<t.length-p;x++){let E=String(t[x]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return n||b}let h=[[[],0]],f=h[0],g=0,y=[0];for(let b of u)b===xi?(y.push(g),f=[[],0],h.push(f)):(f[0].push(b),g++);let v=h.length-1,w=t.length-p;for(let b of h)b[1]=w-(y[v--]+b[0].length);return!!this.#r(t,h,i,0,n,0,!!p)}#r(t,r,n,i,s,o,l){let c=r[i];if(!c){for(let p=n;p<t.length;p++){l=!0;let h=t[p];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1}return l}let[u,d]=c;for(;n<=d;){if(this.#n(t.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let f=this.#r(t,r,n+u.length,i+1,s,o+1,l);if(f!==!1)return f}let h=t[n];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1;n++}return s||null}#n(t,r,n,i,s){let o,l,c,u;for(o=i,l=s,u=t.length,c=r.length;o<u&&l<c;o++,l++){this.debug("matchOne loop");let d=r[l],p=t[o];if(this.debug(r,d,p),d===!1||d===xi)return!1;let h;if(typeof d=="string"?(h=p===d,this.debug("string match",d,p,h)):(h=d.test(p),this.debug("pattern match",d,p,h)),!h)return!1}if(o===u&&l===c)return!0;if(o===u)return n;if(l===c)return o===u-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Pee(this.pattern,this.options)}parse(t){Mg(t);let r=this.options;if(t==="**")return xi;if(t==="")return"";let n,i=null;(n=t.match(VMe))?i=r.dot?KMe:ZMe:(n=t.match(LMe))?i=(r.nocase?r.dot?qMe:UMe:r.dot?jMe:FMe)(n[1]):(n=t.match(JMe))?i=(r.nocase?r.dot?YMe:XMe:r.dot?QMe:eLe)(n):(n=t.match(BMe))?i=r.dot?WMe:zMe:(n=t.match(HMe))&&(i=GMe);let s=Hu.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?nLe:r.dot?iLe:sLe,i=new Set(r.nocase?["i"]:[]),s=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?uLe(p):p===xi?xi:p._src});u.forEach((p,h)=>{let f=u[h+1],g=u[h-1];p!==xi||g===xi||(g===void 0?f!==void 0&&f!==xi?u[h+1]="(?:\\/|"+n+"\\/)?"+f:u[h]=n:f===void 0?u[h-1]=g+"(?:\\/|\\/"+n+")?":f!==xi&&(u[h-1]=g+"(?:\\/|\\/"+n+"\\/)"+f,u[h+1]=xi))});let d=u.filter(p=>p!==xi);if(this.partial&&d.length>=1){let p=[];for(let h=1;h<=d.length;h++)p.push(d.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[o,l]=t.length>1?["(?:",")"]:["",""];s="^"+o+s+l+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let l=i.length-2;!o&&l>=0;l--)o=i[l];for(let l of s){let c=i;if(n.matchBase&&l.length===1&&(c=[o]),this.matchOne(c,l,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return Zn.defaults(t).Minimatch}};Zn.AST=Hu;Zn.Minimatch=pf;Zn.escape=g$;Zn.unescape=fc;import{gunzipSync as mje}from"node:zlib";var Fg=class{static{a(this,"Diff")}diff(t,r,n={}){let i;typeof n=="function"?(i=n,n={}):"callback"in n&&(i=n.callback);let s=this.castInput(t,n),o=this.castInput(r,n),l=this.removeEmpty(this.tokenize(s,n)),c=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(l,c,n,i)}diffWithOptionsObj(t,r,n,i){var s;let o=a(b=>{if(b=this.postProcess(b,n),i){setTimeout(function(){i(b)},0);return}else return b},"done"),l=r.length,c=t.length,u=1,d=l+c;n.maxEditLength!=null&&(d=Math.min(d,n.maxEditLength));let p=(s=n.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+p,f=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(f[0],r,t,0,n);if(f[0].oldPos+1>=c&&g+1>=l)return o(this.buildValues(f[0].lastComponent,r,t));let y=-1/0,v=1/0,w=a(()=>{for(let b=Math.max(y,-u);b<=Math.min(v,u);b+=2){let x,E=f[b-1],S=f[b+1];E&&(f[b-1]=void 0);let k=!1;if(S){let C=S.oldPos-b;k=S&&0<=C&&C<l}let _=E&&E.oldPos+1<c;if(!k&&!_){f[b]=void 0;continue}if(!_||k&&E.oldPos<S.oldPos?x=this.addToPath(S,!0,!1,0,n):x=this.addToPath(E,!1,!0,1,n),g=this.extractCommon(x,r,t,b,n),x.oldPos+1>=c&&g+1>=l)return o(this.buildValues(x.lastComponent,r,t))||!0;f[b]=x,x.oldPos+1>=c&&(v=Math.min(v,b-1)),g+1>=l&&(y=Math.max(y,b+1))}u++},"execEditLength");if(i)a(function b(){setTimeout(function(){if(u>d||Date.now()>h)return i(void 0);w()||b()},0)},"exec")();else for(;u<=d&&Date.now()<=h;){let b=w();if(b)return b}}addToPath(t,r,n,i,s){let o=t.lastComponent;return o&&!s.oneChangePerToken&&o.added===r&&o.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:o.count+1,added:r,removed:n,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:o}}}extractCommon(t,r,n,i,s){let o=r.length,l=n.length,c=t.oldPos,u=c-i,d=0;for(;u+1<o&&c+1<l&&this.equals(n[c+1],r[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,r,n){return n.comparator?n.comparator(t,r):t===r||!!n.ignoreCase&&t.toLowerCase()===r.toLowerCase()}removeEmpty(t){let r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r}castInput(t,r){return t}tokenize(t,r){return Array.from(t)}join(t){return t.join("")}postProcess(t,r){return t}get useLongestToken(){return!1}buildValues(t,r,n){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let o=i.length,l=0,c=0,u=0;for(;l<o;l++){let d=i[l];if(d.removed)d.value=this.join(n.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let p=r.slice(c,c+d.count);p=p.map(function(h,f){let g=n[u+f];return g.length>h.length?g:h}),d.value=this.join(p)}else d.value=this.join(r.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return i}};var y$=class extends Fg{static{a(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=pLe}equals(t,r,n){return n.ignoreWhitespace?((!n.newlineIsToken||!t.includes(`
|
|
4024
|
+
`}a(pee,"pageStyles");var l$={name:"dsh-edge",version:"0.14.0",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.2-rc.1"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.2-rc.1","@deepseek-ai/dsh-anonymous-user-id":"0.1.2-rc.1","@deepseek-ai/dsh-api-gateway":"0.1.2-rc.1","@deepseek-ai/dsh-api-remotes":"0.1.2-rc.1","@deepseek-ai/dsh-api-session-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-settings-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-workspace-controller":"0.1.2-rc.1","@deepseek-ai/dsh-attachment":"0.1.2-rc.1","@deepseek-ai/dsh-brand":"0.1.2-rc.1","@deepseek-ai/dsh-client-store":"0.1.2-rc.1","@deepseek-ai/dsh-commands":"0.1.2-rc.1","@deepseek-ai/dsh-compaction":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-basic":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.2-rc.1","@deepseek-ai/dsh-credentials":"0.1.2-rc.1","@deepseek-ai/dsh-file-reference":"0.1.2-rc.1","@deepseek-ai/dsh-fs":"0.1.2-rc.1","@deepseek-ai/dsh-goal":"0.1.2-rc.1","@deepseek-ai/dsh-goal-round-driver":"0.1.2-rc.1","@deepseek-ai/dsh-host-directory-picker":"0.1.2-rc.1","@deepseek-ai/dsh-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-jobs-local":"0.1.2-rc.1","@deepseek-ai/dsh-host-plugin-inventory":"0.1.2-rc.1","@deepseek-ai/dsh-launch-environment":"0.1.2-rc.1","@deepseek-ai/dsh-llm":"0.1.2-rc.1","@deepseek-ai/dsh-llm-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-message-feedback":"0.1.2-rc.1","@deepseek-ai/dsh-output-retention":"0.1.2-rc.1","@deepseek-ai/dsh-plan-mode":"0.1.2-rc.1","@deepseek-ai/dsh-sandbox":"0.1.2-rc.1","@deepseek-ai/dsh-scope":"0.1.2-rc.1","@deepseek-ai/dsh-schedule":"0.1.2-rc.1","@deepseek-ai/dsh-session":"0.1.2-rc.1","@deepseek-ai/dsh-session-persistence":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection-cache":"0.1.2-rc.1","@deepseek-ai/dsh-session-query":"0.1.2-rc.1","@deepseek-ai/dsh-session-reference":"0.1.2-rc.1","@deepseek-ai/dsh-session-title":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-llm":"0.1.2-rc.1","@deepseek-ai/dsh-settings":"0.1.2-rc.1","@deepseek-ai/dsh-skill":"0.1.2-rc.1","@deepseek-ai/dsh-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.2-rc.1","@deepseek-ai/dsh-tool-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-spill":"0.1.2-rc.1","@deepseek-ai/dsh-spill-policy":"0.1.2-rc.1","@deepseek-ai/dsh-storage":"0.1.2-rc.1","@deepseek-ai/dsh-storage-domain":"0.1.2-rc.1","@deepseek-ai/dsh-system-prompt":"0.1.2-rc.1","@deepseek-ai/dsh-timeout":"0.1.2-rc.1","@deepseek-ai/dsh-token-meter":"0.1.2-rc.1","@deepseek-ai/dsh-tool-ask-user":"0.1.2-rc.1","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.2-rc.1","@deepseek-ai/dsh-tool-fs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-goal":"0.1.2-rc.1","@deepseek-ai/dsh-tool-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-skill":"0.1.2-rc.1","@deepseek-ai/dsh-tool-web":"0.1.2-rc.1","@deepseek-ai/dsh-tools":"0.1.2-rc.1","@deepseek-ai/dsh-typert-protocol":"0.1.2-rc.1","@deepseek-ai/dsh-typert-registry":"0.1.2-rc.1","@deepseek-ai/dsh-user-questions":"0.1.2-rc.1","@deepseek-ai/dsh-util-values":"0.1.2-rc.1","@deepseek-ai/dsh-web":"0.1.2-rc.1","@deepseek-ai/dsh-web-fetch-http":"0.1.2-rc.1","@deepseek-ai/dsh-web-search-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-workspace":"0.1.2-rc.1","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var Ox=l$.version,fee=l$.dshEdge.upstreamVersion;function rMe(){return"dsh-edge@0.14.0/direct"}a(rMe,"resolveEdgeDeploymentId");function Pg(e){return{baseURL:_3(e.DEEPSEEK_BASE_URL),maxTokens:I3(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Eu(e.DEEPSEEK_MODEL),reasoningEffort:T3(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:zw(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:A3(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:Rg(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}a(Pg,"resolveEdgeDeploymentConfig");function nMe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}a(nMe,"edgeDeploymentApiKeyConfigured");function iMe(e){let t=_3(e),r=new URL(t);return r.search.length===0&&r.hash.length===0?t:(r.search="",r.hash="",r.href)}a(iMe,"projectedEdgeBaseURL");function c$(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:rMe(),apiKeyConfigured:nMe(e),baseURL:iMe(e.DEEPSEEK_BASE_URL),maxTokens:I3(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Eu(e.DEEPSEEK_MODEL),reasoningEffort:T3(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:zw(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:A3(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:Rg(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}a(c$,"resolveEdgeDeploymentProfile");function hee(e){Pg(e);let t=c$(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,version:Ox,upstreamVersion:fee,status:"ready"}}a(hee,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as pQe}from"node:async_hooks";import{WorkerEntrypoint as UEt}from"cloudflare:workers";var Sd=Ad(mee());var u$=a((e,t,r)=>{let n=e instanceof RegExp?gee(e,r):e,i=t instanceof RegExp?gee(t,r):t,s=n!==null&&i!=null&&sMe(n,i,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+i.length)}},"balanced"),gee=a((e,t)=>{let r=t.match(e);return r?r[0]:null},"maybeMatch"),sMe=a((e,t,r)=>{let n,i,s,o,l,c=r.indexOf(e),u=r.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(n=[],s=r.length;d>=0&&!l;){if(d===c)n.push(d),c=r.indexOf(e,d+1);else if(n.length===1){let p=n.pop();p!==void 0&&(l=[p,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=r.indexOf(t,d+1);d=c<u&&c>=0?c:u}n.length&&o!==void 0&&(l=[s,o])}return l},"range");var yee="\0SLASH"+Math.random()+"\0",vee="\0OPEN"+Math.random()+"\0",f$="\0CLOSE"+Math.random()+"\0",bee="\0COMMA"+Math.random()+"\0",wee="\0PERIOD"+Math.random()+"\0",oMe=new RegExp(yee,"g"),aMe=new RegExp(vee,"g"),lMe=new RegExp(f$,"g"),cMe=new RegExp(bee,"g"),uMe=new RegExp(wee,"g"),dMe=/\\\\/g,pMe=/\\{/g,fMe=/\\}/g,hMe=/\\,/g,mMe=/\\\./g,gMe=1e5,yMe=4e6;function d$(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}a(d$,"numeric");function vMe(e){return e.replace(dMe,yee).replace(pMe,vee).replace(fMe,f$).replace(hMe,bee).replace(mMe,wee)}a(vMe,"escapeBraces");function bMe(e){return e.replace(oMe,"\\").replace(aMe,"{").replace(lMe,"}").replace(cMe,",").replace(uMe,".")}a(bMe,"unescapeBraces");function xee(e){if(!e)return[""];let t=[],r=u$("{","}",e);if(!r)return e.split(",");let{pre:n,body:i,post:s}=r,o=n.split(",");o[o.length-1]+="{"+i+"}";let l=xee(s);return s.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),t.push.apply(t,o),t}a(xee,"parseCommaParts");function See(e,t={}){if(!e)return[];let{max:r=gMe,maxLength:n=yMe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),p$(vMe(e),r,n,!0).map(bMe)}a(See,"expand");function wMe(e){return"{"+e+"}"}a(wMe,"embrace");function xMe(e){return/^-?0\d/.test(e)}a(xMe,"isPadded");function SMe(e,t){return e<=t}a(SMe,"lte");function EMe(e,t){return e>=t}a(EMe,"gte");function Dg(e,t,r,n,i,s){let o=[],l=0;for(let c=0;c<e.length;c++)for(let u=0;u<r.length;u++){if(o.length>=n)return o;let d=e[c]+t+r[u];if(!(s&&!d)){if(l+d.length>i)return o;o.push(d),l+=d.length}}return o}a(Dg,"combine");function kMe(e,t,r,n){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=d$(i[0]),l=d$(i[1]),c=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(d$(i[2])),1):1,d=SMe;l<o&&(u*=-1,d=EMe);let h=i.some(xMe),f=0;for(let g=o;d(g,l)&&s.length<r;g+=u){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),h){let v=c-y.length;if(v>0){let w=new Array(v+1).join("0");g<0?y="-"+w+y.slice(1):y=w+y}}if(f+y.length>n)break;s.push(y),f+=y.length}return s}a(kMe,"expandSequence");function p$(e,t,r,n){let i=[""],s=!1,o=!0;for(;;){let l=u$("{","}",e);if(!l)return Dg(i,e,[""],t,r,s);let c=l.pre;if(/\$$/.test(c)){if(i=Dg(i,c+"{"+l.body+"}",[""],t,r,s&&!l.post.length),o=!1,!l.post.length)break;e=l.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=u||d,h=l.body.indexOf(",")>=0;if(!p&&!h){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+f$+l.post,n=!0;continue}return Dg(i,c+"{"+l.body+"}"+l.post,[""],t,r,s)}o&&(s=n&&!p,o=!1);let f;if(p)f=kMe(l.body,d,t,r);else{let g=xee(l.body);if(g.length===1&&g[0]!==void 0&&(g=p$(g[0],t,r,!1).map(wMe),g.length===1)){if(i=Dg(i,c+g[0],[""],t,r,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let w=0;y&&w<i.length;w++)i[w]&&(y=!1);f=[];let v=0;e:for(let w=0;w<g.length;w++){let b=p$(g[w],t,r,!1);for(let x=0;x<b.length;x++){let E=b[x];if(!(y&&!E)){if(f.length>=t||v+E.length>r)break e;f.push(E),v+=E.length}}}}if(i=Dg(i,c,f,t,r,s&&!l.post.length),!l.post.length)break;e=l.post}return i}a(p$,"expand_");var Mg=a(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var _Me={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Lg=a(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),TMe=a(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Eee=a(e=>e.join(""),"rangesToString"),kee=a((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=r+1,o=!1,l=!1,c=!1,u=!1,d=r,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===r+1){u=!0,s++;continue}if(y==="]"&&o&&!c){d=s+1;break}if(o=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[v,[w,b,x]]of Object.entries(_Me))if(e.startsWith(v,s)){if(p)return["$.",!1,e.length-r,!0];s+=v.length,x?i.push(w):n.push(w),l=l||b;continue e}}if(c=!1,p){y>p?n.push(Lg(p)+"-"+Lg(y)):y===p&&n.push(Lg(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){n.push(Lg(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}n.push(Lg(y)),s++}if(d<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let y=n[0].length===2?n[0].slice(-1):n[0];return[TMe(y),!1,d-r,!1]}let h="["+(u?"^":"")+Eee(n)+"]",f="["+(u?"":"^")+Eee(i)+"]";return[n.length&&i.length?"("+h+"|"+f+")":n.length?h:f,l,d-r,!0]},"parseClass");var fc=a((e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var Zi,AMe=new Set(["!","?","+","*","@"]),h$=a(e=>AMe.has(e),"isExtglobType"),_ee=a(e=>h$(e.type),"isExtglobAST"),IMe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),CMe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),RMe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Tee=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),OMe="(?!(?:^|/)\\.\\.?(?:$|/))",Nx="(?!\\.)",$Me=new Set(["[","."]),NMe=new Set(["..","."]),PMe=new Set("().*{}+?[]^$\\!"),DMe=a(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),m$="[^/]",Aee=m$+"*?",Iee=m$+"+?",MMe=0,Hu=class{static{a(this,"AST")}type;#e;#r;#n=!1;#t=[];#i;#s;#a;#d=!1;#l;#o;#c=!1;id=++MMe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,r,n={}){this.type=t,t&&(this.#r=!0),this.#i=r,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?n:this.#e.#l,this.#a=this.#e===this?[]:this.#e.#a,t==="!"&&!this.#e.#d&&this.#a.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#o=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let t;for(;t=this.#a.pop();){if(t.type!=="!")continue;let r=t,n=r.#i;for(;n;){for(let i=r.#s+1;!n.type&&i<n.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#i}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Zi&&r.#i===this))throw new Error("invalid part: "+r);this.#t.push(r)}}toJSON(){let t=this.type===null?this.#t.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#t.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let r=0;r<this.#s;r++){let n=t.#t[r];if(!(n instanceof Zi&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Zi(this.type,t);for(let n of this.#t)r.copyIn(n);return r}static#m(t,r,n,i,s){let o=i.maxExtglobRecursion??2,l=!1,c=!1,u=-1,d=!1;if(r.type===null){let y=n,v="";for(;y<t.length;){let w=t.charAt(y++);if(l||w==="\\"){l=!l,v+=w;continue}if(c){y===u+1?(w==="^"||w==="!")&&(d=!0):w==="]"&&!(y===u+2&&d)&&(c=!1),v+=w;continue}else if(w==="["){c=!0,u=y,d=!1,v+=w;continue}if(!i.noext&&h$(w)&&t.charAt(y)==="("&&s<=o){r.push(v),v="";let x=new Zi(w,r);y=Zi.#m(t,x,y,i,s+1),r.push(x);continue}v+=w}return r.push(v),y}let p=n+1,h=new Zi(null,r),f=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===u+1?(y==="^"||y==="!")&&(d=!0):y==="]"&&!(p===u+2&&d)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,u=p,d=!1,g+=y;continue}if(!i.noext&&h$(y)&&t.charAt(p)==="("&&(s<=o||r&&r.#y(y))){let w=r&&r.#y(y)?0:1;h.push(g),g="";let b=new Zi(y,h);h.push(b),p=Zi.#m(t,b,p,i,s+w);continue}if(y==="|"){h.push(g),g="",f.push(h),h=new Zi(null,r);continue}if(y===")")return g===""&&r.#t.length===0&&(r.#c=!0),h.push(g),g="",r.push(...f,h),p;g+=y}return r.type=null,r.#r=void 0,r.#t=[t.substring(n-1)],p}#N(t){return this.#g(t,CMe)}#g(t,r=IMe){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#y(n.type,r)}#y(t,r=RMe){return!!r.get(this.type)?.includes(t)}#p(t,r){let n=t.#t[0],i=new Zi(null,n,this.options);i.#t.push(""),n.push(i),this.#_(t,r)}#_(t,r){let n=t.#t[0];this.#t.splice(r,1,...n.#t);for(let i of n.#t)typeof i=="object"&&(i.#i=this);this.#o=void 0}#T(t){return!!Tee.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#T(r.type)}#v(t){let r=Tee.get(this.type),n=t.#t[0],i=r?.get(n.type);if(!i)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#o=void 0,this.#c=!1}static fromGlob(t,r={}){let n=new Zi(null,void 0,r);return Zi.#m(t,n,0,r,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,l),{_src:r,_glob:t})}get options(){return this.#l}toRegExpSource(t){let r=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!_ee(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(f=>typeof f!="string"),u=this.#t.map(f=>{let[g,y,v,w]=typeof f=="string"?Zi.#A(f,this.#r,c):f.toRegExpSource(t);return this.#r=this.#r||v,this.#n=this.#n||w,g}).join(""),d="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&NMe.has(this.#t[0]))){let g=$Me,y=r&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),v=!r&&!t&&g.has(u.charAt(0));d=y?OMe:v?Nx:""}let p="";return this.isEnd()&&this.#e.#d&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,fc(u),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#b(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#t=[c],u.type=null,u.#r=void 0,[c,fc(this.toString()),!1,!1]}let o=!n||t||r||!Nx?"":this.#b(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!r?Nx:"")+Iee;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Nx:"")+Aee+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;l=i+s+c}return[l,fc(s),this.#r=!!this.#r,this.#n]}#f(){if(_ee(this)){let t=0,r=!1;do{r=!0;for(let n=0;n<this.#t.length;n++){let i=this.#t[n];typeof i=="object"&&(i.#f(),this.#g(i)?(r=!1,this.#_(i,n)):this.#N(i)?(r=!1,this.#p(i,n)):this.#P(i)&&(r=!1,this.#v(i)))}}while(!r&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#o=void 0}#b(t){return this.#t.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=r.toRegExpSource(t);return this.#n=this.#n||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#A(t,r,n=!1){let i=!1,s="",o=!1,l=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(i){i=!1,s+=(PMe.has(u)?"\\":"")+u;continue}if(u==="*"){if(l)continue;l=!0,s+=n&&/^[*]+$/.test(t)?Iee:Aee,r=!0;continue}else l=!1;if(u==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[d,p,h,f]=kee(t,c);if(h){s+=d,o=o||p,c+=h-1,r=r||f;continue}}if(u==="?"){s+=m$,r=!0;continue}s+=DMe(u)}return[s,fc(t),!!r,o]}};Zi=Hu;var g$=a((e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var Zn=a((e,t,r={})=>(Mg(t),!r.nocomment&&t.charAt(0)==="#"?!1:new pf(t,r).match(e)),"minimatch"),LMe=/^\*+([^+@!?*[(]*)$/,FMe=a(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),jMe=a(e=>t=>t.endsWith(e),"starDotExtTestDot"),UMe=a(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),qMe=a(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),BMe=/^\*+\.\*+$/,zMe=a(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),WMe=a(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),HMe=/^\.\*+$/,GMe=a(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),VMe=/^\*+$/,ZMe=a(e=>e.length!==0&&!e.startsWith("."),"starTest"),KMe=a(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),JMe=/^\?+([^+@!?*[(]*)?$/,XMe=a(([e,t=""])=>{let r=Oee([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),YMe=a(([e,t=""])=>{let r=$ee([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),QMe=a(([e,t=""])=>{let r=$ee([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),eLe=a(([e,t=""])=>{let r=Oee([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),Oee=a(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),$ee=a(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),Nee=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Cee={win32:{sep:"\\"},posix:{sep:"/"}},tLe=Nee==="win32"?Cee.win32.sep:Cee.posix.sep;Zn.sep=tLe;var xi=Symbol("globstar **");Zn.GLOBSTAR=xi;var rLe="[^/]",nLe=rLe+"*?",iLe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",sLe="(?:(?!(?:\\/|^)\\.).)*?",oLe=a((e,t={})=>r=>Zn(r,e,t),"filter");Zn.filter=oLe;var Fs=a((e,t={})=>Object.assign({},e,t),"ext"),aLe=a(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Zn;let t=Zn;return Object.assign(a((n,i,s={})=>t(n,i,Fs(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{a(this,"Minimatch")}constructor(i,s={}){super(i,Fs(e,s))}static defaults(i){return t.defaults(Fs(e,i)).Minimatch}},AST:class extends t.AST{static{a(this,"AST")}constructor(i,s,o={}){super(i,s,Fs(e,o))}static fromGlob(i,s={}){return t.AST.fromGlob(i,Fs(e,s))}},unescape:a((n,i={})=>t.unescape(n,Fs(e,i)),"unescape"),escape:a((n,i={})=>t.escape(n,Fs(e,i)),"escape"),filter:a((n,i={})=>t.filter(n,Fs(e,i)),"filter"),defaults:a(n=>t.defaults(Fs(e,n)),"defaults"),makeRe:a((n,i={})=>t.makeRe(n,Fs(e,i)),"makeRe"),braceExpand:a((n,i={})=>t.braceExpand(n,Fs(e,i)),"braceExpand"),match:a((n,i,s={})=>t.match(n,i,Fs(e,s)),"match"),sep:t.sep,GLOBSTAR:xi})},"defaults");Zn.defaults=aLe;var Pee=a((e,t={})=>(Mg(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:See(e,{max:t.braceExpandMax})),"braceExpand");Zn.braceExpand=Pee;var lLe=a((e,t={})=>new pf(e,t).makeRe(),"makeRe");Zn.makeRe=lLe;var cLe=a((e,t,r={})=>{let n=new pf(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");Zn.match=cLe;var Ree=/[?*]|[+@!]\(.*?\)|\[|\]/,uLe=a(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),pf=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){Mg(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||Nee,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!Ree.test(s[2]))&&!Ree.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(u)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n of t)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let l=n[i+1],c=n[i+2],u=n[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(i,1);let d=n.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let l=n[o];o===1&&l===""&&n[0]===""||(l==="."||l==="")&&(r=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let c=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...c),n.length===0&&n.push(""),s-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);if(i){t[r]=[],t[n]=i;break}}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,s=0,o=[],l="";for(;i<t.length&&s<r.length;)if(t[i]===r[s])o.push(l==="b"?r[s]:t[i]),i++,s++;else if(n&&t[i]==="**"&&r[s]===t[i+1])o.push(t[i]),i++;else if(n&&r[s]==="**"&&t[i]===r[s+1])o.push(r[s]),s++;else if(t[i]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(l==="b")return!1;l="a",o.push(t[i]),i++,s++}else if(r[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",o.push(r[s]),i++,s++}else return!1;return t.length===r.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),p=c?3:l?0:void 0,h=d?3:u?0:void 0;if(typeof p=="number"&&typeof h=="number"){let[f,g]=[t[p],r[h]];f.toLowerCase()===g.toLowerCase()&&(r[h]=f,s=h,i=p)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(xi)?this.#e(t,r,n,i,s):this.#n(t,r,n,i,s)}#e(t,r,n,i,s){let o=r.indexOf(xi,s),l=r.lastIndexOf(xi),[c,u,d]=n?[r.slice(s,o),r.slice(o+1),[]]:[r.slice(s,o),r.slice(o+1,l),r.slice(l+1)];if(c.length){let b=t.slice(i,i+c.length);if(!this.#n(b,c,n,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(d.length){if(d.length+i>t.length)return!1;let b=t.length-d.length;if(this.#n(t,d,n,b,0))p=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(b--,!this.#n(t,d,n,b,0)))return!1;p=d.length+1}}if(!u.length){let b=!!p;for(let x=i;x<t.length-p;x++){let E=String(t[x]);if(b=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return n||b}let h=[[[],0]],f=h[0],g=0,y=[0];for(let b of u)b===xi?(y.push(g),f=[[],0],h.push(f)):(f[0].push(b),g++);let v=h.length-1,w=t.length-p;for(let b of h)b[1]=w-(y[v--]+b[0].length);return!!this.#r(t,h,i,0,n,0,!!p)}#r(t,r,n,i,s,o,l){let c=r[i];if(!c){for(let p=n;p<t.length;p++){l=!0;let h=t[p];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1}return l}let[u,d]=c;for(;n<=d;){if(this.#n(t.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let f=this.#r(t,r,n+u.length,i+1,s,o+1,l);if(f!==!1)return f}let h=t[n];if(h==="."||h===".."||!this.options.dot&&h.startsWith("."))return!1;n++}return s||null}#n(t,r,n,i,s){let o,l,c,u;for(o=i,l=s,u=t.length,c=r.length;o<u&&l<c;o++,l++){this.debug("matchOne loop");let d=r[l],p=t[o];if(this.debug(r,d,p),d===!1||d===xi)return!1;let h;if(typeof d=="string"?(h=p===d,this.debug("string match",d,p,h)):(h=d.test(p),this.debug("pattern match",d,p,h)),!h)return!1}if(o===u&&l===c)return!0;if(o===u)return n;if(l===c)return o===u-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Pee(this.pattern,this.options)}parse(t){Mg(t);let r=this.options;if(t==="**")return xi;if(t==="")return"";let n,i=null;(n=t.match(VMe))?i=r.dot?KMe:ZMe:(n=t.match(LMe))?i=(r.nocase?r.dot?qMe:UMe:r.dot?jMe:FMe)(n[1]):(n=t.match(JMe))?i=(r.nocase?r.dot?YMe:XMe:r.dot?QMe:eLe)(n):(n=t.match(BMe))?i=r.dot?WMe:zMe:(n=t.match(HMe))&&(i=GMe);let s=Hu.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?nLe:r.dot?iLe:sLe,i=new Set(r.nocase?["i"]:[]),s=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let h of p.flags.split(""))i.add(h);return typeof p=="string"?uLe(p):p===xi?xi:p._src});u.forEach((p,h)=>{let f=u[h+1],g=u[h-1];p!==xi||g===xi||(g===void 0?f!==void 0&&f!==xi?u[h+1]="(?:\\/|"+n+"\\/)?"+f:u[h]=n:f===void 0?u[h-1]=g+"(?:\\/|\\/"+n+")?":f!==xi&&(u[h-1]=g+"(?:\\/|\\/"+n+"\\/)"+f,u[h+1]=xi))});let d=u.filter(p=>p!==xi);if(this.partial&&d.length>=1){let p=[];for(let h=1;h<=d.length;h++)p.push(d.slice(0,h).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[o,l]=t.length>1?["(?:",")"]:["",""];s="^"+o+s+l+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let l=i.length-2;!o&&l>=0;l--)o=i[l];for(let l of s){let c=i;if(n.matchBase&&l.length===1&&(c=[o]),this.matchOne(c,l,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return Zn.defaults(t).Minimatch}};Zn.AST=Hu;Zn.Minimatch=pf;Zn.escape=g$;Zn.unescape=fc;import{gunzipSync as mje}from"node:zlib";var Fg=class{static{a(this,"Diff")}diff(t,r,n={}){let i;typeof n=="function"?(i=n,n={}):"callback"in n&&(i=n.callback);let s=this.castInput(t,n),o=this.castInput(r,n),l=this.removeEmpty(this.tokenize(s,n)),c=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(l,c,n,i)}diffWithOptionsObj(t,r,n,i){var s;let o=a(b=>{if(b=this.postProcess(b,n),i){setTimeout(function(){i(b)},0);return}else return b},"done"),l=r.length,c=t.length,u=1,d=l+c;n.maxEditLength!=null&&(d=Math.min(d,n.maxEditLength));let p=(s=n.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+p,f=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(f[0],r,t,0,n);if(f[0].oldPos+1>=c&&g+1>=l)return o(this.buildValues(f[0].lastComponent,r,t));let y=-1/0,v=1/0,w=a(()=>{for(let b=Math.max(y,-u);b<=Math.min(v,u);b+=2){let x,E=f[b-1],S=f[b+1];E&&(f[b-1]=void 0);let k=!1;if(S){let C=S.oldPos-b;k=S&&0<=C&&C<l}let _=E&&E.oldPos+1<c;if(!k&&!_){f[b]=void 0;continue}if(!_||k&&E.oldPos<S.oldPos?x=this.addToPath(S,!0,!1,0,n):x=this.addToPath(E,!1,!0,1,n),g=this.extractCommon(x,r,t,b,n),x.oldPos+1>=c&&g+1>=l)return o(this.buildValues(x.lastComponent,r,t))||!0;f[b]=x,x.oldPos+1>=c&&(v=Math.min(v,b-1)),g+1>=l&&(y=Math.max(y,b+1))}u++},"execEditLength");if(i)a(function b(){setTimeout(function(){if(u>d||Date.now()>h)return i(void 0);w()||b()},0)},"exec")();else for(;u<=d&&Date.now()<=h;){let b=w();if(b)return b}}addToPath(t,r,n,i,s){let o=t.lastComponent;return o&&!s.oneChangePerToken&&o.added===r&&o.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:o.count+1,added:r,removed:n,previousComponent:o.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:o}}}extractCommon(t,r,n,i,s){let o=r.length,l=n.length,c=t.oldPos,u=c-i,d=0;for(;u+1<o&&c+1<l&&this.equals(n[c+1],r[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,r,n){return n.comparator?n.comparator(t,r):t===r||!!n.ignoreCase&&t.toLowerCase()===r.toLowerCase()}removeEmpty(t){let r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r}castInput(t,r){return t}tokenize(t,r){return Array.from(t)}join(t){return t.join("")}postProcess(t,r){return t}get useLongestToken(){return!1}buildValues(t,r,n){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let o=i.length,l=0,c=0,u=0;for(;l<o;l++){let d=i[l];if(d.removed)d.value=this.join(n.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let p=r.slice(c,c+d.count);p=p.map(function(h,f){let g=n[u+f];return g.length>h.length?g:h}),d.value=this.join(p)}else d.value=this.join(r.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return i}};var y$=class extends Fg{static{a(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=pLe}equals(t,r,n){return n.ignoreWhitespace?((!n.newlineIsToken||!t.includes(`
|
|
4025
4025
|
`))&&(t=t.trim()),(!n.newlineIsToken||!r.includes(`
|
|
4026
4026
|
`))&&(r=r.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(t.endsWith(`
|
|
4027
4027
|
`)&&(t=t.slice(0,-1)),r.endsWith(`
|
package/worker/isolated/index.js
CHANGED
|
@@ -4021,7 +4021,7 @@ The web search request used endpoint ${JSON.stringify(e)}. Search endpoint confi
|
|
|
4021
4021
|
button, .button { display: inline-block; box-sizing: border-box; margin-top: 1rem; padding: .75rem 1rem; border: 0; border-radius: .6rem; background: #5a87ff; color: #071022; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
|
|
4022
4022
|
.secondary { background: #29314b; color: #edf2ff; }
|
|
4023
4023
|
.error { padding: .75rem; border-radius: .5rem; background: #461d2b; color: #ffd6df; }
|
|
4024
|
-
`}o(uK,"pageStyles");var W8={name:"dsh-edge",version:"0.14.0-alpha.2",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.2-rc.1"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.2-rc.1","@deepseek-ai/dsh-anonymous-user-id":"0.1.2-rc.1","@deepseek-ai/dsh-api-gateway":"0.1.2-rc.1","@deepseek-ai/dsh-api-remotes":"0.1.2-rc.1","@deepseek-ai/dsh-api-session-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-settings-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-workspace-controller":"0.1.2-rc.1","@deepseek-ai/dsh-attachment":"0.1.2-rc.1","@deepseek-ai/dsh-brand":"0.1.2-rc.1","@deepseek-ai/dsh-client-store":"0.1.2-rc.1","@deepseek-ai/dsh-commands":"0.1.2-rc.1","@deepseek-ai/dsh-compaction":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-basic":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.2-rc.1","@deepseek-ai/dsh-credentials":"0.1.2-rc.1","@deepseek-ai/dsh-file-reference":"0.1.2-rc.1","@deepseek-ai/dsh-fs":"0.1.2-rc.1","@deepseek-ai/dsh-goal":"0.1.2-rc.1","@deepseek-ai/dsh-goal-round-driver":"0.1.2-rc.1","@deepseek-ai/dsh-host-directory-picker":"0.1.2-rc.1","@deepseek-ai/dsh-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-jobs-local":"0.1.2-rc.1","@deepseek-ai/dsh-host-plugin-inventory":"0.1.2-rc.1","@deepseek-ai/dsh-launch-environment":"0.1.2-rc.1","@deepseek-ai/dsh-llm":"0.1.2-rc.1","@deepseek-ai/dsh-llm-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-message-feedback":"0.1.2-rc.1","@deepseek-ai/dsh-output-retention":"0.1.2-rc.1","@deepseek-ai/dsh-plan-mode":"0.1.2-rc.1","@deepseek-ai/dsh-sandbox":"0.1.2-rc.1","@deepseek-ai/dsh-scope":"0.1.2-rc.1","@deepseek-ai/dsh-schedule":"0.1.2-rc.1","@deepseek-ai/dsh-session":"0.1.2-rc.1","@deepseek-ai/dsh-session-persistence":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection-cache":"0.1.2-rc.1","@deepseek-ai/dsh-session-query":"0.1.2-rc.1","@deepseek-ai/dsh-session-reference":"0.1.2-rc.1","@deepseek-ai/dsh-session-title":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-llm":"0.1.2-rc.1","@deepseek-ai/dsh-settings":"0.1.2-rc.1","@deepseek-ai/dsh-skill":"0.1.2-rc.1","@deepseek-ai/dsh-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.2-rc.1","@deepseek-ai/dsh-tool-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-spill":"0.1.2-rc.1","@deepseek-ai/dsh-spill-policy":"0.1.2-rc.1","@deepseek-ai/dsh-storage":"0.1.2-rc.1","@deepseek-ai/dsh-storage-domain":"0.1.2-rc.1","@deepseek-ai/dsh-system-prompt":"0.1.2-rc.1","@deepseek-ai/dsh-timeout":"0.1.2-rc.1","@deepseek-ai/dsh-token-meter":"0.1.2-rc.1","@deepseek-ai/dsh-tool-ask-user":"0.1.2-rc.1","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.2-rc.1","@deepseek-ai/dsh-tool-fs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-goal":"0.1.2-rc.1","@deepseek-ai/dsh-tool-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-skill":"0.1.2-rc.1","@deepseek-ai/dsh-tool-web":"0.1.2-rc.1","@deepseek-ai/dsh-tools":"0.1.2-rc.1","@deepseek-ai/dsh-typert-protocol":"0.1.2-rc.1","@deepseek-ai/dsh-typert-registry":"0.1.2-rc.1","@deepseek-ai/dsh-user-questions":"0.1.2-rc.1","@deepseek-ai/dsh-util-values":"0.1.2-rc.1","@deepseek-ai/dsh-web":"0.1.2-rc.1","@deepseek-ai/dsh-web-fetch-http":"0.1.2-rc.1","@deepseek-ai/dsh-web-search-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-workspace":"0.1.2-rc.1","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var n3=W8.version,dK=W8.dshEdge.upstreamVersion;function CTe(){return"dsh-edge@0.14.0-alpha.2/isolated"}o(CTe,"resolveEdgeDeploymentId");function _h(e){return{baseURL:o7(e.DEEPSEEK_BASE_URL),maxTokens:u7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ql(e.DEEPSEEK_MODEL),reasoningEffort:l7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:hy(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:c7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:wh(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(_h,"resolveEdgeDeploymentConfig");function RTe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}o(RTe,"edgeDeploymentApiKeyConfigured");function NTe(e){let t=o7(e),n=new URL(t);return n.search.length===0&&n.hash.length===0?t:(n.search="",n.hash="",n.href)}o(NTe,"projectedEdgeBaseURL");function H8(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:CTe(),apiKeyConfigured:RTe(e),baseURL:NTe(e.DEEPSEEK_BASE_URL),maxTokens:u7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ql(e.DEEPSEEK_MODEL),reasoningEffort:l7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:hy(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:c7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:wh(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(H8,"resolveEdgeDeploymentProfile");function pK(e){_h(e);let t=H8(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,version:n3,upstreamVersion:dK,status:"ready"}}o(pK,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as KMe}from"node:async_hooks";import{WorkerEntrypoint as But}from"cloudflare:workers";var Lc=zc(fK(),1);var G8=o((e,t,n)=>{let r=e instanceof RegExp?hK(e,n):e,i=t instanceof RegExp?hK(t,n):t,s=r!==null&&i!=null&&OTe(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},"balanced"),hK=o((e,t)=>{let n=t.match(e);return n?n[0]:null},"maybeMatch"),OTe=o((e,t,n)=>{let r,i,s,a,l,c=n.indexOf(e),u=n.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(r=[],s=n.length;d>=0&&!l;){if(d===c)r.push(d),c=n.indexOf(e,d+1);else if(r.length===1){let p=r.pop();p!==void 0&&(l=[p,u])}else i=r.pop(),i!==void 0&&i<s&&(s=i,a=u),u=n.indexOf(t,d+1);d=c<u&&c>=0?c:u}r.length&&a!==void 0&&(l=[s,a])}return l},"range");var mK="\0SLASH"+Math.random()+"\0",gK="\0OPEN"+Math.random()+"\0",K8="\0CLOSE"+Math.random()+"\0",yK="\0COMMA"+Math.random()+"\0",bK="\0PERIOD"+Math.random()+"\0",$Te=new RegExp(mK,"g"),PTe=new RegExp(gK,"g"),DTe=new RegExp(K8,"g"),MTe=new RegExp(yK,"g"),LTe=new RegExp(bK,"g"),jTe=/\\\\/g,FTe=/\\{/g,UTe=/\\}/g,BTe=/\\,/g,qTe=/\\\./g,zTe=1e5,WTe=4e6;function V8(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}o(V8,"numeric");function HTe(e){return e.replace(jTe,mK).replace(FTe,gK).replace(UTe,K8).replace(BTe,yK).replace(qTe,bK)}o(HTe,"escapeBraces");function GTe(e){return e.replace($Te,"\\").replace(PTe,"{").replace(DTe,"}").replace(MTe,",").replace(LTe,".")}o(GTe,"unescapeBraces");function xK(e){if(!e)return[""];let t=[],n=G8("{","}",e);if(!n)return e.split(",");let{pre:r,body:i,post:s}=n,a=r.split(",");a[a.length-1]+="{"+i+"}";let l=xK(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}o(xK,"parseCommaParts");function vK(e,t={}){if(!e)return[];let{max:n=zTe,maxLength:r=WTe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Z8(HTe(e),n,r,!0).map(GTe)}o(vK,"expand");function VTe(e){return"{"+e+"}"}o(VTe,"embrace");function ZTe(e){return/^-?0\d/.test(e)}o(ZTe,"isPadded");function KTe(e,t){return e<=t}o(KTe,"lte");function JTe(e,t){return e>=t}o(JTe,"gte");function Ah(e,t,n,r,i,s){let a=[],l=0;for(let c=0;c<e.length;c++)for(let u=0;u<n.length;u++){if(a.length>=r)return a;let d=e[c]+t+n[u];if(!(s&&!d)){if(l+d.length>i)return a;a.push(d),l+=d.length}}return a}o(Ah,"combine");function XTe(e,t,n,r){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let a=V8(i[0]),l=V8(i[1]),c=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(V8(i[2])),1):1,d=KTe;l<a&&(u*=-1,d=JTe);let m=i.some(ZTe),h=0;for(let g=a;d(g,l)&&s.length<n;g+=u){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),m){let b=c-y.length;if(b>0){let x=new Array(b+1).join("0");g<0?y="-"+x+y.slice(1):y=x+y}}if(h+y.length>r)break;s.push(y),h+=y.length}return s}o(XTe,"expandSequence");function Z8(e,t,n,r){let i=[""],s=!1,a=!0;for(;;){let l=G8("{","}",e);if(!l)return Ah(i,e,[""],t,n,s);let c=l.pre;if(/\$$/.test(c)){if(i=Ah(i,c+"{"+l.body+"}",[""],t,n,s&&!l.post.length),a=!1,!l.post.length)break;e=l.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=u||d,m=l.body.indexOf(",")>=0;if(!p&&!m){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+K8+l.post,r=!0;continue}return Ah(i,c+"{"+l.body+"}"+l.post,[""],t,n,s)}a&&(s=r&&!p,a=!1);let h;if(p)h=XTe(l.body,d,t,n);else{let g=xK(l.body);if(g.length===1&&g[0]!==void 0&&(g=Z8(g[0],t,n,!1).map(VTe),g.length===1)){if(i=Ah(i,c+g[0],[""],t,n,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let x=0;y&&x<i.length;x++)i[x]&&(y=!1);h=[];let b=0;e:for(let x=0;x<g.length;x++){let w=Z8(g[x],t,n,!1);for(let v=0;v<w.length;v++){let E=w[v];if(!(y&&!E)){if(h.length>=t||b+E.length>n)break e;h.push(E),b+=E.length}}}}if(i=Ah(i,c,h,t,n,s&&!l.post.length),!l.post.length)break;e=l.post}return i}o(Z8,"expand_");var Th=o(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var QTe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Ih=o(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),YTe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),wK=o(e=>e.join(""),"rangesToString"),SK=o((e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=n+1,a=!1,l=!1,c=!1,u=!1,d=n,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===n+1){u=!0,s++;continue}if(y==="]"&&a&&!c){d=s+1;break}if(a=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[b,[x,w,v]]of Object.entries(QTe))if(e.startsWith(b,s)){if(p)return["$.",!1,e.length-n,!0];s+=b.length,v?i.push(x):r.push(x),l=l||w;continue e}}if(c=!1,p){y>p?r.push(Ih(p)+"-"+Ih(y)):y===p&&r.push(Ih(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){r.push(Ih(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}r.push(Ih(y)),s++}if(d<s)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let y=r[0].length===2?r[0].slice(-1):r[0];return[YTe(y),!1,d-n,!1]}let m="["+(u?"^":"")+wK(r)+"]",h="["+(u?"":"^")+wK(i)+"]";return[r.length&&i.length?"("+m+"|"+h+")":r.length?m:h,l,d-n,!0]},"parseClass");var Zo=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var fi,eIe=new Set(["!","?","+","*","@"]),J8=o(e=>eIe.has(e),"isExtglobType"),EK=o(e=>J8(e.type),"isExtglobAST"),tIe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),nIe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),rIe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),kK=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),iIe="(?!(?:^|/)\\.\\.?(?:$|/))",i3="(?!\\.)",sIe=new Set(["[","."]),aIe=new Set(["..","."]),oIe=new Set("().*{}+?[]^$\\!"),lIe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),X8="[^/]",_K=X8+"*?",AK=X8+"+?",cIe=0,vc=class{static{o(this,"AST")}type;#e;#n;#r=!1;#t=[];#i;#s;#o;#d=!1;#l;#a;#c=!1;id=++cIe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#i=n,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#d&&this.#o.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#a=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let n=t,r=n.#i;for(;r;){for(let i=n.#s+1;!r.type&&i<r.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[i])}n=r,r=n.#i}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof fi&&n.#i===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let n=0;n<this.#s;n++){let r=t.#t[n];if(!(r instanceof fi&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new fi(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#m(t,n,r,i,s){let a=i.maxExtglobRecursion??2,l=!1,c=!1,u=-1,d=!1;if(n.type===null){let y=r,b="";for(;y<t.length;){let x=t.charAt(y++);if(l||x==="\\"){l=!l,b+=x;continue}if(c){y===u+1?(x==="^"||x==="!")&&(d=!0):x==="]"&&!(y===u+2&&d)&&(c=!1),b+=x;continue}else if(x==="["){c=!0,u=y,d=!1,b+=x;continue}if(!i.noext&&J8(x)&&t.charAt(y)==="("&&s<=a){n.push(b),b="";let v=new fi(x,n);y=fi.#m(t,v,y,i,s+1),n.push(v);continue}b+=x}return n.push(b),y}let p=r+1,m=new fi(null,n),h=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===u+1?(y==="^"||y==="!")&&(d=!0):y==="]"&&!(p===u+2&&d)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,u=p,d=!1,g+=y;continue}if(!i.noext&&J8(y)&&t.charAt(p)==="("&&(s<=a||n&&n.#y(y))){let x=n&&n.#y(y)?0:1;m.push(g),g="";let w=new fi(y,m);m.push(w),p=fi.#m(t,w,p,i,s+x);continue}if(y==="|"){m.push(g),g="",h.push(m),m=new fi(null,n);continue}if(y===")")return g===""&&n.#t.length===0&&(n.#c=!0),m.push(g),g="",n.push(...h,m),p;g+=y}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],p}#$(t){return this.#g(t,nIe)}#g(t,n=tIe){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#y(r.type,n)}#y(t,n=rIe){return!!n.get(this.type)?.includes(t)}#p(t,n){let r=t.#t[0],i=new fi(null,r,this.options);i.#t.push(""),r.push(i),this.#_(t,n)}#_(t,n){let r=t.#t[0];this.#t.splice(n,1,...r.#t);for(let i of r.#t)typeof i=="object"&&(i.#i=this);this.#a=void 0}#A(t){return!!kK.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#A(n.type)}#b(t){let n=kK.get(this.type),r=t.#t[0],i=n?.get(r.type);if(!i)return!1;this.#t=r.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#a=void 0,this.#c=!1}static fromGlob(t,n={}){let r=new fi(null,void 0,n);return fi.#m(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}get options(){return this.#l}toRegExpSource(t){let n=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!EK(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(h=>typeof h!="string"),u=this.#t.map(h=>{let[g,y,b,x]=typeof h=="string"?fi.#T(h,this.#n,c):h.toRegExpSource(t);return this.#n=this.#n||b,this.#r=this.#r||x,g}).join(""),d="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&aIe.has(this.#t[0]))){let g=sIe,y=n&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),b=!n&&!t&&g.has(u.charAt(0));d=y?iIe:b?i3:""}let p="";return this.isEnd()&&this.#e.#d&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,Zo(u),this.#n=!!this.#n,this.#r]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#x(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#t=[c],u.type=null,u.#n=void 0,[c,Zo(this.toString()),!1,!1]}let a=!r||t||n||!i3?"":this.#x(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!n?i3:"")+AK;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?i3:"")+_K+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+s+c}return[l,Zo(s),this.#n=!!this.#n,this.#r]}#f(){if(EK(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){let i=this.#t[r];typeof i=="object"&&(i.#f(),this.#g(i)?(n=!1,this.#_(i,r)):this.#$(i)?(n=!1,this.#p(i,r)):this.#P(i)&&(n=!1,this.#b(i)))}}while(!n&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#a=void 0}#x(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,s,a]=n.toRegExpSource(t);return this.#r=this.#r||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#T(t,n,r=!1){let i=!1,s="",a=!1,l=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(i){i=!1,s+=(oIe.has(u)?"\\":"")+u;continue}if(u==="*"){if(l)continue;l=!0,s+=r&&/^[*]+$/.test(t)?AK:_K,n=!0;continue}else l=!1;if(u==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[d,p,m,h]=SK(t,c);if(m){s+=d,a=a||p,c+=m-1,n=n||h;continue}}if(u==="?"){s+=X8,n=!0;continue}s+=lIe(u)}return[s,Zo(t),!!n,a]}};fi=vc;var Q8=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var br=o((e,t,n={})=>(Th(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Td(t,n).match(e)),"minimatch"),uIe=/^\*+([^+@!?*[(]*)$/,dIe=o(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),pIe=o(e=>t=>t.endsWith(e),"starDotExtTestDot"),fIe=o(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),hIe=o(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),mIe=/^\*+\.\*+$/,gIe=o(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),yIe=o(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),bIe=/^\.\*+$/,xIe=o(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),vIe=/^\*+$/,wIe=o(e=>e.length!==0&&!e.startsWith("."),"starTest"),SIe=o(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),EIe=/^\?+([^+@!?*[(]*)?$/,kIe=o(([e,t=""])=>{let n=CK([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocase"),_Ie=o(([e,t=""])=>{let n=RK([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocaseDot"),AIe=o(([e,t=""])=>{let n=RK([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTestDot"),TIe=o(([e,t=""])=>{let n=CK([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTest"),CK=o(([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},"qmarksTestNoExt"),RK=o(([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},"qmarksTestNoExtDot"),NK=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",TK={win32:{sep:"\\"},posix:{sep:"/"}},IIe=NK==="win32"?TK.win32.sep:TK.posix.sep;br.sep=IIe;var qr=Symbol("globstar **");br.GLOBSTAR=qr;var CIe="[^/]",RIe=CIe+"*?",NIe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",OIe="(?:(?!(?:\\/|^)\\.).)*?",$Ie=o((e,t={})=>n=>br(n,e,t),"filter");br.filter=$Ie;var Vi=o((e,t={})=>Object.assign({},e,t),"ext"),PIe=o(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return br;let t=br;return Object.assign(o((r,i,s={})=>t(r,i,Vi(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{o(this,"Minimatch")}constructor(i,s={}){super(i,Vi(e,s))}static defaults(i){return t.defaults(Vi(e,i)).Minimatch}},AST:class extends t.AST{static{o(this,"AST")}constructor(i,s,a={}){super(i,s,Vi(e,a))}static fromGlob(i,s={}){return t.AST.fromGlob(i,Vi(e,s))}},unescape:o((r,i={})=>t.unescape(r,Vi(e,i)),"unescape"),escape:o((r,i={})=>t.escape(r,Vi(e,i)),"escape"),filter:o((r,i={})=>t.filter(r,Vi(e,i)),"filter"),defaults:o(r=>t.defaults(Vi(e,r)),"defaults"),makeRe:o((r,i={})=>t.makeRe(r,Vi(e,i)),"makeRe"),braceExpand:o((r,i={})=>t.braceExpand(r,Vi(e,i)),"braceExpand"),match:o((r,i,s={})=>t.match(r,i,Vi(e,s)),"match"),sep:t.sep,GLOBSTAR:qr})},"defaults");br.defaults=PIe;var OK=o((e,t={})=>(Th(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:vK(e,{max:t.braceExpandMax})),"braceExpand");br.braceExpand=OK;var DIe=o((e,t={})=>new Td(e,t).makeRe(),"makeRe");br.makeRe=DIe;var MIe=o((e,t,n={})=>{let r=new Td(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e},"match");br.match=MIe;var IK=/[?*]|[+@!]\(.*?\)|\[|\]/,LIe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Td=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){Th(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||NK,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!IK.test(s[2]))&&!IK.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(u)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1],c=r[i+2],u=r[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);let d=r.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){let a=r[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let c=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...c),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(i){t[n]=[],t[r]=i;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,s=0,a=[],l="";for(;i<t.length&&s<n.length;)if(t[i]===n[s])a.push(l==="b"?n[s]:t[i]),i++,s++;else if(r&&t[i]==="**"&&n[s]===t[i+1])a.push(t[i]),i++;else if(r&&n[s]==="**"&&t[i]===n[s+1])a.push(n[s]),s++;else if(t[i]==="*"&&n[s]&&(this.options.dot||!n[s].startsWith("."))&&n[s]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,s++}else if(n[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[s]),i++,s++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),d=!u&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:l?0:void 0,m=d?3:u?0:void 0;if(typeof p=="number"&&typeof m=="number"){let[h,g]=[t[p],n[m]];h.toLowerCase()===g.toLowerCase()&&(n[m]=h,s=m,i=p)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(qr)?this.#e(t,n,r,i,s):this.#r(t,n,r,i,s)}#e(t,n,r,i,s){let a=n.indexOf(qr,s),l=n.lastIndexOf(qr),[c,u,d]=r?[n.slice(s,a),n.slice(a+1),[]]:[n.slice(s,a),n.slice(a+1,l),n.slice(l+1)];if(c.length){let w=t.slice(i,i+c.length);if(!this.#r(w,c,r,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(d.length){if(d.length+i>t.length)return!1;let w=t.length-d.length;if(this.#r(t,d,r,w,0))p=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(w--,!this.#r(t,d,r,w,0)))return!1;p=d.length+1}}if(!u.length){let w=!!p;for(let v=i;v<t.length-p;v++){let E=String(t[v]);if(w=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return r||w}let m=[[[],0]],h=m[0],g=0,y=[0];for(let w of u)w===qr?(y.push(g),h=[[],0],m.push(h)):(h[0].push(w),g++);let b=m.length-1,x=t.length-p;for(let w of m)w[1]=x-(y[b--]+w[0].length);return!!this.#n(t,m,i,0,r,0,!!p)}#n(t,n,r,i,s,a,l){let c=n[i];if(!c){for(let p=r;p<t.length;p++){l=!0;let m=t[p];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1}return l}let[u,d]=c;for(;r<=d;){if(this.#r(t.slice(0,r+u.length),u,s,r,0)&&a<this.maxGlobstarRecursion){let h=this.#n(t,n,r+u.length,i+1,s,a+1,l);if(h!==!1)return h}let m=t[r];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1;r++}return s||null}#r(t,n,r,i,s){let a,l,c,u;for(a=i,l=s,u=t.length,c=n.length;a<u&&l<c;a++,l++){this.debug("matchOne loop");let d=n[l],p=t[a];if(this.debug(n,d,p),d===!1||d===qr)return!1;let m;if(typeof d=="string"?(m=p===d,this.debug("string match",d,p,m)):(m=d.test(p),this.debug("pattern match",d,p,m)),!m)return!1}if(a===u&&l===c)return!0;if(a===u)return r;if(l===c)return a===u-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return OK(this.pattern,this.options)}parse(t){Th(t);let n=this.options;if(t==="**")return qr;if(t==="")return"";let r,i=null;(r=t.match(vIe))?i=n.dot?SIe:wIe:(r=t.match(uIe))?i=(n.nocase?n.dot?hIe:fIe:n.dot?pIe:dIe)(r[1]):(r=t.match(EIe))?i=(n.nocase?n.dot?_Ie:kIe:n.dot?AIe:TIe)(r):(r=t.match(mIe))?i=n.dot?yIe:gIe:(r=t.match(bIe))&&(i=xIe);let s=vc.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?RIe:n.dot?NIe:OIe,i=new Set(n.nocase?["i"]:[]),s=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let m of p.flags.split(""))i.add(m);return typeof p=="string"?LIe(p):p===qr?qr:p._src});u.forEach((p,m)=>{let h=u[m+1],g=u[m-1];p!==qr||g===qr||(g===void 0?h!==void 0&&h!==qr?u[m+1]="(?:\\/|"+r+"\\/)?"+h:u[m]=r:h===void 0?u[m-1]=g+"(?:\\/|\\/"+r+")?":h!==qr&&(u[m-1]=g+"(?:\\/|\\/"+r+"\\/)"+h,u[m+1]=qr))});let d=u.filter(p=>p!==qr);if(this.partial&&d.length>=1){let p=[];for(let m=1;m<=d.length;m++)p.push(d.slice(0,m).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];s="^"+a+s+l+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l of s){let c=i;if(r.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return br.defaults(t).Minimatch}};br.AST=vc;br.Minimatch=Td;br.escape=Q8;br.unescape=Zo;import{gunzipSync as oRe}from"node:zlib";var Ch=class{static{o(this,"Diff")}diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let s=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var s;let a=o(w=>{if(w=this.postProcess(w,r),i){setTimeout(function(){i(w)},0);return}else return w},"done"),l=n.length,c=t.length,u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let p=(s=r.timeout)!==null&&s!==void 0?s:1/0,m=Date.now()+p,h=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=c&&g+1>=l)return a(this.buildValues(h[0].lastComponent,n,t));let y=-1/0,b=1/0,x=o(()=>{for(let w=Math.max(y,-u);w<=Math.min(b,u);w+=2){let v,E=h[w-1],S=h[w+1];E&&(h[w-1]=void 0);let _=!1;if(S){let $=S.oldPos-w;_=S&&0<=$&&$<l}let T=E&&E.oldPos+1<c;if(!_&&!T){h[w]=void 0;continue}if(!T||_&&E.oldPos<S.oldPos?v=this.addToPath(S,!0,!1,0,r):v=this.addToPath(E,!1,!0,1,r),g=this.extractCommon(v,n,t,w,r),v.oldPos+1>=c&&g+1>=l)return a(this.buildValues(v.lastComponent,n,t))||!0;h[w]=v,v.oldPos+1>=c&&(b=Math.min(b,w-1)),g+1>=l&&(y=Math.max(y,w+1))}u++},"execEditLength");if(i)o(function w(){setTimeout(function(){if(u>d||Date.now()>m)return i(void 0);x()||w()},0)},"exec")();else for(;u<=d&&Date.now()<=m;){let w=x();if(w)return w}}addToPath(t,n,r,i,s){let a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){let a=n.length,l=r.length,c=t.oldPos,u=c-i,d=0;for(;u+1<a&&c+1<l&&this.equals(r[c+1],n[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let a=i.length,l=0,c=0,u=0;for(;l<a;l++){let d=i[l];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let p=n.slice(c,c+d.count);p=p.map(function(m,h){let g=r[u+h];return g.length>m.length?g:m}),d.value=this.join(p)}else d.value=this.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return i}};var Y8=class extends Ch{static{o(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=FIe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
4024
|
+
`}o(uK,"pageStyles");var W8={name:"dsh-edge",version:"0.14.0",description:"Your DeepSeek Harness, anywhere \u2014 deploy a persistent personal coding agent to Cloudflare Workers in one command",author:"pawaca",license:"MIT",type:"module",bin:{"dsh-edge":"scripts/cli.mjs"},files:["dist","worker","scripts/*.d.mts","scripts/*.mjs","wrangler.jsonc","README.md","README.zh.md","LICENSE","THIRD_PARTY_NOTICES.md"],repository:{type:"git",url:"git+https://github.com/pawaca/dsh-edge.git",directory:"apps/dsh-edge"},homepage:"https://github.com/pawaca/dsh-edge#readme",bugs:{url:"https://github.com/pawaca/dsh-edge/issues"},keywords:["deepseek","deepseek-harness","ai-agents","byok","cloudflare-workers","durable-objects","self-hosted"],engines:{node:">=22.14.0"},publishConfig:{access:"public"},dshEdge:{upstreamVersion:"0.1.2-rc.1"},scripts:{"bundle:direct":"pnpm run web:build && pnpm --dir standalone run build:worker:direct && node standalone/scripts/promote.mjs direct","bundle:isolated":"pnpm run web:build && pnpm --dir standalone run build:worker:isolated && node standalone/scripts/promote.mjs isolated","bundle:workers":"pnpm --dir standalone run build && pnpm --dir standalone run verify && node standalone/scripts/promote.mjs all",dev:"pnpm run bundle:direct && node scripts/dev.mjs direct","dev:isolated":"pnpm run bundle:isolated && node scripts/dev.mjs isolated","dsh-edge":"node scripts/cli.mjs","example:install":"node examples/install-keyless.mjs","install:cloudflare":"pnpm run bundle:workers && node scripts/cli.mjs install","legal:write":"node scripts/legal-files.mjs write","pack:verify":"node scripts/verify-packed.mjs",prepack:"node scripts/legal-files.mjs verify && pnpm run bundle:workers","web:build":"pnpm --dir standalone run build:web && node standalone/scripts/promote.mjs web",test:"vitest run --root ../.. --project edge-runtime","test:integration":"pnpm run bundle:workers && node tests/run-session-integration.mjs","test:snapshot":"vitest run --root ../.. --config apps/dsh-edge/vitest.snapshot.config.ts",typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"1.7.0","compare-versions":"6.1.1",execa:"^10.0.1","jsonc-parser":"^3.3.1",wrangler:"4.129.0"},devDependencies:{"@cloudflare/computer":"0.2.1","@cloudflare/workers-types":"5.20260904.1","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-agent":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.2-rc.1","@deepseek-ai/dsh-anonymous-user-id":"0.1.2-rc.1","@deepseek-ai/dsh-api-gateway":"0.1.2-rc.1","@deepseek-ai/dsh-api-remotes":"0.1.2-rc.1","@deepseek-ai/dsh-api-session-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-settings-controller":"0.1.2-rc.1","@deepseek-ai/dsh-api-workspace-controller":"0.1.2-rc.1","@deepseek-ai/dsh-attachment":"0.1.2-rc.1","@deepseek-ai/dsh-brand":"0.1.2-rc.1","@deepseek-ai/dsh-client-store":"0.1.2-rc.1","@deepseek-ai/dsh-commands":"0.1.2-rc.1","@deepseek-ai/dsh-compaction":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-basic":"0.1.2-rc.1","@deepseek-ai/dsh-compaction-tool-result-pruner":"0.1.2-rc.1","@deepseek-ai/dsh-credentials":"0.1.2-rc.1","@deepseek-ai/dsh-file-reference":"0.1.2-rc.1","@deepseek-ai/dsh-fs":"0.1.2-rc.1","@deepseek-ai/dsh-goal":"0.1.2-rc.1","@deepseek-ai/dsh-goal-round-driver":"0.1.2-rc.1","@deepseek-ai/dsh-host-directory-picker":"0.1.2-rc.1","@deepseek-ai/dsh-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-jobs-local":"0.1.2-rc.1","@deepseek-ai/dsh-host-plugin-inventory":"0.1.2-rc.1","@deepseek-ai/dsh-launch-environment":"0.1.2-rc.1","@deepseek-ai/dsh-llm":"0.1.2-rc.1","@deepseek-ai/dsh-llm-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-message-feedback":"0.1.2-rc.1","@deepseek-ai/dsh-output-retention":"0.1.2-rc.1","@deepseek-ai/dsh-plan-mode":"0.1.2-rc.1","@deepseek-ai/dsh-sandbox":"0.1.2-rc.1","@deepseek-ai/dsh-scope":"0.1.2-rc.1","@deepseek-ai/dsh-schedule":"0.1.2-rc.1","@deepseek-ai/dsh-session":"0.1.2-rc.1","@deepseek-ai/dsh-session-persistence":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection-cache":"0.1.2-rc.1","@deepseek-ai/dsh-session-query":"0.1.2-rc.1","@deepseek-ai/dsh-session-reference":"0.1.2-rc.1","@deepseek-ai/dsh-session-title":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-first-prompt-llm":"0.1.2-rc.1","@deepseek-ai/dsh-session-title-llm":"0.1.2-rc.1","@deepseek-ai/dsh-settings":"0.1.2-rc.1","@deepseek-ai/dsh-skill":"0.1.2-rc.1","@deepseek-ai/dsh-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-in-process-driver":"0.1.2-rc.1","@deepseek-ai/dsh-subagent-spawn-in-process":"0.1.2-rc.1","@deepseek-ai/dsh-tool-subagent":"0.1.2-rc.1","@deepseek-ai/dsh-spill":"0.1.2-rc.1","@deepseek-ai/dsh-spill-policy":"0.1.2-rc.1","@deepseek-ai/dsh-storage":"0.1.2-rc.1","@deepseek-ai/dsh-storage-domain":"0.1.2-rc.1","@deepseek-ai/dsh-system-prompt":"0.1.2-rc.1","@deepseek-ai/dsh-timeout":"0.1.2-rc.1","@deepseek-ai/dsh-token-meter":"0.1.2-rc.1","@deepseek-ai/dsh-tool-ask-user":"0.1.2-rc.1","@deepseek-ai/dsh-tool-call-timeout-policy":"0.1.2-rc.1","@deepseek-ai/dsh-tool-fs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-goal":"0.1.2-rc.1","@deepseek-ai/dsh-tool-jobs":"0.1.2-rc.1","@deepseek-ai/dsh-tool-skill":"0.1.2-rc.1","@deepseek-ai/dsh-tool-web":"0.1.2-rc.1","@deepseek-ai/dsh-tools":"0.1.2-rc.1","@deepseek-ai/dsh-typert-protocol":"0.1.2-rc.1","@deepseek-ai/dsh-typert-registry":"0.1.2-rc.1","@deepseek-ai/dsh-user-questions":"0.1.2-rc.1","@deepseek-ai/dsh-util-values":"0.1.2-rc.1","@deepseek-ai/dsh-web":"0.1.2-rc.1","@deepseek-ai/dsh-web-fetch-http":"0.1.2-rc.1","@deepseek-ai/dsh-web-search-deepseek":"0.1.2-rc.1","@deepseek-ai/dsh-workspace":"0.1.2-rc.1","@mixmark-io/domino":"2.2.0","fast-png":"8.0.0","jpeg-js":"0.4.4","just-bash":"3.4.2",playwright:"^1.49.0",typescript:"^6.0.3",vitest:"^4.1.8",ws:"^8.21.0"}};var n3=W8.version,dK=W8.dshEdge.upstreamVersion;function CTe(){return"dsh-edge@0.14.0/isolated"}o(CTe,"resolveEdgeDeploymentId");function _h(e){return{baseURL:o7(e.DEEPSEEK_BASE_URL),maxTokens:u7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ql(e.DEEPSEEK_MODEL),reasoningEffort:l7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:hy(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:c7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:wh(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(_h,"resolveEdgeDeploymentConfig");function RTe(e){return typeof e.DEEPSEEK_API_KEY=="string"&&e.DEEPSEEK_API_KEY.trim().length>0}o(RTe,"edgeDeploymentApiKeyConfigured");function NTe(e){let t=o7(e),n=new URL(t);return n.search.length===0&&n.hash.length===0?t:(n.search="",n.hash="",n.href)}o(NTe,"projectedEdgeBaseURL");function H8(e,t){return{shell:e.LOADER===void 0?"just-bash-direct":"just-bash-isolated",storage:"durable-object-sqlite-vfs",attachmentStorage:t??(e.DSH_EDGE_ATTACHMENTS===void 0?"temporary-do":"private-r2"),deploymentId:CTe(),apiKeyConfigured:RTe(e),baseURL:NTe(e.DEEPSEEK_BASE_URL),maxTokens:u7(e.DEEPSEEK_MAX_OUTPUT_TOKENS),model:Ql(e.DEEPSEEK_MODEL),reasoningEffort:l7(e.DEEPSEEK_REASONING_EFFORT),searchBaseURL:hy(e.DEEPSEEK_SEARCH_BASE_URL),streamIdleTimeoutMs:c7(e.DEEPSEEK_STREAM_IDLE_TIMEOUT_MS),commandTimeoutPolicy:wh(e.DSH_EDGE_DEFAULT_COMMAND_TIMEOUT_MS,e.DSH_EDGE_MAX_COMMAND_TIMEOUT_MS)}}o(H8,"resolveEdgeDeploymentProfile");function pK(e){_h(e);let t=H8(e);return{ok:!0,service:"dsh-edge",storage:t.storage,attachmentStorage:t.attachmentStorage,shell:t.shell,agent:"upstream-react-loop-agent",access:"single-owner-cookie",deploymentId:t.deploymentId,version:n3,upstreamVersion:dK,status:"ready"}}o(pK,"resolveEdgeDeploymentHealth");import{AsyncLocalStorage as KMe}from"node:async_hooks";import{WorkerEntrypoint as But}from"cloudflare:workers";var Lc=zc(fK(),1);var G8=o((e,t,n)=>{let r=e instanceof RegExp?hK(e,n):e,i=t instanceof RegExp?hK(t,n):t,s=r!==null&&i!=null&&OTe(r,i,n);return s&&{start:s[0],end:s[1],pre:n.slice(0,s[0]),body:n.slice(s[0]+r.length,s[1]),post:n.slice(s[1]+i.length)}},"balanced"),hK=o((e,t)=>{let n=t.match(e);return n?n[0]:null},"maybeMatch"),OTe=o((e,t,n)=>{let r,i,s,a,l,c=n.indexOf(e),u=n.indexOf(t,c+1),d=c;if(c>=0&&u>0){if(e===t)return[c,u];for(r=[],s=n.length;d>=0&&!l;){if(d===c)r.push(d),c=n.indexOf(e,d+1);else if(r.length===1){let p=r.pop();p!==void 0&&(l=[p,u])}else i=r.pop(),i!==void 0&&i<s&&(s=i,a=u),u=n.indexOf(t,d+1);d=c<u&&c>=0?c:u}r.length&&a!==void 0&&(l=[s,a])}return l},"range");var mK="\0SLASH"+Math.random()+"\0",gK="\0OPEN"+Math.random()+"\0",K8="\0CLOSE"+Math.random()+"\0",yK="\0COMMA"+Math.random()+"\0",bK="\0PERIOD"+Math.random()+"\0",$Te=new RegExp(mK,"g"),PTe=new RegExp(gK,"g"),DTe=new RegExp(K8,"g"),MTe=new RegExp(yK,"g"),LTe=new RegExp(bK,"g"),jTe=/\\\\/g,FTe=/\\{/g,UTe=/\\}/g,BTe=/\\,/g,qTe=/\\\./g,zTe=1e5,WTe=4e6;function V8(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}o(V8,"numeric");function HTe(e){return e.replace(jTe,mK).replace(FTe,gK).replace(UTe,K8).replace(BTe,yK).replace(qTe,bK)}o(HTe,"escapeBraces");function GTe(e){return e.replace($Te,"\\").replace(PTe,"{").replace(DTe,"}").replace(MTe,",").replace(LTe,".")}o(GTe,"unescapeBraces");function xK(e){if(!e)return[""];let t=[],n=G8("{","}",e);if(!n)return e.split(",");let{pre:r,body:i,post:s}=n,a=r.split(",");a[a.length-1]+="{"+i+"}";let l=xK(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}o(xK,"parseCommaParts");function vK(e,t={}){if(!e)return[];let{max:n=zTe,maxLength:r=WTe}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Z8(HTe(e),n,r,!0).map(GTe)}o(vK,"expand");function VTe(e){return"{"+e+"}"}o(VTe,"embrace");function ZTe(e){return/^-?0\d/.test(e)}o(ZTe,"isPadded");function KTe(e,t){return e<=t}o(KTe,"lte");function JTe(e,t){return e>=t}o(JTe,"gte");function Ah(e,t,n,r,i,s){let a=[],l=0;for(let c=0;c<e.length;c++)for(let u=0;u<n.length;u++){if(a.length>=r)return a;let d=e[c]+t+n[u];if(!(s&&!d)){if(l+d.length>i)return a;a.push(d),l+=d.length}}return a}o(Ah,"combine");function XTe(e,t,n,r){let i=e.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let a=V8(i[0]),l=V8(i[1]),c=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(V8(i[2])),1):1,d=KTe;l<a&&(u*=-1,d=JTe);let m=i.some(ZTe),h=0;for(let g=a;d(g,l)&&s.length<n;g+=u){let y;if(t)y=String.fromCharCode(g),y==="\\"&&(y="");else if(y=String(g),m){let b=c-y.length;if(b>0){let x=new Array(b+1).join("0");g<0?y="-"+x+y.slice(1):y=x+y}}if(h+y.length>r)break;s.push(y),h+=y.length}return s}o(XTe,"expandSequence");function Z8(e,t,n,r){let i=[""],s=!1,a=!0;for(;;){let l=G8("{","}",e);if(!l)return Ah(i,e,[""],t,n,s);let c=l.pre;if(/\$$/.test(c)){if(i=Ah(i,c+"{"+l.body+"}",[""],t,n,s&&!l.post.length),a=!1,!l.post.length)break;e=l.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=u||d,m=l.body.indexOf(",")>=0;if(!p&&!m){if(l.post.match(/,(?!,).*\}/)){e=l.pre+"{"+l.body+K8+l.post,r=!0;continue}return Ah(i,c+"{"+l.body+"}"+l.post,[""],t,n,s)}a&&(s=r&&!p,a=!1);let h;if(p)h=XTe(l.body,d,t,n);else{let g=xK(l.body);if(g.length===1&&g[0]!==void 0&&(g=Z8(g[0],t,n,!1).map(VTe),g.length===1)){if(i=Ah(i,c+g[0],[""],t,n,s&&!l.post.length),!l.post.length)break;e=l.post;continue}let y=s&&!l.post.length&&!c;for(let x=0;y&&x<i.length;x++)i[x]&&(y=!1);h=[];let b=0;e:for(let x=0;x<g.length;x++){let w=Z8(g[x],t,n,!1);for(let v=0;v<w.length;v++){let E=w[v];if(!(y&&!E)){if(h.length>=t||b+E.length>n)break e;h.push(E),b+=E.length}}}}if(i=Ah(i,c,h,t,n,s&&!l.post.length),!l.post.length)break;e=l.post}return i}o(Z8,"expand_");var Th=o(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var QTe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Ih=o(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),YTe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),wK=o(e=>e.join(""),"rangesToString"),SK=o((e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],s=n+1,a=!1,l=!1,c=!1,u=!1,d=n,p="";e:for(;s<e.length;){let y=e.charAt(s);if((y==="!"||y==="^")&&s===n+1){u=!0,s++;continue}if(y==="]"&&a&&!c){d=s+1;break}if(a=!0,y==="\\"&&!c){c=!0,s++;continue}if(y==="["&&!c){for(let[b,[x,w,v]]of Object.entries(QTe))if(e.startsWith(b,s)){if(p)return["$.",!1,e.length-n,!0];s+=b.length,v?i.push(x):r.push(x),l=l||w;continue e}}if(c=!1,p){y>p?r.push(Ih(p)+"-"+Ih(y)):y===p&&r.push(Ih(y)),p="",s++;continue}if(e.startsWith("-]",s+1)){r.push(Ih(y+"-")),s+=2;continue}if(e.startsWith("-",s+1)){p=y,s+=2;continue}r.push(Ih(y)),s++}if(d<s)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let y=r[0].length===2?r[0].slice(-1):r[0];return[YTe(y),!1,d-n,!1]}let m="["+(u?"^":"")+wK(r)+"]",h="["+(u?"":"^")+wK(i)+"]";return[r.length&&i.length?"("+m+"|"+h+")":r.length?m:h,l,d-n,!0]},"parseClass");var Zo=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape");var fi,eIe=new Set(["!","?","+","*","@"]),J8=o(e=>eIe.has(e),"isExtglobType"),EK=o(e=>J8(e.type),"isExtglobAST"),tIe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),nIe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),rIe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),kK=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),iIe="(?!(?:^|/)\\.\\.?(?:$|/))",i3="(?!\\.)",sIe=new Set(["[","."]),aIe=new Set(["..","."]),oIe=new Set("().*{}+?[]^$\\!"),lIe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),X8="[^/]",_K=X8+"*?",AK=X8+"+?",cIe=0,vc=class{static{o(this,"AST")}type;#e;#n;#r=!1;#t=[];#i;#s;#o;#d=!1;#l;#a;#c=!1;id=++cIe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#i=n,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#o=this.#e===this?[]:this.#e.#o,t==="!"&&!this.#e.#d&&this.#o.push(this),this.#s=this.#i?this.#i.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#a=this.#t.map(t=>String(t)).join("")}#k(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let t;for(;t=this.#o.pop();){if(t.type!=="!")continue;let n=t,r=n.#i;for(;r;){for(let i=n.#s+1;!r.type&&i<r.#t.length;i++)for(let s of t.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(r.#t[i])}n=r,r=n.#i}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof fi&&n.#i===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&this.#i?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#s===0)return!0;let t=this.#i;for(let n=0;n<this.#s;n++){let r=t.#t[n];if(!(r instanceof fi&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let t=this.#i?this.#i.#t.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new fi(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#m(t,n,r,i,s){let a=i.maxExtglobRecursion??2,l=!1,c=!1,u=-1,d=!1;if(n.type===null){let y=r,b="";for(;y<t.length;){let x=t.charAt(y++);if(l||x==="\\"){l=!l,b+=x;continue}if(c){y===u+1?(x==="^"||x==="!")&&(d=!0):x==="]"&&!(y===u+2&&d)&&(c=!1),b+=x;continue}else if(x==="["){c=!0,u=y,d=!1,b+=x;continue}if(!i.noext&&J8(x)&&t.charAt(y)==="("&&s<=a){n.push(b),b="";let v=new fi(x,n);y=fi.#m(t,v,y,i,s+1),n.push(v);continue}b+=x}return n.push(b),y}let p=r+1,m=new fi(null,n),h=[],g="";for(;p<t.length;){let y=t.charAt(p++);if(l||y==="\\"){l=!l,g+=y;continue}if(c){p===u+1?(y==="^"||y==="!")&&(d=!0):y==="]"&&!(p===u+2&&d)&&(c=!1),g+=y;continue}else if(y==="["){c=!0,u=p,d=!1,g+=y;continue}if(!i.noext&&J8(y)&&t.charAt(p)==="("&&(s<=a||n&&n.#y(y))){let x=n&&n.#y(y)?0:1;m.push(g),g="";let w=new fi(y,m);m.push(w),p=fi.#m(t,w,p,i,s+x);continue}if(y==="|"){m.push(g),g="",h.push(m),m=new fi(null,n);continue}if(y===")")return g===""&&n.#t.length===0&&(n.#c=!0),m.push(g),g="",n.push(...h,m),p;g+=y}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],p}#$(t){return this.#g(t,nIe)}#g(t,n=tIe){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null)return!1;let r=t.#t[0];return!r||typeof r!="object"||r.type===null?!1:this.#y(r.type,n)}#y(t,n=rIe){return!!n.get(this.type)?.includes(t)}#p(t,n){let r=t.#t[0],i=new fi(null,r,this.options);i.#t.push(""),r.push(i),this.#_(t,n)}#_(t,n){let r=t.#t[0];this.#t.splice(n,1,...r.#t);for(let i of r.#t)typeof i=="object"&&(i.#i=this);this.#a=void 0}#A(t){return!!kK.get(this.type)?.has(t)}#P(t){if(!t||typeof t!="object"||t.type!==null||t.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let n=t.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#A(n.type)}#b(t){let n=kK.get(this.type),r=t.#t[0],i=n?.get(r.type);if(!i)return!1;this.#t=r.#t;for(let s of this.#t)typeof s=="object"&&(s.#i=this);this.type=i,this.#a=void 0,this.#c=!1}static fromGlob(t,n={}){let r=new fi(null,void 0,n);return fi.#m(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,i,s]=this.toRegExpSource();if(!(i||this.#n||this.#l.nocase&&!this.#l.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let l=(this.#l.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}get options(){return this.#l}toRegExpSource(t){let n=t??!!this.#l.dot;if(this.#e===this&&(this.#f(),this.#k()),!EK(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(h=>typeof h!="string"),u=this.#t.map(h=>{let[g,y,b,x]=typeof h=="string"?fi.#T(h,this.#n,c):h.toRegExpSource(t);return this.#n=this.#n||b,this.#r=this.#r||x,g}).join(""),d="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&aIe.has(this.#t[0]))){let g=sIe,y=n&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),b=!n&&!t&&g.has(u.charAt(0));d=y?iIe:b?i3:""}let p="";return this.isEnd()&&this.#e.#d&&this.#i?.type==="!"&&(p="(?:$|\\/)"),[d+u+p,Zo(u),this.#n=!!this.#n,this.#r]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#x(n);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#t=[c],u.type=null,u.#n=void 0,[c,Zo(this.toString()),!1,!1]}let a=!r||t||n||!i3?"":this.#x(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let l="";if(this.type==="!"&&this.#c)l=(this.isStart()&&!n?i3:"")+AK;else{let c=this.type==="!"?"))"+(this.isStart()&&!n&&!t?i3:"")+_K+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=i+s+c}return[l,Zo(s),this.#n=!!this.#n,this.#r]}#f(){if(EK(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#t.length;r++){let i=this.#t[r];typeof i=="object"&&(i.#f(),this.#g(i)?(n=!1,this.#_(i,r)):this.#$(i)?(n=!1,this.#p(i,r)):this.#P(i)&&(n=!1,this.#b(i)))}}while(!n&&++t<10)}else for(let t of this.#t)typeof t=="object"&&t.#f();this.#a=void 0}#x(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,s,a]=n.toRegExpSource(t);return this.#r=this.#r||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#T(t,n,r=!1){let i=!1,s="",a=!1,l=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(i){i=!1,s+=(oIe.has(u)?"\\":"")+u;continue}if(u==="*"){if(l)continue;l=!0,s+=r&&/^[*]+$/.test(t)?AK:_K,n=!0;continue}else l=!1;if(u==="\\"){c===t.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[d,p,m,h]=SK(t,c);if(m){s+=d,a=a||p,c+=m-1,n=n||h;continue}}if(u==="?"){s+=X8,n=!0;continue}s+=lIe(u)}return[s,Zo(t),!!n,a]}};fi=vc;var Q8=o((e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var br=o((e,t,n={})=>(Th(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Td(t,n).match(e)),"minimatch"),uIe=/^\*+([^+@!?*[(]*)$/,dIe=o(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),pIe=o(e=>t=>t.endsWith(e),"starDotExtTestDot"),fIe=o(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),hIe=o(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),mIe=/^\*+\.\*+$/,gIe=o(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),yIe=o(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),bIe=/^\.\*+$/,xIe=o(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),vIe=/^\*+$/,wIe=o(e=>e.length!==0&&!e.startsWith("."),"starTest"),SIe=o(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),EIe=/^\?+([^+@!?*[(]*)?$/,kIe=o(([e,t=""])=>{let n=CK([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocase"),_Ie=o(([e,t=""])=>{let n=RK([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},"qmarksTestNocaseDot"),AIe=o(([e,t=""])=>{let n=RK([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTestDot"),TIe=o(([e,t=""])=>{let n=CK([e]);return t?r=>n(r)&&r.endsWith(t):n},"qmarksTest"),CK=o(([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},"qmarksTestNoExt"),RK=o(([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},"qmarksTestNoExtDot"),NK=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",TK={win32:{sep:"\\"},posix:{sep:"/"}},IIe=NK==="win32"?TK.win32.sep:TK.posix.sep;br.sep=IIe;var qr=Symbol("globstar **");br.GLOBSTAR=qr;var CIe="[^/]",RIe=CIe+"*?",NIe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",OIe="(?:(?!(?:\\/|^)\\.).)*?",$Ie=o((e,t={})=>n=>br(n,e,t),"filter");br.filter=$Ie;var Vi=o((e,t={})=>Object.assign({},e,t),"ext"),PIe=o(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return br;let t=br;return Object.assign(o((r,i,s={})=>t(r,i,Vi(e,s)),"m"),{Minimatch:class extends t.Minimatch{static{o(this,"Minimatch")}constructor(i,s={}){super(i,Vi(e,s))}static defaults(i){return t.defaults(Vi(e,i)).Minimatch}},AST:class extends t.AST{static{o(this,"AST")}constructor(i,s,a={}){super(i,s,Vi(e,a))}static fromGlob(i,s={}){return t.AST.fromGlob(i,Vi(e,s))}},unescape:o((r,i={})=>t.unescape(r,Vi(e,i)),"unescape"),escape:o((r,i={})=>t.escape(r,Vi(e,i)),"escape"),filter:o((r,i={})=>t.filter(r,Vi(e,i)),"filter"),defaults:o(r=>t.defaults(Vi(e,r)),"defaults"),makeRe:o((r,i={})=>t.makeRe(r,Vi(e,i)),"makeRe"),braceExpand:o((r,i={})=>t.braceExpand(r,Vi(e,i)),"braceExpand"),match:o((r,i,s={})=>t.match(r,i,Vi(e,s)),"match"),sep:t.sep,GLOBSTAR:qr})},"defaults");br.defaults=PIe;var OK=o((e,t={})=>(Th(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:vK(e,{max:t.braceExpandMax})),"braceExpand");br.braceExpand=OK;var DIe=o((e,t={})=>new Td(e,t).makeRe(),"makeRe");br.makeRe=DIe;var MIe=o((e,t,n={})=>{let r=new Td(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e},"match");br.match=MIe;var IK=/[?*]|[+@!]\(.*?\)|\[|\]/,LIe=o(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Td=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){Th(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||NK,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!IK.test(s[2]))&&!IK.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(d=>this.parse(d))];if(u)return[s[0],...s.slice(1).map(d=>this.parse(d))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{let s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1],c=r[i+2],u=r[i+3];if(l!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);let d=r.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let s=0;for(;(s=r.indexOf("..",s+1))!==-1;){let a=r[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let c=s===1&&r[s+1]==="**"?["."]:[];r.splice(s-1,2,...c),r.length===0&&r.push(""),s-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(i){t[n]=[],t[r]=i;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,s=0,a=[],l="";for(;i<t.length&&s<n.length;)if(t[i]===n[s])a.push(l==="b"?n[s]:t[i]),i++,s++;else if(r&&t[i]==="**"&&n[s]===t[i+1])a.push(t[i]),i++;else if(r&&n[s]==="**"&&t[i]===n[s+1])a.push(n[s]),s++;else if(t[i]==="*"&&n[s]&&(this.options.dot||!n[s].startsWith("."))&&n[s]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,s++}else if(n[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[s]),i++,s++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let i=0,s=0;if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),d=!u&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),p=c?3:l?0:void 0,m=d?3:u?0:void 0;if(typeof p=="number"&&typeof m=="number"){let[h,g]=[t[p],n[m]];h.toLowerCase()===g.toLowerCase()&&(n[m]=h,s=m,i=p)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(qr)?this.#e(t,n,r,i,s):this.#r(t,n,r,i,s)}#e(t,n,r,i,s){let a=n.indexOf(qr,s),l=n.lastIndexOf(qr),[c,u,d]=r?[n.slice(s,a),n.slice(a+1),[]]:[n.slice(s,a),n.slice(a+1,l),n.slice(l+1)];if(c.length){let w=t.slice(i,i+c.length);if(!this.#r(w,c,r,0,0))return!1;i+=c.length,s+=c.length}let p=0;if(d.length){if(d.length+i>t.length)return!1;let w=t.length-d.length;if(this.#r(t,d,r,w,0))p=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(w--,!this.#r(t,d,r,w,0)))return!1;p=d.length+1}}if(!u.length){let w=!!p;for(let v=i;v<t.length-p;v++){let E=String(t[v]);if(w=!0,E==="."||E===".."||!this.options.dot&&E.startsWith("."))return!1}return r||w}let m=[[[],0]],h=m[0],g=0,y=[0];for(let w of u)w===qr?(y.push(g),h=[[],0],m.push(h)):(h[0].push(w),g++);let b=m.length-1,x=t.length-p;for(let w of m)w[1]=x-(y[b--]+w[0].length);return!!this.#n(t,m,i,0,r,0,!!p)}#n(t,n,r,i,s,a,l){let c=n[i];if(!c){for(let p=r;p<t.length;p++){l=!0;let m=t[p];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1}return l}let[u,d]=c;for(;r<=d;){if(this.#r(t.slice(0,r+u.length),u,s,r,0)&&a<this.maxGlobstarRecursion){let h=this.#n(t,n,r+u.length,i+1,s,a+1,l);if(h!==!1)return h}let m=t[r];if(m==="."||m===".."||!this.options.dot&&m.startsWith("."))return!1;r++}return s||null}#r(t,n,r,i,s){let a,l,c,u;for(a=i,l=s,u=t.length,c=n.length;a<u&&l<c;a++,l++){this.debug("matchOne loop");let d=n[l],p=t[a];if(this.debug(n,d,p),d===!1||d===qr)return!1;let m;if(typeof d=="string"?(m=p===d,this.debug("string match",d,p,m)):(m=d.test(p),this.debug("pattern match",d,p,m)),!m)return!1}if(a===u&&l===c)return!0;if(a===u)return r;if(l===c)return a===u-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return OK(this.pattern,this.options)}parse(t){Th(t);let n=this.options;if(t==="**")return qr;if(t==="")return"";let r,i=null;(r=t.match(vIe))?i=n.dot?SIe:wIe:(r=t.match(uIe))?i=(n.nocase?n.dot?hIe:fIe:n.dot?pIe:dIe)(r[1]):(r=t.match(EIe))?i=(n.nocase?n.dot?_Ie:kIe:n.dot?AIe:TIe)(r):(r=t.match(mIe))?i=n.dot?yIe:gIe:(r=t.match(bIe))&&(i=xIe);let s=vc.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?RIe:n.dot?NIe:OIe,i=new Set(n.nocase?["i"]:[]),s=t.map(c=>{let u=c.map(p=>{if(p instanceof RegExp)for(let m of p.flags.split(""))i.add(m);return typeof p=="string"?LIe(p):p===qr?qr:p._src});u.forEach((p,m)=>{let h=u[m+1],g=u[m-1];p!==qr||g===qr||(g===void 0?h!==void 0&&h!==qr?u[m+1]="(?:\\/|"+r+"\\/)?"+h:u[m]=r:h===void 0?u[m-1]=g+"(?:\\/|\\/"+r+")?":h!==qr&&(u[m-1]=g+"(?:\\/|\\/"+r+"\\/)"+h,u[m+1]=qr))});let d=u.filter(p=>p!==qr);if(this.partial&&d.length>=1){let p=[];for(let m=1;m<=d.length;m++)p.push(d.slice(0,m).join("/"));return"(?:"+p.join("|")+")"}return d.join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];s="^"+a+s+l+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+l+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l of s){let c=i;if(r.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return br.defaults(t).Minimatch}};br.AST=vc;br.Minimatch=Td;br.escape=Q8;br.unescape=Zo;import{gunzipSync as oRe}from"node:zlib";var Ch=class{static{o(this,"Diff")}diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);let s=this.castInput(t,r),a=this.castInput(n,r),l=this.removeEmpty(this.tokenize(s,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(l,c,r,i)}diffWithOptionsObj(t,n,r,i){var s;let a=o(w=>{if(w=this.postProcess(w,r),i){setTimeout(function(){i(w)},0);return}else return w},"done"),l=n.length,c=t.length,u=1,d=l+c;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));let p=(s=r.timeout)!==null&&s!==void 0?s:1/0,m=Date.now()+p,h=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(h[0],n,t,0,r);if(h[0].oldPos+1>=c&&g+1>=l)return a(this.buildValues(h[0].lastComponent,n,t));let y=-1/0,b=1/0,x=o(()=>{for(let w=Math.max(y,-u);w<=Math.min(b,u);w+=2){let v,E=h[w-1],S=h[w+1];E&&(h[w-1]=void 0);let _=!1;if(S){let $=S.oldPos-w;_=S&&0<=$&&$<l}let T=E&&E.oldPos+1<c;if(!_&&!T){h[w]=void 0;continue}if(!T||_&&E.oldPos<S.oldPos?v=this.addToPath(S,!0,!1,0,r):v=this.addToPath(E,!1,!0,1,r),g=this.extractCommon(v,n,t,w,r),v.oldPos+1>=c&&g+1>=l)return a(this.buildValues(v.lastComponent,n,t))||!0;h[w]=v,v.oldPos+1>=c&&(b=Math.min(b,w-1)),g+1>=l&&(y=Math.max(y,w+1))}u++},"execEditLength");if(i)o(function w(){setTimeout(function(){if(u>d||Date.now()>m)return i(void 0);x()||w()},0)},"exec")();else for(;u<=d&&Date.now()<=m;){let w=x();if(w)return w}}addToPath(t,n,r,i,s){let a=t.lastComponent;return a&&!s.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,s){let a=n.length,l=r.length,c=t.oldPos,u=c-i,d=0;for(;u+1<a&&c+1<l&&this.equals(r[c+1],n[u+1],s);)u++,c++,d++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!s.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){let i=[],s;for(;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();let a=i.length,l=0,c=0,u=0;for(;l<a;l++){let d=i[l];if(d.removed)d.value=this.join(r.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let p=n.slice(c,c+d.count);p=p.map(function(m,h){let g=r[u+h];return g.length>m.length?g:m}),d.value=this.join(p)}else d.value=this.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return i}};var Y8=class extends Ch{static{o(this,"LineDiff")}constructor(){super(...arguments),this.tokenize=FIe}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
4025
4025
|
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
4026
4026
|
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
4027
4027
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|