@psnext/slingcli 2.4.20260507-1 → 2.4.20260507-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/sling.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  process.title = "sling";
3
3
 
4
- const SLING_VERSION = "2.4.20260507-1";
4
+ const SLING_VERSION = "2.4.20260507-3";
5
5
 
6
6
  import { setBedrockProviderModule } from "@mariozechner/pi-ai";
7
7
  import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
@@ -92,10 +92,10 @@ async function checkForUpdate(args) {
92
92
  if (process.env.SKIP_SLING_AUTO_UPDATE_CHECK) return;
93
93
  if (args.includes("--version") || args.includes("-v")) return;
94
94
  if (args.includes("install")) return;
95
-
95
+
96
96
  // Check if -y or --yes flag is present
97
97
  const autoYes = args.includes("-y") || args.includes("--yes");
98
-
98
+
99
99
  if (!autoYes && (!process.stdin.isTTY || !process.stdout.isTTY)) return;
100
100
 
101
101
  let latestVersion;
@@ -114,7 +114,7 @@ async function checkForUpdate(args) {
114
114
  if (!latestVersion || !semver.gt(latestVersion, SLING_VERSION)) return;
115
115
 
116
116
  console.log(`A new version ${latestVersion} is available (current ${SLING_VERSION}).`);
117
-
117
+
118
118
  let shouldUpdate = autoYes;
119
119
  if (!autoYes) {
120
120
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
@@ -126,7 +126,7 @@ async function checkForUpdate(args) {
126
126
  }
127
127
  shouldUpdate = !answer.startsWith("n");
128
128
  }
129
-
129
+
130
130
  if (!shouldUpdate) return;
131
131
 
132
132
  console.log("Installing @psnext/slingcli@" + latestVersion + "...");
@@ -141,6 +141,47 @@ async function checkForUpdate(args) {
141
141
  }
142
142
  }
143
143
 
144
+ // defaults to global (~/.sling/agent). When run from a
145
+ // TTY without an explicit scope flag, prompt for global vs local. Pi has no
146
+ // flag because global is its default; we only inject when
147
+ // the user picks local. Non-TTY (CI/scripts) keeps the current default.
148
+ async function promptInstallScopeIfNeeded(args) {
149
+ let isInstall = false;
150
+ for (const a of args) {
151
+ if (!a.startsWith("-")) {
152
+ isInstall = a === "install";
153
+ break;
154
+ }
155
+ }
156
+ if (!isInstall) return args;
157
+
158
+ let hasScope = false;
159
+ for (const a of args) {
160
+ if (a === "-l" || a === "--local" || a === "-g" || a === "--global") {
161
+ hasScope = true;
162
+ break;
163
+ }
164
+ }
165
+
166
+ const next = args.slice();
167
+ if (!hasScope && process.stdin.isTTY && process.stdout.isTTY) {
168
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
169
+ let answer = "";
170
+ try {
171
+ answer = (await rl.question("Install scope? [G]lobal (~/.sling) / [l]ocal (./.sling) [G]: ")).trim().toLowerCase();
172
+ } finally {
173
+ rl.close();
174
+ }
175
+ if (answer === "l" || answer === "local") {
176
+ next.push("-l");
177
+ } else if (answer !== "" && answer !== "g" && answer !== "global") {
178
+ console.error("sling: unrecognized scope '" + answer + "', defaulting to global");
179
+ }
180
+ }
181
+ // Strip -g/--global before delegating; pi treats global as default.
182
+ return next.filter((a) => a !== "-g" && a !== "--global");
183
+ }
184
+
144
185
  async function run() {
145
186
  const rawArgs = process.argv.slice(2);
146
187
  if (rawArgs.includes("--version") || rawArgs.includes("-v")) {
@@ -151,18 +192,25 @@ async function run() {
151
192
  await checkForUpdate(rawArgs);
152
193
  await checkAndInstallPackages();
153
194
  setBedrockProviderModule(bedrockProviderModule);
154
- const args = applyNoEnv(rawArgs);
195
+ let args = applyNoEnv(rawArgs);
196
+ args = await promptInstallScopeIfNeeded(args);
155
197
 
156
198
  // Built-in subcommands are dispatched by parsePackageCommand, which only
157
- // inspects args[0]. Prepending "-e <path>" pushes the subcommand off args[0]
158
- // and silently falls through to interactive mode.
199
+ // inspects args[0]. Prepending "-e <path> --provider slingshot" pushes the
200
+ // subcommand off args[0] and silently falls through to interactive mode.
159
201
  const BUILTIN_SUBCOMMANDS = new Set(["install", "remove", "uninstall", "update", "list", "config"]);
160
202
  const firstPositional = args.find((a) => !a.startsWith("-"));
161
203
  if (firstPositional && BUILTIN_SUBCOMMANDS.has(firstPositional)) {
162
204
  await main(args);
163
205
  } else {
206
+ if (existsSync(path.resolve("./.slingshot/skills"))) {
207
+ args.push("--skill", path.resolve("./.slingshot/skills"));
208
+ }
209
+ if (existsSync(path.resolve(homedir(), ".slingshot/skills"))) {
210
+ args.push("--skill", path.resolve(homedir(), ".slingshot/skills"));
211
+ }
164
212
  const extensionPath = path.resolve(__dirname, "../slingshot");
165
- await main(["-e", extensionPath, ...args]);
213
+ await main(["-e", extensionPath, "--provider", "slingshot", ...args]);
166
214
  }
167
215
  }
168
216
 
@@ -12246,13 +12246,13 @@ export const MODELS = {
12246
12246
  reasoning: true,
12247
12247
  input: ["text", "image"],
12248
12248
  cost: {
12249
- input: 0.09999999999999999,
12249
+ input: 0.04,
12250
12250
  output: 0.15,
12251
12251
  cacheRead: 0,
12252
12252
  cacheWrite: 0,
12253
12253
  },
12254
12254
  contextWindow: 262144,
12255
- maxTokens: 4096,
12255
+ maxTokens: 81920,
12256
12256
  },
12257
12257
  "qwen/qwen3.5-flash-02-23": {
12258
12258
  id: "qwen/qwen3.5-flash-02-23",
@@ -1,4 +1,7 @@
1
1
 
2
+ **2.2.3 / 2026-04-07**
3
+ - remove unnecessary files from npm package
4
+
2
5
  **2.2.2 / 2026-03-23**
3
6
  - fix for space string
4
7
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strnum",
3
- "version": "2.2.3",
3
+ "version": "2.3.0",
4
4
  "description": "Parse String to Number based on configuration",
5
5
  "type": "module",
6
6
  "main": "strnum.js",
@@ -17,7 +17,7 @@
17
17
  "type": "git",
18
18
  "url": "https://github.com/NaturalIntelligence/strnum"
19
19
  },
20
- "author": "Amit Gupta (https://amitkumargupta.work/)",
20
+ "author": "Amit Gupta (https://solothought.work/)",
21
21
  "license": "MIT",
22
22
  "funding": [
23
23
  {
@@ -26,6 +26,7 @@
26
26
  }
27
27
  ],
28
28
  "devDependencies": {
29
+ "@byspec/numbers": "^0.1.1",
29
30
  "jasmine": "^5.6.0"
30
31
  }
31
32
  }
@@ -1,12 +1,12 @@
1
1
  const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
2
+ const binRegex = /^0b[01]+$/;
3
+ const octRegex = /^0o[0-7]+$/;
2
4
  const numRegex = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/;
3
- // const octRegex = /^0x[a-z0-9]+/;
4
- // const binRegex = /0x[a-z0-9]+/;
5
-
6
5
 
7
6
  const consider = {
8
7
  hex: true,
9
- // oct: false,
8
+ binary: false,
9
+ octal: false,
10
10
  leadingZeros: true,
11
11
  decimalPoint: "\.",
12
12
  eNotation: true,
@@ -25,14 +25,14 @@ export default function toNumber(str, options = {}) {
25
25
  else if (trimmedStr === "0") return 0;
26
26
  else if (options.hex && hexRegex.test(trimmedStr)) {
27
27
  return parse_int(trimmedStr, 16);
28
- // }else if (options.oct && octRegex.test(str)) {
29
- // return Number.parseInt(val, 8);
28
+ } else if (options.binary && binRegex.test(trimmedStr)) {
29
+ return parse_int(trimmedStr, 2);
30
+ } else if (options.octal && octRegex.test(trimmedStr)) {
31
+ return parse_int(trimmedStr, 8);
30
32
  } else if (!isFinite(trimmedStr)) { //Infinity
31
33
  return handleInfinity(str, Number(trimmedStr), options);
32
34
  } else if (trimmedStr.includes('e') || trimmedStr.includes('E')) { //eNotation
33
35
  return resolveEnotation(str, trimmedStr, options);
34
- // }else if (options.parseBin && binRegex.test(str)) {
35
- // return Number.parseInt(val, 2);
36
36
  } else {
37
37
  //separate negative sign, leading zeros, and rest number
38
38
  const match = numRegex.exec(trimmedStr);
@@ -130,11 +130,13 @@ function trimZeros(numStr) {
130
130
  }
131
131
 
132
132
  function parse_int(numStr, base) {
133
- //polyfill
133
+ const str = numStr.trim();
134
+ if (base === 2 || base === 8) numStr = str.substring(2);
135
+
134
136
  if (parseInt) return parseInt(numStr, base);
135
137
  else if (Number.parseInt) return Number.parseInt(numStr, base);
136
138
  else if (window && window.parseInt) return window.parseInt(numStr, base);
137
- else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")
139
+ else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
138
140
  }
139
141
 
140
142
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@psnext/slingcli",
3
- "version": "2.4.20260507-1",
3
+ "version": "2.4.20260507-3",
4
4
  "description": "Connects Sling CLI to Publicis Sapient Slingshot enterprise LLM gateway. Bundles the pi coding-agent runtime.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "type": "git",
30
30
  "url": "git+https://pscode.lioncloud.net/psaiproducts/slingcli.git"
31
31
  },
32
- "slingVersion": "2.4.20260507-1",
32
+ "slingVersion": "2.4.20260507-3",
33
33
  "dependencies": {
34
34
  "@mariozechner/pi-tui": "file:../.sling-pack/mariozechner-pi-tui-0.73.0.tgz",
35
35
  "@mariozechner/pi-ai": "file:../.sling-pack/mariozechner-pi-ai-0.73.0.tgz",
@@ -1,16 +1,16 @@
1
- var Le=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(s,t)=>(typeof require<"u"?require:s)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{eastAsianWidth as Xe}from"get-east-asian-width";var U=new Intl.Segmenter(void 0,{granularity:"grapheme"});function he(){return U}function It(e){let s=e.codePointAt(0);return s>=126976&&s<=130047||s>=8960&&s<=9215||s>=9728&&s<=10175||s>=11088&&s<=11093||e.includes("\uFE0F")||e.length>2}var kt=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),Tt=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),At=new RegExp("^\\p{RGI_Emoji}$","v"),Mt=512,Z=new Map;function Ae(e){for(let s=0;s<e.length;s++){let t=e.charCodeAt(s);if(t<32||t>126)return!1}return!0}function Pt(e,s){if(s<=0||e.length===0)return{text:"",width:0};if(Ae(e)){let n=e.slice(0,s);return{text:n,width:n.length}}let t=e.includes("\x1B"),i=e.includes(" ");if(!t&&!i){let n="",l=0;for(let{segment:h}of U.segment(e)){let u=j(h);if(l+u>s)break;n+=h,l+=u}return{text:n,width:l}}let o="",r=0,a=0,c="";for(;a<e.length;){let n=F(e,a);if(n){c+=n.code,a+=n.length;continue}if(e[a]===" "){if(r+3>s)break;c&&(o+=c,c=""),o+=" ",r+=3,a++;continue}let l=a;for(;l<e.length&&e[l]!==" "&&!F(e,l);)l++;for(let{segment:h}of U.segment(e.slice(a,l))){let u=j(h);if(r+u>s)return{text:o,width:r};c&&(o+=c,c=""),o+=h,r+=u}a=l}return{text:o,width:r}}function Ie(e,s,t,i,o,r){let a="\x1B[0m",c=s+i,n;return t.length>0?n=`${e}${a}${t}${a}`:n=`${e}${a}`,r?n+" ".repeat(Math.max(0,o-c)):n}function j(e){if(kt.test(e))return 0;if(It(e)&&At.test(e))return 2;let t=e.replace(Tt,"").codePointAt(0);if(t===void 0)return 0;if(t>=127462&&t<=127487)return 2;let i=Xe(t);if(e.length>1)for(let o of e.slice(1)){let r=o.codePointAt(0);r>=65280&&r<=65519?i+=Xe(r):(r===3635||r===3763)&&(i+=1)}return i}function _(e){if(e.length===0)return 0;if(Ae(e))return e.length;let s=Z.get(e);if(s!==void 0)return s;let t=e;if(e.includes(" ")&&(t=t.replace(/\t/g," ")),t.includes("\x1B")){let o="",r=0;for(;r<t.length;){let a=F(t,r);if(a){r+=a.length;continue}o+=t[r],r++}t=o}let i=0;for(let{segment:o}of U.segment(t))i+=j(o);if(Z.size>=Mt){let o=Z.keys().next().value;o!==void 0&&Z.delete(o)}return Z.set(e,i),i}var Rt=/[\u0e33\u0eb3]/,Et=/[\u0e33\u0eb3]/g;function Qe(e){return Rt.test(e)?e.replace(Et,s=>s==="\u0E33"?"\u0E4D\u0E32":"\u0ECD\u0EB2"):e}function F(e,s){if(s>=e.length||e[s]!=="\x1B")return null;let t=e[s+1];if(t==="["){let i=s+2;for(;i<e.length&&!/[mGKHJ]/.test(e[i]);)i++;return i<e.length?{code:e.substring(s,i+1),length:i+1-s}:null}if(t==="]"){let i=s+2;for(;i<e.length;){if(e[i]==="\x07")return{code:e.substring(s,i+1),length:i+1-s};if(e[i]==="\x1B"&&e[i+1]==="\\")return{code:e.substring(s,i+2),length:i+2-s};i++}return null}if(t==="_"){let i=s+2;for(;i<e.length;){if(e[i]==="\x07")return{code:e.substring(s,i+1),length:i+1-s};if(e[i]==="\x1B"&&e[i+1]==="\\")return{code:e.substring(s,i+2),length:i+2-s};i++}return null}return null}var Te=class{constructor(){this.bold=!1;this.dim=!1;this.italic=!1;this.underline=!1;this.blink=!1;this.inverse=!1;this.hidden=!1;this.strikethrough=!1;this.fgColor=null;this.bgColor=null;this.activeHyperlink=null}process(s){if(s.startsWith("\x1B]8;")){let a=s.match(/^\x1b\]8;[^;]*;([^\x1b\x07]*)/);this.activeHyperlink=a?.[1]?a[1]:null;return}if(!s.endsWith("m"))return;let t=s.match(/\x1b\[([\d;]*)m/);if(!t)return;let i=t[1];if(i===""||i==="0"){this.reset();return}let o=i.split(";"),r=0;for(;r<o.length;){let a=Number.parseInt(o[r],10);if(a===38||a===48){if(o[r+1]==="5"&&o[r+2]!==void 0){let c=`${o[r]};${o[r+1]};${o[r+2]}`;a===38?this.fgColor=c:this.bgColor=c,r+=3;continue}else if(o[r+1]==="2"&&o[r+4]!==void 0){let c=`${o[r]};${o[r+1]};${o[r+2]};${o[r+3]};${o[r+4]}`;a===38?this.fgColor=c:this.bgColor=c,r+=5;continue}}switch(a){case 0:this.reset();break;case 1:this.bold=!0;break;case 2:this.dim=!0;break;case 3:this.italic=!0;break;case 4:this.underline=!0;break;case 5:this.blink=!0;break;case 7:this.inverse=!0;break;case 8:this.hidden=!0;break;case 9:this.strikethrough=!0;break;case 21:this.bold=!1;break;case 22:this.bold=!1,this.dim=!1;break;case 23:this.italic=!1;break;case 24:this.underline=!1;break;case 25:this.blink=!1;break;case 27:this.inverse=!1;break;case 28:this.hidden=!1;break;case 29:this.strikethrough=!1;break;case 39:this.fgColor=null;break;case 49:this.bgColor=null;break;default:a>=30&&a<=37||a>=90&&a<=97?this.fgColor=String(a):(a>=40&&a<=47||a>=100&&a<=107)&&(this.bgColor=String(a));break}r++}}reset(){this.bold=!1,this.dim=!1,this.italic=!1,this.underline=!1,this.blink=!1,this.inverse=!1,this.hidden=!1,this.strikethrough=!1,this.fgColor=null,this.bgColor=null}clear(){this.reset(),this.activeHyperlink=null}getActiveCodes(){let s=[];this.bold&&s.push("1"),this.dim&&s.push("2"),this.italic&&s.push("3"),this.underline&&s.push("4"),this.blink&&s.push("5"),this.inverse&&s.push("7"),this.hidden&&s.push("8"),this.strikethrough&&s.push("9"),this.fgColor&&s.push(this.fgColor),this.bgColor&&s.push(this.bgColor);let t=s.length>0?`\x1B[${s.join(";")}m`:"";return this.activeHyperlink&&(t+=`\x1B]8;;${this.activeHyperlink}\x1B\\`),t}hasActiveCodes(){return this.bold||this.dim||this.italic||this.underline||this.blink||this.inverse||this.hidden||this.strikethrough||this.fgColor!==null||this.bgColor!==null||this.activeHyperlink!==null}getLineEndReset(){let s="";return this.underline&&(s+="\x1B[24m"),this.activeHyperlink&&(s+="\x1B]8;;\x1B\\"),s}};function z(e,s,t="...",i=!1){if(s<=0)return"";if(e.length===0)return i?" ".repeat(s):"";let o=_(t);if(o>=s){let d=_(e);if(d<=s)return i?e+" ".repeat(s-d):e;let f=Pt(t,s);return f.width===0?i?" ".repeat(s):"":Ie("",0,f.text,f.width,s,i)}if(Ae(e)){if(e.length<=s)return i?e+" ".repeat(s-e.length):e;let d=s-o;return Ie(e.slice(0,d),d,t,o,s,i)}let r=s-o,a="",c="",n=0,l=0,h=!0,u=!1,g=!1,b=e.includes("\x1B"),x=e.includes(" ");if(!b&&!x){for(let{segment:d}of U.segment(e)){let f=j(d);if(h&&l+f<=r?(a+=d,l+=f):h=!1,n+=f,n>s){u=!0;break}}g=!u}else{let d=0;for(;d<e.length;){let f=F(e,d);if(f){c+=f.code,d+=f.length;continue}if(e[d]===" "){if(h&&l+3<=r?(c&&(a+=c,c=""),a+=" ",l+=3):(h=!1,c=""),n+=3,n>s){u=!0;break}d++;continue}let y=d;for(;y<e.length&&e[y]!==" "&&!F(e,y);)y++;for(let{segment:L}of U.segment(e.slice(d,y))){let k=j(L);if(h&&l+k<=r?(c&&(a+=c,c=""),a+=L,l+=k):(h=!1,c=""),n+=k,n>s){u=!0;break}}if(u)break;d=y}g=d>=e.length}return!u&&g?i?e+" ".repeat(Math.max(0,s-n)):e:Ie(a,l,t,o,s,i)}function de(e,s,t,i=!1){return Me(e,s,t,i).text}function Me(e,s,t,i=!1){if(t<=0)return{text:"",width:0};let o=s+t,r="",a=0,c=0,n=0,l="";for(;n<e.length;){let h=F(e,n);if(h){c>=s&&c<o?r+=h.code:c<s&&(l+=h.code),n+=h.length;continue}let u=n;for(;u<e.length&&!F(e,u);)u++;for(let{segment:g}of U.segment(e.slice(n,u))){let b=j(g),x=c>=s&&c<o,d=!i||c+b<=o;if(x&&d&&(l&&(r+=l,l=""),r+=g,a+=b),c+=b,c>=o)break}if(n=u,c>=o)break}return{text:r,width:a}}var ke=new Te;function Je(e,s,t,i,o=!1){let r="",a=0,c="",n=0,l=0,h=0,u="",g=!1,b=t+i;for(ke.clear();h<e.length;){let x=F(e,h);if(x){ke.process(x.code),l<s?u+=x.code:l>=t&&l<b&&g&&(c+=x.code),h+=x.length;continue}let d=h;for(;d<e.length&&!F(e,d);)d++;for(let{segment:f}of U.segment(e.slice(h,d))){let y=j(f);if(l<s?(u&&(r+=u,u=""),r+=f,a+=y):l>=t&&l<b&&(!o||l+y<=b)&&(g||(c+=ke.getActiveCodes(),g=!0),c+=f,n+=y),l+=y,i<=0?l>=s:l>=b)break}if(h=d,i<=0?l>=s:l>=b)break}return{before:r,beforeWidth:a,after:c,afterWidth:n}}var V=!1;var it=new Set(["`","-","=","[","]","\\",";","'",",",".","/","!","@","#","$","%","^","&","*","(",")","_","+","|","~","{","}",":","<",">","?"]),p={shift:1,alt:2,ctrl:4,super:8},me=192,S={escape:27,tab:9,enter:13,space:32,backspace:127,kpEnter:57414},A={up:-1,down:-2,right:-3,left:-4},w={delete:-10,insert:-11,pageUp:-12,pageDown:-13,home:-14,end:-15},$t=new Map([[57399,48],[57400,49],[57401,50],[57402,51],[57403,52],[57404,53],[57405,54],[57406,55],[57407,56],[57408,57],[57409,46],[57410,47],[57411,42],[57412,45],[57413,43],[57415,61],[57416,44],[57417,A.left],[57418,A.right],[57419,A.up],[57420,A.down],[57421,w.pageUp],[57422,w.pageDown],[57423,w.home],[57424,w.end],[57425,w.insert],[57426,w.delete]]);function et(e){return $t.get(e)??e}function be(e,s){return(s&~me&p.shift)!==0&&e>=65&&e<=90?e+32:e}var O={up:["\x1B[A","\x1BOA"],down:["\x1B[B","\x1BOB"],right:["\x1B[C","\x1BOC"],left:["\x1B[D","\x1BOD"],home:["\x1B[H","\x1BOH","\x1B[1~","\x1B[7~"],end:["\x1B[F","\x1BOF","\x1B[4~","\x1B[8~"],insert:["\x1B[2~"],delete:["\x1B[3~"],pageUp:["\x1B[5~","\x1B[[5~"],pageDown:["\x1B[6~","\x1B[[6~"],clear:["\x1B[E","\x1BOE"],f1:["\x1BOP","\x1B[11~","\x1B[[A"],f2:["\x1BOQ","\x1B[12~","\x1B[[B"],f3:["\x1BOR","\x1B[13~","\x1B[[C"],f4:["\x1BOS","\x1B[14~","\x1B[[D"],f5:["\x1B[15~","\x1B[[E"],f6:["\x1B[17~"],f7:["\x1B[18~"],f8:["\x1B[19~"],f9:["\x1B[20~"],f10:["\x1B[21~"],f11:["\x1B[23~"],f12:["\x1B[24~"]},Ot={up:["\x1B[a"],down:["\x1B[b"],right:["\x1B[c"],left:["\x1B[d"],clear:["\x1B[e"],insert:["\x1B[2$"],delete:["\x1B[3$"],pageUp:["\x1B[5$"],pageDown:["\x1B[6$"],home:["\x1B[7$"],end:["\x1B[8$"]},Kt={up:["\x1BOa"],down:["\x1BOb"],right:["\x1BOc"],left:["\x1BOd"],clear:["\x1BOe"],insert:["\x1B[2^"],delete:["\x1B[3^"],pageUp:["\x1B[5^"],pageDown:["\x1B[6^"],home:["\x1B[7^"],end:["\x1B[8^"]};var R=(e,s)=>s.includes(e),$=(e,s,t)=>t===p.shift?R(e,Ot[s]):t===p.ctrl?R(e,Kt[s]):!1,pe="press";function Pe(e){return e.includes("\x1B[200~")?!1:!!(e.includes(":3u")||e.includes(":3~")||e.includes(":3A")||e.includes(":3B")||e.includes(":3C")||e.includes(":3D")||e.includes(":3H")||e.includes(":3F"))}function fe(e){if(!e)return"press";let s=parseInt(e,10);return s===2?"repeat":s===3?"release":"press"}function Wt(e){let s=e.match(/^\x1b\[(\d+)(?::(\d*))?(?::(\d+))?(?:;(\d+))?(?::(\d+))?u$/);if(s){let r=parseInt(s[1],10),a=s[2]&&s[2].length>0?parseInt(s[2],10):void 0,c=s[3]?parseInt(s[3],10):void 0,n=s[4]?parseInt(s[4],10):1,l=fe(s[5]);return pe=l,{codepoint:r,shiftedKey:a,baseLayoutKey:c,modifier:n-1,eventType:l}}let t=e.match(/^\x1b\[1;(\d+)(?::(\d+))?([ABCD])$/);if(t){let r=parseInt(t[1],10),a=fe(t[2]),c={A:-1,B:-2,C:-3,D:-4};return pe=a,{codepoint:c[t[3]],modifier:r-1,eventType:a}}let i=e.match(/^\x1b\[(\d+)(?:;(\d+))?(?::(\d+))?~$/);if(i){let r=parseInt(i[1],10),a=i[2]?parseInt(i[2],10):1,c=fe(i[3]),l={2:w.insert,3:w.delete,5:w.pageUp,6:w.pageDown,7:w.home,8:w.end}[r];if(l!==void 0)return pe=c,{codepoint:l,modifier:a-1,eventType:c}}let o=e.match(/^\x1b\[1;(\d+)(?::(\d+))?([HF])$/);if(o){let r=parseInt(o[1],10),a=fe(o[2]),c=o[3]==="H"?w.home:w.end;return pe=a,{codepoint:c,modifier:r-1,eventType:a}}return null}function m(e,s,t){let i=Wt(e);if(!i)return!1;let o=i.modifier&~me,r=t&~me;if(o!==r)return!1;let a=be(et(i.codepoint),i.modifier),c=be(et(s),t);if(a===c)return!0;if(i.baseLayoutKey!==void 0&&i.baseLayoutKey===s){let n=a,l=n>=97&&n<=122,h=it.has(String.fromCharCode(n));if(!l&&!h)return!0}return!1}function nt(e){let s=e.match(/^\x1b\[27;(\d+);(\d+)~$/);if(!s)return null;let t=parseInt(s[1],10);return{codepoint:parseInt(s[2],10),modifier:t-1}}function K(e,s,t){let i=nt(e);return i?i.codepoint===s&&i.modifier===t:!1}function Dt(){return!!process.env.WT_SESSION&&!process.env.SSH_CONNECTION&&!process.env.SSH_CLIENT&&!process.env.SSH_TTY}function tt(e,s){return e==="\x7F"?s===0:e!=="\b"?!1:Dt()?s===p.ctrl:s===0}function Bt(e){let s=e.toLowerCase(),t=s.charCodeAt(0);return t>=97&&t<=122||s==="["||s==="\\"||s==="]"||s==="_"?String.fromCharCode(t&31):s==="-"?"":null}function st(e){return e>="0"&&e<="9"}function ge(e,s,t){if(t===0)return!1;let i=nt(e);return!i||i.modifier!==t?!1:be(i.codepoint,i.modifier)===be(s,t)}function Ft(e){let s=e.toLowerCase().split("+"),t=s[s.length-1];return t?{key:t,ctrl:s.includes("ctrl"),shift:s.includes("shift"),alt:s.includes("alt"),super:s.includes("super")}:null}function ee(e,s){let t=Ft(s);if(!t)return!1;let{key:i,ctrl:o,shift:r,alt:a,super:c}=t,n=0;switch(r&&(n|=p.shift),a&&(n|=p.alt),o&&(n|=p.ctrl),c&&(n|=p.super),i){case"escape":case"esc":return n!==0?!1:e==="\x1B"||m(e,S.escape,0)||K(e,S.escape,0);case"space":return!V&&(n===p.ctrl&&e==="\0"||n===p.alt&&e==="\x1B ")?!0:n===0?e===" "||m(e,S.space,0)||K(e,S.space,0):m(e,S.space,n)||K(e,S.space,n);case"tab":return n===p.shift?e==="\x1B[Z"||m(e,S.tab,p.shift)||K(e,S.tab,p.shift):n===0?e===" "||m(e,S.tab,0):m(e,S.tab,n)||K(e,S.tab,n);case"enter":case"return":return n===p.shift?m(e,S.enter,p.shift)||m(e,S.kpEnter,p.shift)||K(e,S.enter,p.shift)?!0:V?e==="\x1B\r"||e===`
1
+ var Ie=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(s,t)=>(typeof require<"u"?require:s)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{eastAsianWidth as Je}from"get-east-asian-width";var U=new Intl.Segmenter(void 0,{granularity:"grapheme"});function de(){return U}function Tt(e){let s=e.codePointAt(0);return s>=126976&&s<=130047||s>=8960&&s<=9215||s>=9728&&s<=10175||s>=11088&&s<=11093||e.includes("\uFE0F")||e.length>2}var At=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),Mt=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Pt=new RegExp("^\\p{RGI_Emoji}$","v"),Rt=512,ee=new Map;function Me(e){for(let s=0;s<e.length;s++){let t=e.charCodeAt(s);if(t<32||t>126)return!1}return!0}function Et(e,s){if(s<=0||e.length===0)return{text:"",width:0};if(Me(e)){let n=e.slice(0,s);return{text:n,width:n.length}}let t=e.includes("\x1B"),i=e.includes(" ");if(!t&&!i){let n="",l=0;for(let{segment:h}of U.segment(e)){let u=z(h);if(l+u>s)break;n+=h,l+=u}return{text:n,width:l}}let o="",r=0,a=0,c="";for(;a<e.length;){let n=F(e,a);if(n){c+=n.code,a+=n.length;continue}if(e[a]===" "){if(r+3>s)break;c&&(o+=c,c=""),o+=" ",r+=3,a++;continue}let l=a;for(;l<e.length&&e[l]!==" "&&!F(e,l);)l++;for(let{segment:h}of U.segment(e.slice(a,l))){let u=z(h);if(r+u>s)return{text:o,width:r};c&&(o+=c,c=""),o+=h,r+=u}a=l}return{text:o,width:r}}function ke(e,s,t,i,o,r){let a="\x1B[0m",c=s+i,n;return t.length>0?n=`${e}${a}${t}${a}`:n=`${e}${a}`,r?n+" ".repeat(Math.max(0,o-c)):n}function z(e){if(At.test(e))return 0;if(Tt(e)&&Pt.test(e))return 2;let t=e.replace(Mt,"").codePointAt(0);if(t===void 0)return 0;if(t>=127462&&t<=127487)return 2;let i=Je(t);if(e.length>1)for(let o of e.slice(1)){let r=o.codePointAt(0);r>=65280&&r<=65519?i+=Je(r):(r===3635||r===3763)&&(i+=1)}return i}function _(e){if(e.length===0)return 0;if(Me(e))return e.length;let s=ee.get(e);if(s!==void 0)return s;let t=e;if(e.includes(" ")&&(t=t.replace(/\t/g," ")),t.includes("\x1B")){let o="",r=0;for(;r<t.length;){let a=F(t,r);if(a){r+=a.length;continue}o+=t[r],r++}t=o}let i=0;for(let{segment:o}of U.segment(t))i+=z(o);if(ee.size>=Rt){let o=ee.keys().next().value;o!==void 0&&ee.delete(o)}return ee.set(e,i),i}var $t=/[\u0e33\u0eb3]/,Ot=/[\u0e33\u0eb3]/g;function Ze(e){return $t.test(e)?e.replace(Ot,s=>s==="\u0E33"?"\u0E4D\u0E32":"\u0ECD\u0EB2"):e}function F(e,s){if(s>=e.length||e[s]!=="\x1B")return null;let t=e[s+1];if(t==="["){let i=s+2;for(;i<e.length&&!/[mGKHJ]/.test(e[i]);)i++;return i<e.length?{code:e.substring(s,i+1),length:i+1-s}:null}if(t==="]"){let i=s+2;for(;i<e.length;){if(e[i]==="\x07")return{code:e.substring(s,i+1),length:i+1-s};if(e[i]==="\x1B"&&e[i+1]==="\\")return{code:e.substring(s,i+2),length:i+2-s};i++}return null}if(t==="_"){let i=s+2;for(;i<e.length;){if(e[i]==="\x07")return{code:e.substring(s,i+1),length:i+1-s};if(e[i]==="\x1B"&&e[i+1]==="\\")return{code:e.substring(s,i+2),length:i+2-s};i++}return null}return null}var Ae=class{constructor(){this.bold=!1;this.dim=!1;this.italic=!1;this.underline=!1;this.blink=!1;this.inverse=!1;this.hidden=!1;this.strikethrough=!1;this.fgColor=null;this.bgColor=null;this.activeHyperlink=null}process(s){if(s.startsWith("\x1B]8;")){let a=s.match(/^\x1b\]8;[^;]*;([^\x1b\x07]*)/);this.activeHyperlink=a?.[1]?a[1]:null;return}if(!s.endsWith("m"))return;let t=s.match(/\x1b\[([\d;]*)m/);if(!t)return;let i=t[1];if(i===""||i==="0"){this.reset();return}let o=i.split(";"),r=0;for(;r<o.length;){let a=Number.parseInt(o[r],10);if(a===38||a===48){if(o[r+1]==="5"&&o[r+2]!==void 0){let c=`${o[r]};${o[r+1]};${o[r+2]}`;a===38?this.fgColor=c:this.bgColor=c,r+=3;continue}else if(o[r+1]==="2"&&o[r+4]!==void 0){let c=`${o[r]};${o[r+1]};${o[r+2]};${o[r+3]};${o[r+4]}`;a===38?this.fgColor=c:this.bgColor=c,r+=5;continue}}switch(a){case 0:this.reset();break;case 1:this.bold=!0;break;case 2:this.dim=!0;break;case 3:this.italic=!0;break;case 4:this.underline=!0;break;case 5:this.blink=!0;break;case 7:this.inverse=!0;break;case 8:this.hidden=!0;break;case 9:this.strikethrough=!0;break;case 21:this.bold=!1;break;case 22:this.bold=!1,this.dim=!1;break;case 23:this.italic=!1;break;case 24:this.underline=!1;break;case 25:this.blink=!1;break;case 27:this.inverse=!1;break;case 28:this.hidden=!1;break;case 29:this.strikethrough=!1;break;case 39:this.fgColor=null;break;case 49:this.bgColor=null;break;default:a>=30&&a<=37||a>=90&&a<=97?this.fgColor=String(a):(a>=40&&a<=47||a>=100&&a<=107)&&(this.bgColor=String(a));break}r++}}reset(){this.bold=!1,this.dim=!1,this.italic=!1,this.underline=!1,this.blink=!1,this.inverse=!1,this.hidden=!1,this.strikethrough=!1,this.fgColor=null,this.bgColor=null}clear(){this.reset(),this.activeHyperlink=null}getActiveCodes(){let s=[];this.bold&&s.push("1"),this.dim&&s.push("2"),this.italic&&s.push("3"),this.underline&&s.push("4"),this.blink&&s.push("5"),this.inverse&&s.push("7"),this.hidden&&s.push("8"),this.strikethrough&&s.push("9"),this.fgColor&&s.push(this.fgColor),this.bgColor&&s.push(this.bgColor);let t=s.length>0?`\x1B[${s.join(";")}m`:"";return this.activeHyperlink&&(t+=`\x1B]8;;${this.activeHyperlink}\x1B\\`),t}hasActiveCodes(){return this.bold||this.dim||this.italic||this.underline||this.blink||this.inverse||this.hidden||this.strikethrough||this.fgColor!==null||this.bgColor!==null||this.activeHyperlink!==null}getLineEndReset(){let s="";return this.underline&&(s+="\x1B[24m"),this.activeHyperlink&&(s+="\x1B]8;;\x1B\\"),s}};function G(e,s,t="...",i=!1){if(s<=0)return"";if(e.length===0)return i?" ".repeat(s):"";let o=_(t);if(o>=s){let d=_(e);if(d<=s)return i?e+" ".repeat(s-d):e;let f=Et(t,s);return f.width===0?i?" ".repeat(s):"":ke("",0,f.text,f.width,s,i)}if(Me(e)){if(e.length<=s)return i?e+" ".repeat(s-e.length):e;let d=s-o;return ke(e.slice(0,d),d,t,o,s,i)}let r=s-o,a="",c="",n=0,l=0,h=!0,u=!1,g=!1,x=e.includes("\x1B"),b=e.includes(" ");if(!x&&!b){for(let{segment:d}of U.segment(e)){let f=z(d);if(h&&l+f<=r?(a+=d,l+=f):h=!1,n+=f,n>s){u=!0;break}}g=!u}else{let d=0;for(;d<e.length;){let f=F(e,d);if(f){c+=f.code,d+=f.length;continue}if(e[d]===" "){if(h&&l+3<=r?(c&&(a+=c,c=""),a+=" ",l+=3):(h=!1,c=""),n+=3,n>s){u=!0;break}d++;continue}let v=d;for(;v<e.length&&e[v]!==" "&&!F(e,v);)v++;for(let{segment:L}of U.segment(e.slice(d,v))){let k=z(L);if(h&&l+k<=r?(c&&(a+=c,c=""),a+=L,l+=k):(h=!1,c=""),n+=k,n>s){u=!0;break}}if(u)break;d=v}g=d>=e.length}return!u&&g?i?e+" ".repeat(Math.max(0,s-n)):e:ke(a,l,t,o,s,i)}function pe(e,s,t,i=!1){return Pe(e,s,t,i).text}function Pe(e,s,t,i=!1){if(t<=0)return{text:"",width:0};let o=s+t,r="",a=0,c=0,n=0,l="";for(;n<e.length;){let h=F(e,n);if(h){c>=s&&c<o?r+=h.code:c<s&&(l+=h.code),n+=h.length;continue}let u=n;for(;u<e.length&&!F(e,u);)u++;for(let{segment:g}of U.segment(e.slice(n,u))){let x=z(g),b=c>=s&&c<o,d=!i||c+x<=o;if(b&&d&&(l&&(r+=l,l=""),r+=g,a+=x),c+=x,c>=o)break}if(n=u,c>=o)break}return{text:r,width:a}}var Te=new Ae;function et(e,s,t,i,o=!1){let r="",a=0,c="",n=0,l=0,h=0,u="",g=!1,x=t+i;for(Te.clear();h<e.length;){let b=F(e,h);if(b){Te.process(b.code),l<s?u+=b.code:l>=t&&l<x&&g&&(c+=b.code),h+=b.length;continue}let d=h;for(;d<e.length&&!F(e,d);)d++;for(let{segment:f}of U.segment(e.slice(h,d))){let v=z(f);if(l<s?(u&&(r+=u,u=""),r+=f,a+=v):l>=t&&l<x&&(!o||l+v<=x)&&(g||(c+=Te.getActiveCodes(),g=!0),c+=f,n+=v),l+=v,i<=0?l>=s:l>=x)break}if(h=d,i<=0?l>=s:l>=x)break}return{before:r,beforeWidth:a,after:c,afterWidth:n}}var V=!1;var rt=new Set(["`","-","=","[","]","\\",";","'",",",".","/","!","@","#","$","%","^","&","*","(",")","_","+","|","~","{","}",":","<",">","?"]),p={shift:1,alt:2,ctrl:4,super:8},be=192,S={escape:27,tab:9,enter:13,space:32,backspace:127,kpEnter:57414},A={up:-1,down:-2,right:-3,left:-4},w={delete:-10,insert:-11,pageUp:-12,pageDown:-13,home:-14,end:-15},Kt=new Map([[57399,48],[57400,49],[57401,50],[57402,51],[57403,52],[57404,53],[57405,54],[57406,55],[57407,56],[57408,57],[57409,46],[57410,47],[57411,42],[57412,45],[57413,43],[57415,61],[57416,44],[57417,A.left],[57418,A.right],[57419,A.up],[57420,A.down],[57421,w.pageUp],[57422,w.pageDown],[57423,w.home],[57424,w.end],[57425,w.insert],[57426,w.delete]]);function st(e){return Kt.get(e)??e}function xe(e,s){return(s&~be&p.shift)!==0&&e>=65&&e<=90?e+32:e}var O={up:["\x1B[A","\x1BOA"],down:["\x1B[B","\x1BOB"],right:["\x1B[C","\x1BOC"],left:["\x1B[D","\x1BOD"],home:["\x1B[H","\x1BOH","\x1B[1~","\x1B[7~"],end:["\x1B[F","\x1BOF","\x1B[4~","\x1B[8~"],insert:["\x1B[2~"],delete:["\x1B[3~"],pageUp:["\x1B[5~","\x1B[[5~"],pageDown:["\x1B[6~","\x1B[[6~"],clear:["\x1B[E","\x1BOE"],f1:["\x1BOP","\x1B[11~","\x1B[[A"],f2:["\x1BOQ","\x1B[12~","\x1B[[B"],f3:["\x1BOR","\x1B[13~","\x1B[[C"],f4:["\x1BOS","\x1B[14~","\x1B[[D"],f5:["\x1B[15~","\x1B[[E"],f6:["\x1B[17~"],f7:["\x1B[18~"],f8:["\x1B[19~"],f9:["\x1B[20~"],f10:["\x1B[21~"],f11:["\x1B[23~"],f12:["\x1B[24~"]},Wt={up:["\x1B[a"],down:["\x1B[b"],right:["\x1B[c"],left:["\x1B[d"],clear:["\x1B[e"],insert:["\x1B[2$"],delete:["\x1B[3$"],pageUp:["\x1B[5$"],pageDown:["\x1B[6$"],home:["\x1B[7$"],end:["\x1B[8$"]},Dt={up:["\x1BOa"],down:["\x1BOb"],right:["\x1BOc"],left:["\x1BOd"],clear:["\x1BOe"],insert:["\x1B[2^"],delete:["\x1B[3^"],pageUp:["\x1B[5^"],pageDown:["\x1B[6^"],home:["\x1B[7^"],end:["\x1B[8^"]};var R=(e,s)=>s.includes(e),$=(e,s,t)=>t===p.shift?R(e,Wt[s]):t===p.ctrl?R(e,Dt[s]):!1,fe="press";function Re(e){return e.includes("\x1B[200~")?!1:!!(e.includes(":3u")||e.includes(":3~")||e.includes(":3A")||e.includes(":3B")||e.includes(":3C")||e.includes(":3D")||e.includes(":3H")||e.includes(":3F"))}function ge(e){if(!e)return"press";let s=parseInt(e,10);return s===2?"repeat":s===3?"release":"press"}function Bt(e){let s=e.match(/^\x1b\[(\d+)(?::(\d*))?(?::(\d+))?(?:;(\d+))?(?::(\d+))?u$/);if(s){let r=parseInt(s[1],10),a=s[2]&&s[2].length>0?parseInt(s[2],10):void 0,c=s[3]?parseInt(s[3],10):void 0,n=s[4]?parseInt(s[4],10):1,l=ge(s[5]);return fe=l,{codepoint:r,shiftedKey:a,baseLayoutKey:c,modifier:n-1,eventType:l}}let t=e.match(/^\x1b\[1;(\d+)(?::(\d+))?([ABCD])$/);if(t){let r=parseInt(t[1],10),a=ge(t[2]),c={A:-1,B:-2,C:-3,D:-4};return fe=a,{codepoint:c[t[3]],modifier:r-1,eventType:a}}let i=e.match(/^\x1b\[(\d+)(?:;(\d+))?(?::(\d+))?~$/);if(i){let r=parseInt(i[1],10),a=i[2]?parseInt(i[2],10):1,c=ge(i[3]),l={2:w.insert,3:w.delete,5:w.pageUp,6:w.pageDown,7:w.home,8:w.end}[r];if(l!==void 0)return fe=c,{codepoint:l,modifier:a-1,eventType:c}}let o=e.match(/^\x1b\[1;(\d+)(?::(\d+))?([HF])$/);if(o){let r=parseInt(o[1],10),a=ge(o[2]),c=o[3]==="H"?w.home:w.end;return fe=a,{codepoint:c,modifier:r-1,eventType:a}}return null}function m(e,s,t){let i=Bt(e);if(!i)return!1;let o=i.modifier&~be,r=t&~be;if(o!==r)return!1;let a=xe(st(i.codepoint),i.modifier),c=xe(st(s),t);if(a===c)return!0;if(i.baseLayoutKey!==void 0&&i.baseLayoutKey===s){let n=a,l=n>=97&&n<=122,h=rt.has(String.fromCharCode(n));if(!l&&!h)return!0}return!1}function ot(e){let s=e.match(/^\x1b\[27;(\d+);(\d+)~$/);if(!s)return null;let t=parseInt(s[1],10);return{codepoint:parseInt(s[2],10),modifier:t-1}}function K(e,s,t){let i=ot(e);return i?i.codepoint===s&&i.modifier===t:!1}function Ft(){return!!process.env.WT_SESSION&&!process.env.SSH_CONNECTION&&!process.env.SSH_CLIENT&&!process.env.SSH_TTY}function it(e,s){return e==="\x7F"?s===0:e!=="\b"?!1:Ft()?s===p.ctrl:s===0}function Nt(e){let s=e.toLowerCase(),t=s.charCodeAt(0);return t>=97&&t<=122||s==="["||s==="\\"||s==="]"||s==="_"?String.fromCharCode(t&31):s==="-"?"":null}function nt(e){return e>="0"&&e<="9"}function me(e,s,t){if(t===0)return!1;let i=ot(e);return!i||i.modifier!==t?!1:xe(i.codepoint,i.modifier)===xe(s,t)}function Ut(e){let s=e.toLowerCase().split("+"),t=s[s.length-1];return t?{key:t,ctrl:s.includes("ctrl"),shift:s.includes("shift"),alt:s.includes("alt"),super:s.includes("super")}:null}function te(e,s){let t=Ut(s);if(!t)return!1;let{key:i,ctrl:o,shift:r,alt:a,super:c}=t,n=0;switch(r&&(n|=p.shift),a&&(n|=p.alt),o&&(n|=p.ctrl),c&&(n|=p.super),i){case"escape":case"esc":return n!==0?!1:e==="\x1B"||m(e,S.escape,0)||K(e,S.escape,0);case"space":return!V&&(n===p.ctrl&&e==="\0"||n===p.alt&&e==="\x1B ")?!0:n===0?e===" "||m(e,S.space,0)||K(e,S.space,0):m(e,S.space,n)||K(e,S.space,n);case"tab":return n===p.shift?e==="\x1B[Z"||m(e,S.tab,p.shift)||K(e,S.tab,p.shift):n===0?e===" "||m(e,S.tab,0):m(e,S.tab,n)||K(e,S.tab,n);case"enter":case"return":return n===p.shift?m(e,S.enter,p.shift)||m(e,S.kpEnter,p.shift)||K(e,S.enter,p.shift)?!0:V?e==="\x1B\r"||e===`
2
2
  `:!1:n===p.alt?m(e,S.enter,p.alt)||m(e,S.kpEnter,p.alt)||K(e,S.enter,p.alt)?!0:V?!1:e==="\x1B\r":n===0?e==="\r"||!V&&e===`
3
- `||e==="\x1BOM"||m(e,S.enter,0)||m(e,S.kpEnter,0):m(e,S.enter,n)||m(e,S.kpEnter,n)||K(e,S.enter,n);case"backspace":return n===p.alt?e==="\x1B\x7F"||e==="\x1B\b"?!0:m(e,S.backspace,p.alt)||K(e,S.backspace,p.alt):n===p.ctrl?tt(e,p.ctrl)?!0:m(e,S.backspace,p.ctrl)||K(e,S.backspace,p.ctrl):n===0?tt(e,0)||m(e,S.backspace,0)||K(e,S.backspace,0):m(e,S.backspace,n)||K(e,S.backspace,n);case"insert":return n===0?R(e,O.insert)||m(e,w.insert,0):$(e,"insert",n)?!0:m(e,w.insert,n);case"delete":return n===0?R(e,O.delete)||m(e,w.delete,0):$(e,"delete",n)?!0:m(e,w.delete,n);case"clear":return n===0?R(e,O.clear):$(e,"clear",n);case"home":return n===0?R(e,O.home)||m(e,w.home,0):$(e,"home",n)?!0:m(e,w.home,n);case"end":return n===0?R(e,O.end)||m(e,w.end,0):$(e,"end",n)?!0:m(e,w.end,n);case"pageup":return n===0?R(e,O.pageUp)||m(e,w.pageUp,0):$(e,"pageUp",n)?!0:m(e,w.pageUp,n);case"pagedown":return n===0?R(e,O.pageDown)||m(e,w.pageDown,0):$(e,"pageDown",n)?!0:m(e,w.pageDown,n);case"up":return n===p.alt?e==="\x1Bp"||m(e,A.up,p.alt):n===0?R(e,O.up)||m(e,A.up,0):$(e,"up",n)?!0:m(e,A.up,n);case"down":return n===p.alt?e==="\x1Bn"||m(e,A.down,p.alt):n===0?R(e,O.down)||m(e,A.down,0):$(e,"down",n)?!0:m(e,A.down,n);case"left":return n===p.alt?e==="\x1B[1;3D"||!V&&e==="\x1BB"||e==="\x1Bb"||m(e,A.left,p.alt):n===p.ctrl?e==="\x1B[1;5D"||$(e,"left",p.ctrl)||m(e,A.left,p.ctrl):n===0?R(e,O.left)||m(e,A.left,0):$(e,"left",n)?!0:m(e,A.left,n);case"right":return n===p.alt?e==="\x1B[1;3C"||!V&&e==="\x1BF"||e==="\x1Bf"||m(e,A.right,p.alt):n===p.ctrl?e==="\x1B[1;5C"||$(e,"right",p.ctrl)||m(e,A.right,p.ctrl):n===0?R(e,O.right)||m(e,A.right,0):$(e,"right",n)?!0:m(e,A.right,n);case"f1":case"f2":case"f3":case"f4":case"f5":case"f6":case"f7":case"f8":case"f9":case"f10":case"f11":case"f12":return n!==0?!1:R(e,O[i])}if(i.length===1&&(i>="a"&&i<="z"||st(i)||it.has(i))){let l=i.charCodeAt(0),h=Bt(i),u=i>="a"&&i<="z",g=st(i);return n===p.ctrl+p.alt&&!V&&h&&e===`\x1B${h}`||n===p.alt&&!V&&(u||g)&&e===`\x1B${i}`?!0:n===p.ctrl?h&&e===h?!0:m(e,l,p.ctrl)||ge(e,l,p.ctrl):n===p.shift+p.ctrl?m(e,l,p.shift+p.ctrl)||ge(e,l,p.shift+p.ctrl):n===p.shift?u&&e===i.toUpperCase()?!0:m(e,l,p.shift)||ge(e,l,p.shift):n!==0?m(e,l,n)||ge(e,l,n):e===i||m(e,l,0)}return!1}var ws=p.shift|me;import*as H from"node:fs";import*as Ke from"node:os";import*as X from"node:path";import{performance as Oe}from"node:perf_hooks";var Ee=null,Vt={widthPx:9,heightPx:18};function $e(e){Vt=e}function at(){let e=process.env.TERM_PROGRAM?.toLowerCase()||"",s=process.env.TERM?.toLowerCase()||"",t=process.env.COLORTERM?.toLowerCase()||"";return!!process.env.TMUX||s.startsWith("tmux")||s.startsWith("screen")?{images:null,trueColor:t==="truecolor"||t==="24bit",hyperlinks:!1}:process.env.KITTY_WINDOW_ID||e==="kitty"?{images:"kitty",trueColor:!0,hyperlinks:!0}:e==="ghostty"||s.includes("ghostty")||process.env.GHOSTTY_RESOURCES_DIR?{images:"kitty",trueColor:!0,hyperlinks:!0}:process.env.WEZTERM_PANE||e==="wezterm"?{images:"kitty",trueColor:!0,hyperlinks:!0}:process.env.ITERM_SESSION_ID||e==="iterm.app"?{images:"iterm2",trueColor:!0,hyperlinks:!0}:e==="vscode"?{images:null,trueColor:!0,hyperlinks:!0}:e==="alacritty"?{images:null,trueColor:!0,hyperlinks:!0}:{images:null,trueColor:t==="truecolor"||t==="24bit",hyperlinks:!1}}function se(){return Ee||(Ee=at()),Ee}var rt="\x1B_G",ot="\x1B]1337;File=";function ie(e){return e.startsWith(rt)||e.startsWith(ot)?!0:e.includes(rt)||e.includes(ot)}function We(e){return e!==null&&"focused"in e}var ne="\x1B_pi:c\x07";function lt(e,s){if(e===void 0)return;if(typeof e=="number")return e;let t=e.match(/^(\d+(?:\.\d+)?)%$/);if(t)return Math.floor(s*parseFloat(t[1])/100)}function Ht(){return!!process.env.TERMUX_VERSION}var xe=class{constructor(){this.children=[]}addChild(s){this.children.push(s)}removeChild(s){let t=this.children.indexOf(s);t!==-1&&this.children.splice(t,1)}clear(){this.children=[]}invalidate(){for(let s of this.children)s.invalidate?.()}render(s){let t=[];for(let i of this.children){let o=i.render(s);for(let r of o)t.push(r)}return t}},De=class e extends xe{constructor(t,i){super();this.previousLines=[];this.previousWidth=0;this.previousHeight=0;this.focusedComponent=null;this.inputListeners=new Set;this.renderRequested=!1;this.lastRenderAt=0;this.cursorRow=0;this.hardwareCursorRow=0;this.showHardwareCursor=process.env.PI_HARDWARE_CURSOR==="1";this.clearOnShrink=process.env.PI_CLEAR_ON_SHRINK==="1";this.maxLinesRendered=0;this.previousViewportTop=0;this.fullRedrawCount=0;this.stopped=!1;this.focusOrderCounter=0;this.overlayStack=[];this.terminal=t,i!==void 0&&(this.showHardwareCursor=i)}static{this.MIN_RENDER_INTERVAL_MS=16}get fullRedraws(){return this.fullRedrawCount}getShowHardwareCursor(){return this.showHardwareCursor}setShowHardwareCursor(t){this.showHardwareCursor!==t&&(this.showHardwareCursor=t,t||this.terminal.hideCursor(),this.requestRender())}getClearOnShrink(){return this.clearOnShrink}setClearOnShrink(t){this.clearOnShrink=t}setFocus(t){We(this.focusedComponent)&&(this.focusedComponent.focused=!1),this.focusedComponent=t,We(t)&&(t.focused=!0)}showOverlay(t,i){let o={component:t,options:i,preFocus:this.focusedComponent,hidden:!1,focusOrder:++this.focusOrderCounter};return this.overlayStack.push(o),!i?.nonCapturing&&this.isOverlayVisible(o)&&this.setFocus(t),this.terminal.hideCursor(),this.requestRender(),{hide:()=>{let r=this.overlayStack.indexOf(o);if(r!==-1){if(this.overlayStack.splice(r,1),this.focusedComponent===t){let a=this.getTopmostVisibleOverlay();this.setFocus(a?.component??o.preFocus)}this.overlayStack.length===0&&this.terminal.hideCursor(),this.requestRender()}},setHidden:r=>{if(o.hidden!==r){if(o.hidden=r,r){if(this.focusedComponent===t){let a=this.getTopmostVisibleOverlay();this.setFocus(a?.component??o.preFocus)}}else!i?.nonCapturing&&this.isOverlayVisible(o)&&(o.focusOrder=++this.focusOrderCounter,this.setFocus(t));this.requestRender()}},isHidden:()=>o.hidden,focus:()=>{!this.overlayStack.includes(o)||!this.isOverlayVisible(o)||(this.focusedComponent!==t&&this.setFocus(t),o.focusOrder=++this.focusOrderCounter,this.requestRender())},unfocus:()=>{if(this.focusedComponent!==t)return;let r=this.getTopmostVisibleOverlay();this.setFocus(r&&r!==o?r.component:o.preFocus),this.requestRender()},isFocused:()=>this.focusedComponent===t}}hideOverlay(){let t=this.overlayStack.pop();if(t){if(this.focusedComponent===t.component){let i=this.getTopmostVisibleOverlay();this.setFocus(i?.component??t.preFocus)}this.overlayStack.length===0&&this.terminal.hideCursor(),this.requestRender()}}hasOverlay(){return this.overlayStack.some(t=>this.isOverlayVisible(t))}isOverlayVisible(t){return t.hidden?!1:t.options?.visible?t.options.visible(this.terminal.columns,this.terminal.rows):!0}getTopmostVisibleOverlay(){for(let t=this.overlayStack.length-1;t>=0;t--)if(!this.overlayStack[t].options?.nonCapturing&&this.isOverlayVisible(this.overlayStack[t]))return this.overlayStack[t]}invalidate(){super.invalidate();for(let t of this.overlayStack)t.component.invalidate?.()}start(){this.stopped=!1,this.terminal.start(t=>this.handleInput(t),()=>this.requestRender()),this.terminal.hideCursor(),this.queryCellSize(),this.requestRender()}addInputListener(t){return this.inputListeners.add(t),()=>{this.inputListeners.delete(t)}}removeInputListener(t){this.inputListeners.delete(t)}queryCellSize(){se().images&&this.terminal.write("\x1B[16t")}stop(){if(this.stopped=!0,this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=void 0),this.previousLines.length>0){let i=this.previousLines.length-this.hardwareCursorRow;i>0?this.terminal.write(`\x1B[${i}B`):i<0&&this.terminal.write(`\x1B[${-i}A`),this.terminal.write(`\r
4
- `)}this.terminal.showCursor(),this.terminal.stop()}requestRender(t=!1){if(t){this.previousLines=[],this.previousWidth=-1,this.previousHeight=-1,this.cursorRow=0,this.hardwareCursorRow=0,this.maxLinesRendered=0,this.previousViewportTop=0,this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=void 0),this.renderRequested=!0,process.nextTick(()=>{this.stopped||!this.renderRequested||(this.renderRequested=!1,this.lastRenderAt=Oe.now(),this.doRender())});return}this.renderRequested||(this.renderRequested=!0,process.nextTick(()=>this.scheduleRender()))}scheduleRender(){if(this.stopped||this.renderTimer||!this.renderRequested)return;let t=Oe.now()-this.lastRenderAt,i=Math.max(0,e.MIN_RENDER_INTERVAL_MS-t);this.renderTimer=setTimeout(()=>{this.renderTimer=void 0,!(this.stopped||!this.renderRequested)&&(this.renderRequested=!1,this.lastRenderAt=Oe.now(),this.doRender(),this.renderRequested&&this.scheduleRender())},i)}handleInput(t){if(this.inputListeners.size>0){let o=t;for(let r of this.inputListeners){let a=r(o);if(a?.consume)return;a?.data!==void 0&&(o=a.data)}if(o.length===0)return;t=o}if(this.consumeCellSizeResponse(t))return;if(ee(t,"shift+ctrl+d")&&this.onDebug){this.onDebug();return}let i=this.overlayStack.find(o=>o.component===this.focusedComponent);if(i&&!this.isOverlayVisible(i)){let o=this.getTopmostVisibleOverlay();o?this.setFocus(o.component):this.setFocus(i.preFocus)}if(this.focusedComponent?.handleInput){if(Pe(t)&&!this.focusedComponent.wantsKeyRelease)return;this.focusedComponent.handleInput(t),this.requestRender()}}consumeCellSizeResponse(t){let i=t.match(/^\x1b\[6;(\d+);(\d+)t$/);if(!i)return!1;let o=parseInt(i[1],10),r=parseInt(i[2],10);return o<=0||r<=0||($e({widthPx:r,heightPx:o}),this.invalidate(),this.requestRender()),!0}resolveOverlayLayout(t,i,o,r){let a=t??{},c=typeof a.margin=="number"?{top:a.margin,right:a.margin,bottom:a.margin,left:a.margin}:a.margin??{},n=Math.max(0,c.top??0),l=Math.max(0,c.right??0),h=Math.max(0,c.bottom??0),u=Math.max(0,c.left??0),g=Math.max(1,o-u-l),b=Math.max(1,r-n-h),x=lt(a.width,o)??Math.min(80,g);a.minWidth!==void 0&&(x=Math.max(x,a.minWidth)),x=Math.max(1,Math.min(x,g));let d=lt(a.maxHeight,r);d!==void 0&&(d=Math.max(1,Math.min(d,b)));let f=d!==void 0?Math.min(i,d):i,y,L;if(a.row!==void 0)if(typeof a.row=="string"){let k=a.row.match(/^(\d+(?:\.\d+)?)%$/);if(k){let D=Math.max(0,b-f),I=parseFloat(k[1])/100;y=n+Math.floor(D*I)}else y=this.resolveAnchorRow("center",f,b,n)}else y=a.row;else{let k=a.anchor??"center";y=this.resolveAnchorRow(k,f,b,n)}if(a.col!==void 0)if(typeof a.col=="string"){let k=a.col.match(/^(\d+(?:\.\d+)?)%$/);if(k){let D=Math.max(0,g-x),I=parseFloat(k[1])/100;L=u+Math.floor(D*I)}else L=this.resolveAnchorCol("center",x,g,u)}else L=a.col;else{let k=a.anchor??"center";L=this.resolveAnchorCol(k,x,g,u)}return a.offsetY!==void 0&&(y+=a.offsetY),a.offsetX!==void 0&&(L+=a.offsetX),y=Math.max(n,Math.min(y,r-h-f)),L=Math.max(u,Math.min(L,o-l-x)),{width:x,row:y,col:L,maxHeight:d}}resolveAnchorRow(t,i,o,r){switch(t){case"top-left":case"top-center":case"top-right":return r;case"bottom-left":case"bottom-center":case"bottom-right":return r+o-i;case"left-center":case"center":case"right-center":return r+Math.floor((o-i)/2)}}resolveAnchorCol(t,i,o,r){switch(t){case"top-left":case"left-center":case"bottom-left":return r;case"top-right":case"right-center":case"bottom-right":return r+o-i;case"top-center":case"center":case"bottom-center":return r+Math.floor((o-i)/2)}}compositeOverlays(t,i,o){if(this.overlayStack.length===0)return t;let r=[...t],a=[],c=r.length,n=this.overlayStack.filter(u=>this.isOverlayVisible(u));n.sort((u,g)=>u.focusOrder-g.focusOrder);for(let u of n){let{component:g,options:b}=u,{width:x,maxHeight:d}=this.resolveOverlayLayout(b,0,i,o),f=g.render(x);d!==void 0&&f.length>d&&(f=f.slice(0,d));let{row:y,col:L}=this.resolveOverlayLayout(b,f.length,i,o);a.push({overlayLines:f,row:y,col:L,w:x}),c=Math.max(c,y+f.length)}let l=Math.max(r.length,o,c);for(;r.length<l;)r.push("");let h=Math.max(0,l-o);for(let{overlayLines:u,row:g,col:b,w:x}of a)for(let d=0;d<u.length;d++){let f=h+g+d;if(f>=0&&f<r.length){let y=_(u[d])>x?de(u[d],0,x,!0):u[d];r[f]=this.compositeLineAt(r[f],y,b,x,i)}}return r}static{this.SEGMENT_RESET="\x1B[0m\x1B]8;;\x07"}applyLineResets(t){let i=e.SEGMENT_RESET;for(let o=0;o<t.length;o++){let r=t[o];ie(r)||(t[o]=Qe(r)+i)}return t}compositeLineAt(t,i,o,r,a){if(ie(t))return t;let c=o+r,n=Je(t,o,c,a-c,!0),l=Me(i,0,r,!0),h=Math.max(0,o-n.beforeWidth),u=Math.max(0,r-l.width),g=Math.max(o,n.beforeWidth),b=Math.max(r,l.width),x=Math.max(0,a-g-b),d=Math.max(0,x-n.afterWidth),f=e.SEGMENT_RESET,y=n.before+" ".repeat(h)+f+l.text+" ".repeat(u)+f+n.after+" ".repeat(d);return _(y)<=a?y:de(y,0,a,!0)}extractCursorPosition(t,i){let o=Math.max(0,t.length-i);for(let r=t.length-1;r>=o;r--){let a=t[r],c=a.indexOf(ne);if(c!==-1){let n=a.slice(0,c),l=_(n);return t[r]=a.slice(0,c)+a.slice(c+ne.length),{row:r,col:l}}}return null}doRender(){if(this.stopped)return;let t=this.terminal.columns,i=this.terminal.rows,o=this.previousWidth!==0&&this.previousWidth!==t,r=this.previousHeight!==0&&this.previousHeight!==i,a=this.previousHeight>0?this.previousViewportTop+this.previousHeight:i,c=r?Math.max(0,a-i):this.previousViewportTop,n=c,l=this.hardwareCursorRow,h=v=>{let C=l-c;return v-n-C},u=this.render(t);this.overlayStack.length>0&&(u=this.compositeOverlays(u,t,i));let g=this.extractCursorPosition(u,i);u=this.applyLineResets(u);let b=v=>{this.fullRedrawCount+=1;let C="\x1B[?2026h";v&&(C+="\x1B[2J\x1B[H\x1B[3J");for(let M=0;M<u.length;M++)M>0&&(C+=`\r
5
- `),C+=u[M];C+="\x1B[?2026l",this.terminal.write(C),this.cursorRow=Math.max(0,u.length-1),this.hardwareCursorRow=this.cursorRow,v?this.maxLinesRendered=u.length:this.maxLinesRendered=Math.max(this.maxLinesRendered,u.length);let T=Math.max(i,u.length);this.previousViewportTop=Math.max(0,T-i),this.positionHardwareCursor(g,u.length),this.previousLines=u,this.previousWidth=t,this.previousHeight=i},x=process.env.PI_DEBUG_REDRAW==="1",d=v=>{if(!x)return;let C=X.join(Ke.homedir(),".sling","agent","sling-debug.log"),T=`[${new Date().toISOString()}] fullRender: ${v} (prev=${this.previousLines.length}, new=${u.length}, height=${i})
6
- `;H.appendFileSync(C,T)};if(this.previousLines.length===0&&!o&&!r){d("first render"),b(!1);return}if(o){d(`terminal width changed (${this.previousWidth} -> ${t})`),b(!0);return}if(r&&!Ht()){d(`terminal height changed (${this.previousHeight} -> ${i})`),b(!0);return}if(this.clearOnShrink&&u.length<this.maxLinesRendered&&this.overlayStack.length===0){d(`clearOnShrink (maxLinesRendered=${this.maxLinesRendered})`),b(!0);return}let f=-1,y=-1,L=Math.max(u.length,this.previousLines.length);for(let v=0;v<L;v++){let C=v<this.previousLines.length?this.previousLines[v]:"",T=v<u.length?u[v]:"";C!==T&&(f===-1&&(f=v),y=v)}let k=u.length>this.previousLines.length;k&&(f===-1&&(f=this.previousLines.length),y=u.length-1);let D=k&&f===this.previousLines.length&&f>0;if(f===-1){this.positionHardwareCursor(g,u.length),this.previousViewportTop=c,this.previousHeight=i;return}if(f>=u.length){if(this.previousLines.length>u.length){let v="\x1B[?2026h",C=Math.max(0,u.length-1);if(C<c){d(`deleted lines moved viewport up (${C} < ${c})`),b(!0);return}let T=h(C);T>0?v+=`\x1B[${T}B`:T<0&&(v+=`\x1B[${-T}A`),v+="\r";let M=this.previousLines.length-u.length;if(M>i){d(`extraLines > height (${M} > ${i})`),b(!0);return}M>0&&(v+="\x1B[1B");for(let J=0;J<M;J++)v+="\r\x1B[2K",J<M-1&&(v+="\x1B[1B");M>0&&(v+=`\x1B[${M}A`),v+="\x1B[?2026l",this.terminal.write(v),this.cursorRow=C,this.hardwareCursorRow=C}this.positionHardwareCursor(g,u.length),this.previousLines=u,this.previousWidth=t,this.previousHeight=i,this.previousViewportTop=c;return}if(f<c){d(`firstChanged < viewportTop (${f} < ${c})`),b(!0);return}let I="\x1B[?2026h",Q=c+i-1,Y=D?f-1:f;if(Y>Q){let v=Math.max(0,Math.min(i-1,l-c)),C=i-1-v;C>0&&(I+=`\x1B[${C}B`);let T=Y-Q;I+=`\r
7
- `.repeat(T),c+=T,n+=T,l=Y}let E=h(Y);E>0?I+=`\x1B[${E}B`:E<0&&(I+=`\x1B[${-E}A`),I+=D?`\r
8
- `:"\r";let B=Math.min(y,u.length-1);for(let v=f;v<=B;v++){v>f&&(I+=`\r
9
- `),I+="\x1B[2K";let C=u[v];if(!ie(C)&&_(C)>t){let M=X.join(Ke.homedir(),".sling","agent","sling-crash.log"),J=[`Crash at ${new Date().toISOString()}`,`Terminal width: ${t}`,`Line ${v} visible width: ${_(C)}`,"","=== All rendered lines ===",...u.map((Ge,Lt)=>`[${Lt}] (w=${_(Ge)}) ${Ge}`),""].join(`
10
- `);H.mkdirSync(X.dirname(M),{recursive:!0}),H.writeFileSync(M,J),this.stop();let _t=[`Rendered line ${v} exceeds terminal width (${_(C)} > ${t}).`,"","This is likely caused by a custom TUI component not truncating its output.","Use visibleWidth() to measure and truncateToWidth() to truncate lines.","",`Debug log written to: ${M}`].join(`
11
- `);throw new Error(_t)}I+=C}let ue=B;if(this.previousLines.length>u.length){if(B<u.length-1){let C=u.length-1-B;I+=`\x1B[${C}B`,ue=u.length-1}let v=this.previousLines.length-u.length;for(let C=u.length;C<this.previousLines.length;C++)I+=`\r
12
- \x1B[2K`;I+=`\x1B[${v}A`}if(I+="\x1B[?2026l",process.env.PI_TUI_DEBUG==="1"){let v="/tmp/tui";H.mkdirSync(v,{recursive:!0});let C=X.join(v,`render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`),T=[`firstChanged: ${f}`,`viewportTop: ${n}`,`cursorRow: ${this.cursorRow}`,`height: ${i}`,`lineDiff: ${E}`,`hardwareCursorRow: ${l}`,`renderEnd: ${B}`,`finalCursorRow: ${ue}`,`cursorPos: ${JSON.stringify(g)}`,`newLines.length: ${u.length}`,`previousLines.length: ${this.previousLines.length}`,"","=== newLines ===",JSON.stringify(u,null,2),"","=== previousLines ===",JSON.stringify(this.previousLines,null,2),"","=== buffer ===",JSON.stringify(I)].join(`
13
- `);H.writeFileSync(C,T)}this.terminal.write(I),this.cursorRow=Math.max(0,u.length-1),this.hardwareCursorRow=ue,this.maxLinesRendered=Math.max(this.maxLinesRendered,u.length),this.previousViewportTop=Math.max(c,ue-i+1),this.positionHardwareCursor(g,u.length),this.previousLines=u,this.previousWidth=t,this.previousHeight=i}positionHardwareCursor(t,i){if(!t||i<=0){this.terminal.hideCursor();return}let o=Math.max(0,Math.min(t.row,i-1)),r=Math.max(0,t.col),a=o-this.hardwareCursorRow,c="";a>0?c+=`\x1B[${a}B`:a<0&&(c+=`\x1B[${-a}A`),c+=`\x1B[${r+1}G`,c&&this.terminal.write(c),this.hardwareCursorRow=o,this.showHardwareCursor?this.terminal.showCursor():this.terminal.hideCursor()}};var Zs=he();var ci=he();import{Marked as ts,Tokenizer as ss}from"marked";var is=/^(~~)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,Be=class extends ss{del(s){let t=is.exec(s);if(!t)return;let i=t[2];return{type:"del",raw:t[0],text:i,tokens:this.lexer.inlineTokens(i)}}},ns=new ts;ns.setOptions({tokenizer:new Be});import{createRequire as ls}from"node:module";var ki=ls(import.meta.url);var ct="https://slingshot.sapientaiproducts.com/web/ai-auth-ui/login?client=desktop&source=publicis-groupe-msft&app_name=aipp&redirect_url=http://localhost:3269/callback",ut="https://slingshot.sapientaiproducts.com/api/v1/ai-auth/auth/user/refreshtoken?client=desktop&source=publicis-groupe-msft&app_name=aipp",ht="https://sapientaiproducts.com/api/v1/llm",dt="https://slingshot.sapientaiproducts.com/api/v1/ai-portal/sage_events";var pt="fa8121c4-e2fc-48f1-9478-8949c04e13cc",ft="6e5756eb-d7e2-4d80-ad07-9d7a51600d85",gt="b97fbef7-cad9-4e56-9850-39e86c8fdf61";function re(e){try{let s=e.split(".");if(s.length!==3)return 0;let t=JSON.parse(atob(s[1]));return t.exp?t.exp*1e3:0}catch{return 0}}function ve(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let s=Math.random()*16|0;return(e==="x"?s:s&3|8).toString(16)})}function mt(){return`user_${ve()}`}var oe=null,Ne=null;typeof process<"u"&&process.versions?.node&&(Ne=import("node:http").then(e=>{oe=e.createServer}));async function cs(){if(oe||(Ne&&await Ne,oe))return oe;throw new Error("Slingshot OAuth requires Node.js")}async function bt(e){let s=await cs();return new Promise((t,i)=>{let o=!1,r=s((c,n)=>{let l=new URL(c.url||"",`http://localhost:${3269}`);if(l.pathname!=="/callback"){n.writeHead(404,{"Content-Type":"text/plain"}),n.end("Not found");return}let h=l.searchParams.get("at")||l.searchParams.get("token")||l.searchParams.get("access_token"),u=l.searchParams.get("rt")||l.searchParams.get("refresh_token"),g=l.searchParams.get("error"),b=l.searchParams.get("error_description"),x=l.searchParams.get("x-project-id")||void 0,d=l.searchParams.get("x-workspace-id")||void 0;if(g){n.writeHead(400,{"Content-Type":"text/html"}),n.end(`<html><body><h1>Login Failed</h1><p>${b||g}</p><p>You can close this window.</p></body></html>`),o||(o=!0,r.close(),i(new Error(`Login failed: ${b||g}`)));return}if(!h){n.writeHead(400,{"Content-Type":"text/html"}),n.end("<html><body><h1>Login Failed</h1><p>No token received.</p><p>You can close this window.</p></body></html>"),o||(o=!0,r.close(),i(new Error("No access token received")));return}n.writeHead(200,{"Content-Type":"text/html"}),n.end("<html><body><h1>Login Successful</h1><p>You can close this window and return to your terminal.</p><script>setTimeout(()=>window.close(),3000)</script></body></html>"),o||(o=!0,r.close(),t({accessToken:h,refreshToken:u||"",projectId:x,workspaceId:d}))});r.listen(3269,()=>{}),r.on("error",c=>{o||(o=!0,i(c.code==="EADDRINUSE"?new Error(`Port ${3269} is already in use`):c))});let a=setTimeout(()=>{o||(o=!0,r.close(),i(new Error("Login timeout - no callback received within 5 minutes")))},300*1e3);e&&e.addEventListener("abort",()=>{clearTimeout(a),o||(o=!0,r.close(),i(new Error("Login cancelled")))}),r.on("close",()=>clearTimeout(a))})}async function Ue(e){let s=process.env.SLINGSHOT_TOKEN;if(s){let r=re(s);return console.log("Using Slingshot token from SLINGSHOT_TOKEN environment variable"),{refresh:"",access:s,expires:r>0?r-3e5:Date.now()+10800*1e3,projectId:process.env.SLINGSHOT_PROJECT_ID,workspaceId:process.env.SLINGSHOT_WORKSPACE_ID}}let t=bt(e.signal);e.onAuth({url:ct});let i;if(e.onManualCodeInput){let r=e.onManualCodeInput().then(a=>{let c=new URL(a),n=c.searchParams.get("at")||c.searchParams.get("token")||c.searchParams.get("access_token"),l=c.searchParams.get("rt")||c.searchParams.get("refresh_token");if(!n)throw new Error("No access token found in pasted URL");return{accessToken:n,refreshToken:l||"",projectId:c.searchParams.get("x-project-id")||void 0,workspaceId:c.searchParams.get("x-workspace-id")||void 0}});i=await Promise.race([t,r])}else i=await t;let o=re(i.accessToken);return{refresh:i.refreshToken,access:i.accessToken,expires:o>0?o-3e5:Date.now()+10800*1e3,projectId:i.projectId,workspaceId:i.workspaceId}}import{randomUUID as us}from"node:crypto";async function Ce(e){if(!e.refresh)throw new Error("No refresh token available. Please login again.");let s=!1,t=us(),i={accept:"application/json",rt:e.refresh,"trace-id":t};s&&process.env.APP_KEY&&(i["app-key"]=process.env.APP_KEY);let o;try{o=await fetch(ut,{headers:i})}catch(c){let n=c instanceof Error?c.message:String(c);throw new Error(`Cannot reach Slingshot server: ${n}`)}if(!o.ok){let c=`${o.status} ${o.statusText}`;try{let n=await o.json();n.message?c=String(n.message):n.error&&(c=String(n.error))}catch{}throw new Error(`Token refresh failed: ${c}`)}let r=await o.json();if(!r.accessToken)throw new Error("No access token in refresh response");let a=re(r.accessToken);return{refresh:r.refreshToken||e.refresh,access:r.accessToken,expires:a>0?a-3e5:Date.now()+10800*1e3,projectId:e.projectId,workspaceId:e.workspaceId}}var xt=[{id:"claude-opus-4@20250514",name:"Claude Opus 4",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3},{id:"claude-sonnet-4@20250514",name:"Claude Sonnet 4",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},{id:"claude-sonnet-4-5@20250929",name:"Claude Sonnet 4.5",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3},{id:"claude-opus-4-6",name:"Claude Opus 4.6",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3},{id:"gpt-5",name:"GPT-5",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5-mini",name:"GPT-5 Mini",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5-nano",name:"GPT-5 Nano",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5.1",name:"GPT-5.1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5.2",name:"GPT-5.2",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-4.1",name:"GPT-4.1",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768},{id:"o3",name:"O3",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},{id:"o3-mini",name:"o3-mini",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},{id:"o4-mini",name:"o4-mini",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.28,cacheWrite:0},contextWindow:2e5,maxTokens:1e5}];var N=null,q=null,Ve=process.env.SLINGSHOT_DEBUG==="true";function W(){return Ve}function vt(e){Ve=e,e?He():N=null}function yt(){return N}function He(){if(Ve)try{if(typeof process<"u"&&process.versions?.node){q=Le("fs");let e=Le("path"),s=Le("os"),t=process.env.SLINGSHOT_LOG_DIR||e.join(s.homedir(),".sling"),i=e.join(t,"logs","analytics");q.existsSync(i)||q.mkdirSync(i,{recursive:!0});let o=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);N=e.join(i,`${o}.log`);let r=`
3
+ `||e==="\x1BOM"||m(e,S.enter,0)||m(e,S.kpEnter,0):m(e,S.enter,n)||m(e,S.kpEnter,n)||K(e,S.enter,n);case"backspace":return n===p.alt?e==="\x1B\x7F"||e==="\x1B\b"?!0:m(e,S.backspace,p.alt)||K(e,S.backspace,p.alt):n===p.ctrl?it(e,p.ctrl)?!0:m(e,S.backspace,p.ctrl)||K(e,S.backspace,p.ctrl):n===0?it(e,0)||m(e,S.backspace,0)||K(e,S.backspace,0):m(e,S.backspace,n)||K(e,S.backspace,n);case"insert":return n===0?R(e,O.insert)||m(e,w.insert,0):$(e,"insert",n)?!0:m(e,w.insert,n);case"delete":return n===0?R(e,O.delete)||m(e,w.delete,0):$(e,"delete",n)?!0:m(e,w.delete,n);case"clear":return n===0?R(e,O.clear):$(e,"clear",n);case"home":return n===0?R(e,O.home)||m(e,w.home,0):$(e,"home",n)?!0:m(e,w.home,n);case"end":return n===0?R(e,O.end)||m(e,w.end,0):$(e,"end",n)?!0:m(e,w.end,n);case"pageup":return n===0?R(e,O.pageUp)||m(e,w.pageUp,0):$(e,"pageUp",n)?!0:m(e,w.pageUp,n);case"pagedown":return n===0?R(e,O.pageDown)||m(e,w.pageDown,0):$(e,"pageDown",n)?!0:m(e,w.pageDown,n);case"up":return n===p.alt?e==="\x1Bp"||m(e,A.up,p.alt):n===0?R(e,O.up)||m(e,A.up,0):$(e,"up",n)?!0:m(e,A.up,n);case"down":return n===p.alt?e==="\x1Bn"||m(e,A.down,p.alt):n===0?R(e,O.down)||m(e,A.down,0):$(e,"down",n)?!0:m(e,A.down,n);case"left":return n===p.alt?e==="\x1B[1;3D"||!V&&e==="\x1BB"||e==="\x1Bb"||m(e,A.left,p.alt):n===p.ctrl?e==="\x1B[1;5D"||$(e,"left",p.ctrl)||m(e,A.left,p.ctrl):n===0?R(e,O.left)||m(e,A.left,0):$(e,"left",n)?!0:m(e,A.left,n);case"right":return n===p.alt?e==="\x1B[1;3C"||!V&&e==="\x1BF"||e==="\x1Bf"||m(e,A.right,p.alt):n===p.ctrl?e==="\x1B[1;5C"||$(e,"right",p.ctrl)||m(e,A.right,p.ctrl):n===0?R(e,O.right)||m(e,A.right,0):$(e,"right",n)?!0:m(e,A.right,n);case"f1":case"f2":case"f3":case"f4":case"f5":case"f6":case"f7":case"f8":case"f9":case"f10":case"f11":case"f12":return n!==0?!1:R(e,O[i])}if(i.length===1&&(i>="a"&&i<="z"||nt(i)||rt.has(i))){let l=i.charCodeAt(0),h=Nt(i),u=i>="a"&&i<="z",g=nt(i);return n===p.ctrl+p.alt&&!V&&h&&e===`\x1B${h}`||n===p.alt&&!V&&(u||g)&&e===`\x1B${i}`?!0:n===p.ctrl?h&&e===h?!0:m(e,l,p.ctrl)||me(e,l,p.ctrl):n===p.shift+p.ctrl?m(e,l,p.shift+p.ctrl)||me(e,l,p.shift+p.ctrl):n===p.shift?u&&e===i.toUpperCase()?!0:m(e,l,p.shift)||me(e,l,p.shift):n!==0?m(e,l,n)||me(e,l,n):e===i||m(e,l,0)}return!1}var ks=p.shift|be;import*as H from"node:fs";import*as We from"node:os";import*as Q from"node:path";import{performance as Ke}from"node:perf_hooks";var $e=null,jt={widthPx:9,heightPx:18};function Oe(e){jt=e}function ct(){let e=process.env.TERM_PROGRAM?.toLowerCase()||"",s=process.env.TERM?.toLowerCase()||"",t=process.env.COLORTERM?.toLowerCase()||"";return!!process.env.TMUX||s.startsWith("tmux")||s.startsWith("screen")?{images:null,trueColor:t==="truecolor"||t==="24bit",hyperlinks:!1}:process.env.KITTY_WINDOW_ID||e==="kitty"?{images:"kitty",trueColor:!0,hyperlinks:!0}:e==="ghostty"||s.includes("ghostty")||process.env.GHOSTTY_RESOURCES_DIR?{images:"kitty",trueColor:!0,hyperlinks:!0}:process.env.WEZTERM_PANE||e==="wezterm"?{images:"kitty",trueColor:!0,hyperlinks:!0}:process.env.ITERM_SESSION_ID||e==="iterm.app"?{images:"iterm2",trueColor:!0,hyperlinks:!0}:e==="vscode"?{images:null,trueColor:!0,hyperlinks:!0}:e==="alacritty"?{images:null,trueColor:!0,hyperlinks:!0}:{images:null,trueColor:t==="truecolor"||t==="24bit",hyperlinks:!1}}function ie(){return $e||($e=ct()),$e}var at="\x1B_G",lt="\x1B]1337;File=";function ne(e){return e.startsWith(at)||e.startsWith(lt)?!0:e.includes(at)||e.includes(lt)}function De(e){return e!==null&&"focused"in e}var re="\x1B_pi:c\x07";function ut(e,s){if(e===void 0)return;if(typeof e=="number")return e;let t=e.match(/^(\d+(?:\.\d+)?)%$/);if(t)return Math.floor(s*parseFloat(t[1])/100)}function qt(){return!!process.env.TERMUX_VERSION}var ve=class{constructor(){this.children=[]}addChild(s){this.children.push(s)}removeChild(s){let t=this.children.indexOf(s);t!==-1&&this.children.splice(t,1)}clear(){this.children=[]}invalidate(){for(let s of this.children)s.invalidate?.()}render(s){let t=[];for(let i of this.children){let o=i.render(s);for(let r of o)t.push(r)}return t}},Be=class e extends ve{constructor(t,i){super();this.previousLines=[];this.previousWidth=0;this.previousHeight=0;this.focusedComponent=null;this.inputListeners=new Set;this.renderRequested=!1;this.lastRenderAt=0;this.cursorRow=0;this.hardwareCursorRow=0;this.showHardwareCursor=process.env.PI_HARDWARE_CURSOR==="1";this.clearOnShrink=process.env.PI_CLEAR_ON_SHRINK==="1";this.maxLinesRendered=0;this.previousViewportTop=0;this.fullRedrawCount=0;this.stopped=!1;this.focusOrderCounter=0;this.overlayStack=[];this.terminal=t,i!==void 0&&(this.showHardwareCursor=i)}static{this.MIN_RENDER_INTERVAL_MS=16}get fullRedraws(){return this.fullRedrawCount}getShowHardwareCursor(){return this.showHardwareCursor}setShowHardwareCursor(t){this.showHardwareCursor!==t&&(this.showHardwareCursor=t,t||this.terminal.hideCursor(),this.requestRender())}getClearOnShrink(){return this.clearOnShrink}setClearOnShrink(t){this.clearOnShrink=t}setFocus(t){De(this.focusedComponent)&&(this.focusedComponent.focused=!1),this.focusedComponent=t,De(t)&&(t.focused=!0)}showOverlay(t,i){let o={component:t,options:i,preFocus:this.focusedComponent,hidden:!1,focusOrder:++this.focusOrderCounter};return this.overlayStack.push(o),!i?.nonCapturing&&this.isOverlayVisible(o)&&this.setFocus(t),this.terminal.hideCursor(),this.requestRender(),{hide:()=>{let r=this.overlayStack.indexOf(o);if(r!==-1){if(this.overlayStack.splice(r,1),this.focusedComponent===t){let a=this.getTopmostVisibleOverlay();this.setFocus(a?.component??o.preFocus)}this.overlayStack.length===0&&this.terminal.hideCursor(),this.requestRender()}},setHidden:r=>{if(o.hidden!==r){if(o.hidden=r,r){if(this.focusedComponent===t){let a=this.getTopmostVisibleOverlay();this.setFocus(a?.component??o.preFocus)}}else!i?.nonCapturing&&this.isOverlayVisible(o)&&(o.focusOrder=++this.focusOrderCounter,this.setFocus(t));this.requestRender()}},isHidden:()=>o.hidden,focus:()=>{!this.overlayStack.includes(o)||!this.isOverlayVisible(o)||(this.focusedComponent!==t&&this.setFocus(t),o.focusOrder=++this.focusOrderCounter,this.requestRender())},unfocus:()=>{if(this.focusedComponent!==t)return;let r=this.getTopmostVisibleOverlay();this.setFocus(r&&r!==o?r.component:o.preFocus),this.requestRender()},isFocused:()=>this.focusedComponent===t}}hideOverlay(){let t=this.overlayStack.pop();if(t){if(this.focusedComponent===t.component){let i=this.getTopmostVisibleOverlay();this.setFocus(i?.component??t.preFocus)}this.overlayStack.length===0&&this.terminal.hideCursor(),this.requestRender()}}hasOverlay(){return this.overlayStack.some(t=>this.isOverlayVisible(t))}isOverlayVisible(t){return t.hidden?!1:t.options?.visible?t.options.visible(this.terminal.columns,this.terminal.rows):!0}getTopmostVisibleOverlay(){for(let t=this.overlayStack.length-1;t>=0;t--)if(!this.overlayStack[t].options?.nonCapturing&&this.isOverlayVisible(this.overlayStack[t]))return this.overlayStack[t]}invalidate(){super.invalidate();for(let t of this.overlayStack)t.component.invalidate?.()}start(){this.stopped=!1,this.terminal.start(t=>this.handleInput(t),()=>this.requestRender()),this.terminal.hideCursor(),this.queryCellSize(),this.requestRender()}addInputListener(t){return this.inputListeners.add(t),()=>{this.inputListeners.delete(t)}}removeInputListener(t){this.inputListeners.delete(t)}queryCellSize(){ie().images&&this.terminal.write("\x1B[16t")}stop(){if(this.stopped=!0,this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=void 0),this.previousLines.length>0){let i=this.previousLines.length-this.hardwareCursorRow;i>0?this.terminal.write(`\x1B[${i}B`):i<0&&this.terminal.write(`\x1B[${-i}A`),this.terminal.write(`\r
4
+ `)}this.terminal.showCursor(),this.terminal.stop()}requestRender(t=!1){if(t){this.previousLines=[],this.previousWidth=-1,this.previousHeight=-1,this.cursorRow=0,this.hardwareCursorRow=0,this.maxLinesRendered=0,this.previousViewportTop=0,this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=void 0),this.renderRequested=!0,process.nextTick(()=>{this.stopped||!this.renderRequested||(this.renderRequested=!1,this.lastRenderAt=Ke.now(),this.doRender())});return}this.renderRequested||(this.renderRequested=!0,process.nextTick(()=>this.scheduleRender()))}scheduleRender(){if(this.stopped||this.renderTimer||!this.renderRequested)return;let t=Ke.now()-this.lastRenderAt,i=Math.max(0,e.MIN_RENDER_INTERVAL_MS-t);this.renderTimer=setTimeout(()=>{this.renderTimer=void 0,!(this.stopped||!this.renderRequested)&&(this.renderRequested=!1,this.lastRenderAt=Ke.now(),this.doRender(),this.renderRequested&&this.scheduleRender())},i)}handleInput(t){if(this.inputListeners.size>0){let o=t;for(let r of this.inputListeners){let a=r(o);if(a?.consume)return;a?.data!==void 0&&(o=a.data)}if(o.length===0)return;t=o}if(this.consumeCellSizeResponse(t))return;if(te(t,"shift+ctrl+d")&&this.onDebug){this.onDebug();return}let i=this.overlayStack.find(o=>o.component===this.focusedComponent);if(i&&!this.isOverlayVisible(i)){let o=this.getTopmostVisibleOverlay();o?this.setFocus(o.component):this.setFocus(i.preFocus)}if(this.focusedComponent?.handleInput){if(Re(t)&&!this.focusedComponent.wantsKeyRelease)return;this.focusedComponent.handleInput(t),this.requestRender()}}consumeCellSizeResponse(t){let i=t.match(/^\x1b\[6;(\d+);(\d+)t$/);if(!i)return!1;let o=parseInt(i[1],10),r=parseInt(i[2],10);return o<=0||r<=0||(Oe({widthPx:r,heightPx:o}),this.invalidate(),this.requestRender()),!0}resolveOverlayLayout(t,i,o,r){let a=t??{},c=typeof a.margin=="number"?{top:a.margin,right:a.margin,bottom:a.margin,left:a.margin}:a.margin??{},n=Math.max(0,c.top??0),l=Math.max(0,c.right??0),h=Math.max(0,c.bottom??0),u=Math.max(0,c.left??0),g=Math.max(1,o-u-l),x=Math.max(1,r-n-h),b=ut(a.width,o)??Math.min(80,g);a.minWidth!==void 0&&(b=Math.max(b,a.minWidth)),b=Math.max(1,Math.min(b,g));let d=ut(a.maxHeight,r);d!==void 0&&(d=Math.max(1,Math.min(d,x)));let f=d!==void 0?Math.min(i,d):i,v,L;if(a.row!==void 0)if(typeof a.row=="string"){let k=a.row.match(/^(\d+(?:\.\d+)?)%$/);if(k){let D=Math.max(0,x-f),I=parseFloat(k[1])/100;v=n+Math.floor(D*I)}else v=this.resolveAnchorRow("center",f,x,n)}else v=a.row;else{let k=a.anchor??"center";v=this.resolveAnchorRow(k,f,x,n)}if(a.col!==void 0)if(typeof a.col=="string"){let k=a.col.match(/^(\d+(?:\.\d+)?)%$/);if(k){let D=Math.max(0,g-b),I=parseFloat(k[1])/100;L=u+Math.floor(D*I)}else L=this.resolveAnchorCol("center",b,g,u)}else L=a.col;else{let k=a.anchor??"center";L=this.resolveAnchorCol(k,b,g,u)}return a.offsetY!==void 0&&(v+=a.offsetY),a.offsetX!==void 0&&(L+=a.offsetX),v=Math.max(n,Math.min(v,r-h-f)),L=Math.max(u,Math.min(L,o-l-b)),{width:b,row:v,col:L,maxHeight:d}}resolveAnchorRow(t,i,o,r){switch(t){case"top-left":case"top-center":case"top-right":return r;case"bottom-left":case"bottom-center":case"bottom-right":return r+o-i;case"left-center":case"center":case"right-center":return r+Math.floor((o-i)/2)}}resolveAnchorCol(t,i,o,r){switch(t){case"top-left":case"left-center":case"bottom-left":return r;case"top-right":case"right-center":case"bottom-right":return r+o-i;case"top-center":case"center":case"bottom-center":return r+Math.floor((o-i)/2)}}compositeOverlays(t,i,o){if(this.overlayStack.length===0)return t;let r=[...t],a=[],c=r.length,n=this.overlayStack.filter(u=>this.isOverlayVisible(u));n.sort((u,g)=>u.focusOrder-g.focusOrder);for(let u of n){let{component:g,options:x}=u,{width:b,maxHeight:d}=this.resolveOverlayLayout(x,0,i,o),f=g.render(b);d!==void 0&&f.length>d&&(f=f.slice(0,d));let{row:v,col:L}=this.resolveOverlayLayout(x,f.length,i,o);a.push({overlayLines:f,row:v,col:L,w:b}),c=Math.max(c,v+f.length)}let l=Math.max(r.length,o,c);for(;r.length<l;)r.push("");let h=Math.max(0,l-o);for(let{overlayLines:u,row:g,col:x,w:b}of a)for(let d=0;d<u.length;d++){let f=h+g+d;if(f>=0&&f<r.length){let v=_(u[d])>b?pe(u[d],0,b,!0):u[d];r[f]=this.compositeLineAt(r[f],v,x,b,i)}}return r}static{this.SEGMENT_RESET="\x1B[0m\x1B]8;;\x07"}applyLineResets(t){let i=e.SEGMENT_RESET;for(let o=0;o<t.length;o++){let r=t[o];ne(r)||(t[o]=Ze(r)+i)}return t}compositeLineAt(t,i,o,r,a){if(ne(t))return t;let c=o+r,n=et(t,o,c,a-c,!0),l=Pe(i,0,r,!0),h=Math.max(0,o-n.beforeWidth),u=Math.max(0,r-l.width),g=Math.max(o,n.beforeWidth),x=Math.max(r,l.width),b=Math.max(0,a-g-x),d=Math.max(0,b-n.afterWidth),f=e.SEGMENT_RESET,v=n.before+" ".repeat(h)+f+l.text+" ".repeat(u)+f+n.after+" ".repeat(d);return _(v)<=a?v:pe(v,0,a,!0)}extractCursorPosition(t,i){let o=Math.max(0,t.length-i);for(let r=t.length-1;r>=o;r--){let a=t[r],c=a.indexOf(re);if(c!==-1){let n=a.slice(0,c),l=_(n);return t[r]=a.slice(0,c)+a.slice(c+re.length),{row:r,col:l}}}return null}doRender(){if(this.stopped)return;let t=this.terminal.columns,i=this.terminal.rows,o=this.previousWidth!==0&&this.previousWidth!==t,r=this.previousHeight!==0&&this.previousHeight!==i,a=this.previousHeight>0?this.previousViewportTop+this.previousHeight:i,c=r?Math.max(0,a-i):this.previousViewportTop,n=c,l=this.hardwareCursorRow,h=y=>{let C=l-c;return y-n-C},u=this.render(t);this.overlayStack.length>0&&(u=this.compositeOverlays(u,t,i));let g=this.extractCursorPosition(u,i);u=this.applyLineResets(u);let x=y=>{this.fullRedrawCount+=1;let C="\x1B[?2026h";y&&(C+="\x1B[2J\x1B[H\x1B[3J");for(let M=0;M<u.length;M++)M>0&&(C+=`\r
5
+ `),C+=u[M];C+="\x1B[?2026l",this.terminal.write(C),this.cursorRow=Math.max(0,u.length-1),this.hardwareCursorRow=this.cursorRow,y?this.maxLinesRendered=u.length:this.maxLinesRendered=Math.max(this.maxLinesRendered,u.length);let T=Math.max(i,u.length);this.previousViewportTop=Math.max(0,T-i),this.positionHardwareCursor(g,u.length),this.previousLines=u,this.previousWidth=t,this.previousHeight=i},b=process.env.PI_DEBUG_REDRAW==="1",d=y=>{if(!b)return;let C=Q.join(We.homedir(),".sling","agent","sling-debug.log"),T=`[${new Date().toISOString()}] fullRender: ${y} (prev=${this.previousLines.length}, new=${u.length}, height=${i})
6
+ `;H.appendFileSync(C,T)};if(this.previousLines.length===0&&!o&&!r){d("first render"),x(!1);return}if(o){d(`terminal width changed (${this.previousWidth} -> ${t})`),x(!0);return}if(r&&!qt()){d(`terminal height changed (${this.previousHeight} -> ${i})`),x(!0);return}if(this.clearOnShrink&&u.length<this.maxLinesRendered&&this.overlayStack.length===0){d(`clearOnShrink (maxLinesRendered=${this.maxLinesRendered})`),x(!0);return}let f=-1,v=-1,L=Math.max(u.length,this.previousLines.length);for(let y=0;y<L;y++){let C=y<this.previousLines.length?this.previousLines[y]:"",T=y<u.length?u[y]:"";C!==T&&(f===-1&&(f=y),v=y)}let k=u.length>this.previousLines.length;k&&(f===-1&&(f=this.previousLines.length),v=u.length-1);let D=k&&f===this.previousLines.length&&f>0;if(f===-1){this.positionHardwareCursor(g,u.length),this.previousViewportTop=c,this.previousHeight=i;return}if(f>=u.length){if(this.previousLines.length>u.length){let y="\x1B[?2026h",C=Math.max(0,u.length-1);if(C<c){d(`deleted lines moved viewport up (${C} < ${c})`),x(!0);return}let T=h(C);T>0?y+=`\x1B[${T}B`:T<0&&(y+=`\x1B[${-T}A`),y+="\r";let M=this.previousLines.length-u.length;if(M>i){d(`extraLines > height (${M} > ${i})`),x(!0);return}M>0&&(y+="\x1B[1B");for(let Z=0;Z<M;Z++)y+="\r\x1B[2K",Z<M-1&&(y+="\x1B[1B");M>0&&(y+=`\x1B[${M}A`),y+="\x1B[?2026l",this.terminal.write(y),this.cursorRow=C,this.hardwareCursorRow=C}this.positionHardwareCursor(g,u.length),this.previousLines=u,this.previousWidth=t,this.previousHeight=i,this.previousViewportTop=c;return}if(f<c){d(`firstChanged < viewportTop (${f} < ${c})`),x(!0);return}let I="\x1B[?2026h",J=c+i-1,X=D?f-1:f;if(X>J){let y=Math.max(0,Math.min(i-1,l-c)),C=i-1-y;C>0&&(I+=`\x1B[${C}B`);let T=X-J;I+=`\r
7
+ `.repeat(T),c+=T,n+=T,l=X}let E=h(X);E>0?I+=`\x1B[${E}B`:E<0&&(I+=`\x1B[${-E}A`),I+=D?`\r
8
+ `:"\r";let B=Math.min(v,u.length-1);for(let y=f;y<=B;y++){y>f&&(I+=`\r
9
+ `),I+="\x1B[2K";let C=u[y];if(!ne(C)&&_(C)>t){let M=Q.join(We.homedir(),".sling","agent","sling-crash.log"),Z=[`Crash at ${new Date().toISOString()}`,`Terminal width: ${t}`,`Line ${y} visible width: ${_(C)}`,"","=== All rendered lines ===",...u.map((Xe,kt)=>`[${kt}] (w=${_(Xe)}) ${Xe}`),""].join(`
10
+ `);H.mkdirSync(Q.dirname(M),{recursive:!0}),H.writeFileSync(M,Z),this.stop();let It=[`Rendered line ${y} exceeds terminal width (${_(C)} > ${t}).`,"","This is likely caused by a custom TUI component not truncating its output.","Use visibleWidth() to measure and truncateToWidth() to truncate lines.","",`Debug log written to: ${M}`].join(`
11
+ `);throw new Error(It)}I+=C}let he=B;if(this.previousLines.length>u.length){if(B<u.length-1){let C=u.length-1-B;I+=`\x1B[${C}B`,he=u.length-1}let y=this.previousLines.length-u.length;for(let C=u.length;C<this.previousLines.length;C++)I+=`\r
12
+ \x1B[2K`;I+=`\x1B[${y}A`}if(I+="\x1B[?2026l",process.env.PI_TUI_DEBUG==="1"){let y="/tmp/tui";H.mkdirSync(y,{recursive:!0});let C=Q.join(y,`render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`),T=[`firstChanged: ${f}`,`viewportTop: ${n}`,`cursorRow: ${this.cursorRow}`,`height: ${i}`,`lineDiff: ${E}`,`hardwareCursorRow: ${l}`,`renderEnd: ${B}`,`finalCursorRow: ${he}`,`cursorPos: ${JSON.stringify(g)}`,`newLines.length: ${u.length}`,`previousLines.length: ${this.previousLines.length}`,"","=== newLines ===",JSON.stringify(u,null,2),"","=== previousLines ===",JSON.stringify(this.previousLines,null,2),"","=== buffer ===",JSON.stringify(I)].join(`
13
+ `);H.writeFileSync(C,T)}this.terminal.write(I),this.cursorRow=Math.max(0,u.length-1),this.hardwareCursorRow=he,this.maxLinesRendered=Math.max(this.maxLinesRendered,u.length),this.previousViewportTop=Math.max(c,he-i+1),this.positionHardwareCursor(g,u.length),this.previousLines=u,this.previousWidth=t,this.previousHeight=i}positionHardwareCursor(t,i){if(!t||i<=0){this.terminal.hideCursor();return}let o=Math.max(0,Math.min(t.row,i-1)),r=Math.max(0,t.col),a=o-this.hardwareCursorRow,c="";a>0?c+=`\x1B[${a}B`:a<0&&(c+=`\x1B[${-a}A`),c+=`\x1B[${r+1}G`,c&&this.terminal.write(c),this.hardwareCursorRow=o,this.showHardwareCursor?this.terminal.showCursor():this.terminal.hideCursor()}};var ii=de();var pi=de();import{Marked as is,Tokenizer as ns}from"marked";var rs=/^(~~)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,Fe=class extends ns{del(s){let t=rs.exec(s);if(!t)return;let i=t[2];return{type:"del",raw:t[0],text:i,tokens:this.lexer.inlineTokens(i)}}},os=new is;os.setOptions({tokenizer:new Fe});import{createRequire as us}from"node:module";var Pi=us(import.meta.url);var ht="https://slingshot.sapientaiproducts.com/web/ai-auth-ui/login?client=desktop&source=publicis-groupe-msft&app_name=aipp&redirect_url=http://localhost:3269/callback",dt="https://slingshot.sapientaiproducts.com/api/v1/ai-auth/auth/user/refreshtoken?client=desktop&source=publicis-groupe-msft&app_name=aipp",pt="https://sapientaiproducts.com/api/v1/llm",ft="https://slingshot.sapientaiproducts.com/api/v1/ai-portal/sage_events";var gt="fa8121c4-e2fc-48f1-9478-8949c04e13cc",mt="6e5756eb-d7e2-4d80-ad07-9d7a51600d85",bt="b97fbef7-cad9-4e56-9850-39e86c8fdf61";function oe(e){try{let s=e.split(".");if(s.length!==3)return 0;let t=JSON.parse(atob(s[1]));return t.exp?t.exp*1e3:0}catch{return 0}}function ye(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let s=Math.random()*16|0;return(e==="x"?s:s&3|8).toString(16)})}function xt(){return`user_${ye()}`}var ae=null,Ue=null;typeof process<"u"&&process.versions?.node&&(Ue=import("node:http").then(e=>{ae=e.createServer}));async function hs(){if(ae||(Ue&&await Ue,ae))return ae;throw new Error("Slingshot OAuth requires Node.js")}async function vt(e){let s=await hs();return new Promise((t,i)=>{let o=!1,r=s((c,n)=>{let l=new URL(c.url||"",`http://localhost:${3269}`);if(l.pathname!=="/callback"){n.writeHead(404,{"Content-Type":"text/plain"}),n.end("Not found");return}let h=l.searchParams.get("at")||l.searchParams.get("token")||l.searchParams.get("access_token"),u=l.searchParams.get("rt")||l.searchParams.get("refresh_token"),g=l.searchParams.get("error"),x=l.searchParams.get("error_description"),b=l.searchParams.get("x-project-id")||void 0,d=l.searchParams.get("x-workspace-id")||void 0;if(g){n.writeHead(400,{"Content-Type":"text/html"}),n.end(`<html><body><h1>Login Failed</h1><p>${x||g}</p><p>You can close this window.</p></body></html>`),o||(o=!0,r.close(),i(new Error(`Login failed: ${x||g}`)));return}if(!h){n.writeHead(400,{"Content-Type":"text/html"}),n.end("<html><body><h1>Login Failed</h1><p>No token received.</p><p>You can close this window.</p></body></html>"),o||(o=!0,r.close(),i(new Error("No access token received")));return}n.writeHead(200,{"Content-Type":"text/html"}),n.end("<html><body><h1>Login Successful</h1><p>You can close this window and return to your terminal.</p><script>setTimeout(()=>window.close(),3000)</script></body></html>"),o||(o=!0,r.close(),t({accessToken:h,refreshToken:u||"",projectId:b,workspaceId:d}))});r.listen(3269,()=>{}),r.on("error",c=>{o||(o=!0,i(c.code==="EADDRINUSE"?new Error(`Port ${3269} is already in use`):c))});let a=setTimeout(()=>{o||(o=!0,r.close(),i(new Error("Login timeout - no callback received within 5 minutes")))},300*1e3);e&&e.addEventListener("abort",()=>{clearTimeout(a),o||(o=!0,r.close(),i(new Error("Login cancelled")))}),r.on("close",()=>clearTimeout(a))})}async function Ve(e){let s=process.env.SLINGSHOT_TOKEN;if(s){let r=oe(s);return console.log("Using Slingshot token from SLINGSHOT_TOKEN environment variable"),{refresh:"",access:s,expires:r>0?r-3e5:Date.now()+10800*1e3,projectId:process.env.SLINGSHOT_PROJECT_ID,workspaceId:process.env.SLINGSHOT_WORKSPACE_ID}}let t=vt(e.signal);e.onAuth({url:ht});let i;if(e.onManualCodeInput){let r=e.onManualCodeInput().then(a=>{let c=new URL(a),n=c.searchParams.get("at")||c.searchParams.get("token")||c.searchParams.get("access_token"),l=c.searchParams.get("rt")||c.searchParams.get("refresh_token");if(!n)throw new Error("No access token found in pasted URL");return{accessToken:n,refreshToken:l||"",projectId:c.searchParams.get("x-project-id")||void 0,workspaceId:c.searchParams.get("x-workspace-id")||void 0}});i=await Promise.race([t,r])}else i=await t;let o=oe(i.accessToken);return{refresh:i.refreshToken,access:i.accessToken,expires:o>0?o-3e5:Date.now()+10800*1e3,projectId:i.projectId,workspaceId:i.workspaceId}}import{randomUUID as ds}from"node:crypto";async function Se(e){if(!e.refresh)throw new Error("No refresh token available. Please login again.");let s=!1,t=ds(),i={accept:"application/json",rt:e.refresh,"trace-id":t};s&&process.env.APP_KEY&&(i["app-key"]=process.env.APP_KEY);let o;try{o=await fetch(dt,{headers:i})}catch(c){let n=c instanceof Error?c.message:String(c);throw new Error(`Cannot reach Slingshot server: ${n}`)}if(!o.ok){let c=`${o.status} ${o.statusText}`;try{let n=await o.json();n.message?c=String(n.message):n.error&&(c=String(n.error))}catch{}throw new Error(`Token refresh failed: ${c}`)}let r=await o.json();if(!r.accessToken)throw new Error("No access token in refresh response");let a=oe(r.accessToken);return{refresh:r.refreshToken||e.refresh,access:r.accessToken,expires:a>0?a-3e5:Date.now()+10800*1e3,projectId:e.projectId,workspaceId:e.workspaceId}}var yt=[{id:"claude-opus-4@20250514",name:"Claude Opus 4",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3},{id:"claude-sonnet-4@20250514",name:"Claude Sonnet 4",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},{id:"claude-sonnet-4-5@20250929",name:"Claude Sonnet 4.5",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3},{id:"claude-opus-4-6",name:"Claude Opus 4.6",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3},{id:"gpt-5",name:"GPT-5",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5-mini",name:"GPT-5 Mini",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5-nano",name:"GPT-5 Nano",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5.1",name:"GPT-5.1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5.2",name:"GPT-5.2",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},{id:"gpt-4.1",name:"GPT-4.1",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768},{id:"o3",name:"O3",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},{id:"o3-mini",name:"o3-mini",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},{id:"o4-mini",name:"o4-mini",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.28,cacheWrite:0},contextWindow:2e5,maxTokens:1e5}];var N=null,j=null,He=process.env.SLINGSHOT_DEBUG==="true";function W(){return He}function Ct(e){He=e,e?je():N=null}function St(){return N}function je(){if(He)try{if(typeof process<"u"&&process.versions?.node){j=Ie("fs");let e=Ie("path"),s=Ie("os"),t=process.env.SLINGSHOT_LOG_DIR||e.join(s.homedir(),".sling"),i=e.join(t,"logs","analytics");j.existsSync(i)||j.mkdirSync(i,{recursive:!0});let o=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);N=e.join(i,`${o}.log`);let r=`
14
14
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
15
15
  \u2551 SLINGSHOT ANALYTICS DEBUG LOG \u2551
16
16
  \u2551 Started: ${new Date().toISOString()} \u2551
@@ -18,21 +18,21 @@ var Le=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(s,t)=>(
18
18
 
19
19
  Log file: ${N}
20
20
 
21
- `;q.writeFileSync(N,r)}}catch(e){console.warn("[Slingshot Analytics] Could not initialize file logging:",e)}}function P(e){if(!(!N||!q))try{let t=`[${new Date().toISOString()}] ${e}
22
- `;q.appendFileSync(N,t)}catch{}}function Se(e,s){if(!(!N||!q))try{let i=`[${new Date().toISOString()}] ${e}:
21
+ `;j.writeFileSync(N,r)}}catch(e){console.warn("[Slingshot Analytics] Could not initialize file logging:",e)}}function P(e){if(!(!N||!j))try{let t=`[${new Date().toISOString()}] ${e}
22
+ `;j.appendFileSync(N,t)}catch{}}function we(e,s){if(!(!N||!j))try{let i=`[${new Date().toISOString()}] ${e}:
23
23
  ${JSON.stringify(s,null,2)}
24
24
 
25
- `;q.appendFileSync(N,i)}catch{}}var ae={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*","packages/web-ui/example","packages/coding-agent/examples/extensions/with-deps","packages/coding-agent/examples/extensions/custom-provider-anthropic","packages/coding-agent/examples/extensions/custom-provider-gitlab-duo","packages/coding-agent/examples/extensions/custom-provider-qwen-cli"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../mom && npm run build && cd ../web-ui && npm run build && cd ../pods && npm run build",dev:'concurrently --names "ai,agent,coding-agent,mom,web-ui,tui" --prefix-colors "cyan,yellow,red,white,green,magenta" "cd packages/ai && npm run dev" "cd packages/agent && npm run dev" "cd packages/coding-agent && npm run dev" "cd packages/mom && npm run dev" "cd packages/web-ui && npm run dev" "cd packages/tui && npm run dev"',"dev:tsc":'concurrently --names "ai,web-ui" --prefix-colors "cyan,green" "cd packages/ai && npm run dev:tsc" "cd packages/web-ui && npm run dev:tsc"',check:"","check:browser-smoke":"","profile:tui":"node scripts/profile-coding-agent-node.mjs --mode tui","profile:rpc":"node scripts/profile-coding-agent-node.mjs --mode rpc",test:"npm run test --workspaces --if-present","version:patch":"npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:minor":"npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:major":"npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:set":"npm version -ws",prepublishOnly:"npm run clean && npm run build && npm run check",publish:"npm run prepublishOnly && npm publish -ws --access public","publish:dry":"npm run prepublishOnly && npm publish -ws --access public --dry-run","release:patch":"node scripts/release.mjs patch","release:minor":"node scripts/release.mjs minor","release:major":"node scripts/release.mjs major",prepare:"husky"},devDependencies:{"@biomejs/biome":"2.3.5","@types/node":"^24.12.2","@typescript/native-preview":"7.0.0-dev.20260120.1",concurrently:"^9.2.1",esbuild:"^0.25.0",husky:"^9.1.7",shx:"^0.4.0",tsx:"^4.20.3",typescript:"^5.9.2"},engines:{node:">=20.0.0"},slingVersion:"2.4.20260507-1",overrides:{rimraf:"6.1.3","fast-xml-parser":"5.7.2",gaxios:{rimraf:"6.1.3"}},dependencies:{"compound-engineering-pi":"^0.2.4"}};async function we(e,s,t,i){let o=mt(),r=await s.modelRegistry.getApiKeyForProvider(s.model?.provider||"slingshot");if(!r){W()&&P("ERROR: No API key found");return}let a=r.startsWith("Bearer ")?r:`Bearer ${r}`,c=process.env.SLINGSHOT_PROJECT_ID||t?.projectId||pt,n=process.env.SLINGSHOT_WORKSPACE_ID||t?.workspaceId||ft,l=process.env.CLIENT_ID||gt,h={"Content-Type":"application/json",accept:"application/json","access-token":a,"x-project-id":c,"x-workspace-id":n,"x-client-id":l,"sage-trace-id":o,"User-Agent":"pi-slingshot/1.0.0"},u=parseFloat(process.env.SLINGSHOT_TEMPERATURE||"0.2"),g=parseFloat(process.env.SLINGSHOT_TOP_P||"0.8"),b={source:ae.name||"sling",ai_model_info:{ai_provider_name:s.model?.provider||"slingshot",sage_modl_name:s.model?.id||"unknown",sage_modl_option:{temperature:String(u),max_token_size:String(s.model?.maxTokens||16834),top_p:String(g)}},rag_info:{type:null,account_name:"dummy",project_names:[],repository_names:[],programming_language:null},tab_data:{tab_count:"1"},tags:null,slingshot_version:ae.slingVersion||"2.3.2",chat_type:"agent",...i||{}};return{headers:h,sageCommonData:b}}async function _e(e,s,t,i){let o={eventName:e,sageCommonData:t,eventData:i};try{let r=await fetch(dt,{method:"POST",headers:s,body:JSON.stringify(o)});if(r.ok){let a=await r.json().catch(()=>{});if(a.error_code)throw new Error(`Analytics API error: ${a.error_code} - ${a.error_message||"No message"}`);W()&&(P(`'SUCCESS: Event sent: ${e}`),P(`Response: ${JSON.stringify(a)}`),P("\u2500".repeat(66)))}else{let a=await r.text().catch(()=>""),c={status:r.status,statusText:r.statusText,responseBody:a,requestHeaders:s};throw W()&&(P(`ERROR: ${r.status} ${r.statusText}`),Se("Error Details",c),Se("Failed Request Body",o)),new Error(`Analytics API error: ${r.status} ${r.statusText}`)}}catch(r){let a=r instanceof Error?r.message:String(r);console.warn("[Slingshot Analytics] Request that caused error:",a),W()&&(P(`EXCEPTION: ${a}`),r instanceof Error&&r.stack&&P(`Stack trace: ${r.stack}`),Se("Request that caused exception",o))}}import le from"chalk";function Ct(e,s){return{render(t){let i=` \u26AC _______. __ __ .__ __. _______
25
+ `;j.appendFileSync(N,i)}catch{}}var le={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*","packages/web-ui/example","packages/coding-agent/examples/extensions/with-deps","packages/coding-agent/examples/extensions/custom-provider-anthropic","packages/coding-agent/examples/extensions/custom-provider-gitlab-duo","packages/coding-agent/examples/extensions/custom-provider-qwen-cli"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../mom && npm run build && cd ../web-ui && npm run build && cd ../pods && npm run build",dev:'concurrently --names "ai,agent,coding-agent,mom,web-ui,tui" --prefix-colors "cyan,yellow,red,white,green,magenta" "cd packages/ai && npm run dev" "cd packages/agent && npm run dev" "cd packages/coding-agent && npm run dev" "cd packages/mom && npm run dev" "cd packages/web-ui && npm run dev" "cd packages/tui && npm run dev"',"dev:tsc":'concurrently --names "ai,web-ui" --prefix-colors "cyan,green" "cd packages/ai && npm run dev:tsc" "cd packages/web-ui && npm run dev:tsc"',check:"","check:browser-smoke":"","profile:tui":"node scripts/profile-coding-agent-node.mjs --mode tui","profile:rpc":"node scripts/profile-coding-agent-node.mjs --mode rpc",test:"npm run test --workspaces --if-present","version:patch":"npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:minor":"npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:major":"npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:set":"npm version -ws",prepublishOnly:"npm run clean && npm run build && npm run check",publish:"npm run prepublishOnly && npm publish -ws --access public","publish:dry":"npm run prepublishOnly && npm publish -ws --access public --dry-run","release:patch":"node scripts/release.mjs patch","release:minor":"node scripts/release.mjs minor","release:major":"node scripts/release.mjs major",prepare:"husky"},devDependencies:{"@biomejs/biome":"2.3.5","@types/node":"^24.12.2","@typescript/native-preview":"7.0.0-dev.20260120.1",concurrently:"^9.2.1",esbuild:"^0.25.0",husky:"^9.1.7",shx:"^0.4.0",tsx:"^4.20.3",typescript:"^5.9.2"},engines:{node:">=20.0.0"},slingVersion:"2.4.20260507-3",overrides:{rimraf:"6.1.3","fast-xml-parser":"5.7.2",gaxios:{rimraf:"6.1.3"}},dependencies:{"compound-engineering-pi":"^0.2.4"}};async function _e(e,s,t,i){let o=xt(),r=await s.modelRegistry.getApiKeyForProvider(s.model?.provider||"slingshot");if(!r){W()&&P("ERROR: No API key found");return}let a=r.startsWith("Bearer ")?r:`Bearer ${r}`,c=process.env.SLINGSHOT_PROJECT_ID||t?.projectId||gt,n=process.env.SLINGSHOT_WORKSPACE_ID||t?.workspaceId||mt,l=process.env.CLIENT_ID||bt,h={"Content-Type":"application/json",accept:"application/json","access-token":a,"x-project-id":c,"x-workspace-id":n,"x-client-id":l,"sage-trace-id":o,"User-Agent":"pi-slingshot/1.0.0"},u=parseFloat(process.env.SLINGSHOT_TEMPERATURE||"0.2"),g=parseFloat(process.env.SLINGSHOT_TOP_P||"0.8"),x={source:le.name||"sling",ai_model_info:{ai_provider_name:s.model?.provider||"slingshot",sage_modl_name:s.model?.id||"unknown",sage_modl_option:{temperature:String(u),max_token_size:String(s.model?.maxTokens||16834),top_p:String(g)}},rag_info:{type:null,account_name:"dummy",project_names:[],repository_names:[],programming_language:null},tab_data:{tab_count:"1"},tags:null,slingshot_version:le.slingVersion||"2.3.2",chat_type:"agent",...i||{}};return{headers:h,sageCommonData:x}}async function Le(e,s,t,i){let o={eventName:e,sageCommonData:t,eventData:i};try{let r=await fetch(ft,{method:"POST",headers:s,body:JSON.stringify(o)});if(r.ok){let a=await r.json().catch(()=>{});if(a.error_code)throw new Error(`Analytics API error: ${a.error_code} - ${a.error_message||"No message"}`);W()&&(P(`'SUCCESS: Event sent: ${e}`),P(`Response: ${JSON.stringify(a)}`),P("\u2500".repeat(66)))}else{let a=await r.text().catch(()=>""),c={status:r.status,statusText:r.statusText,responseBody:a,requestHeaders:s};throw W()&&(P(`ERROR: ${r.status} ${r.statusText}`),we("Error Details",c),we("Failed Request Body",o)),new Error(`Analytics API error: ${r.status} ${r.statusText}`)}}catch(r){let a=r instanceof Error?r.message:String(r);console.warn("[Slingshot Analytics] Request that caused error:",a),W()&&(P(`EXCEPTION: ${a}`),r instanceof Error&&r.stack&&P(`Stack trace: ${r.stack}`),we("Request that caused exception",o))}}import ce from"chalk";function wt(e,s){return{render(t){let i=` \u26AC _______. __ __ .__ __. _______
26
26
  \u274D \xB7 \u274D / || | | | | \\ | | / _____|
27
27
  \u2726 \u26AC \u2726 | (----\`| | | | | \\| | | | __
28
28
  \u26AC \xB7 \u26AC \u26AC \xB7 \u26AC \\ \\ | | | | | . \` | | | |_ |
29
29
  \u2726 \u26AC \u2726 .----) | | \`----.| | | |\\ | | |__| |
30
30
  \u274D \xB7 \u274D |_______/ |_______||__| |__| \\__| \\______/
31
31
  \u26AC `.split(`
32
- `).map(r=>le.bold(le.white(le.bgRed((r+" ".repeat(t)).substring(0,t))))),o=` Slingshot coding agent v${ae.slingVersion}`;return[...i,le.bgGray(le.dim(o+" ".repeat(t)).substring(0,t))]},invalidate(){}}}import ds from"chalk";var qe=["Accomplishing","Actioning","Actualizing","Architecting","Baking","Beaming","Beboppin'","Befuddling","Billowing","Blanching","Bloviating","Boogieing","Boondoggling","Booping","Bootstrapping","Brewing","Bunning","Burrowing","Calculating","Canoodling","Caramelizing","Cascading","Catapulting","Cerebrating","Channeling","Channelling","Choreographing","Churning","Clauding","Coalescing","Cogitating","Combobulating","Composing","Computing","Concocting","Considering","Contemplating","Cooking","Crafting","Creating","Crunching","Crystallizing","Cultivating","Deciphering","Deliberating","Determining","Dilly-dallying","Discombobulating","Doing","Doodling","Drizzling","Ebbing","Effecting","Elucidating","Embellishing","Enchanting","Envisioning","Evaporating","Fermenting","Fiddle-faddling","Finagling","Flamb\xE9ing","Flibbertigibbeting","Flowing","Flummoxing","Fluttering","Forging","Forming","Frolicking","Frosting","Gallivanting","Galloping","Garnishing","Generating","Gesticulating","Germinating","Gitifying","Grooving","Gusting","Harmonizing","Hashing","Hatching","Herding","Honking","Hullaballooing","Hyperspacing","Ideating","Imagining","Improvising","Incubating","Inferring","Infusing","Ionizing","Jitterbugging","Julienning","Kneading","Leavening","Levitating","Lollygagging","Manifesting","Marinating","Meandering","Metamorphosing","Misting","Moonwalking","Moseying","Mulling","Mustering","Musing","Nebulizing","Nesting","Newspapering","Noodling","Nucleating","Orbiting","Orchestrating","Osmosing","Perambulating","Percolating","Perusing","Philosophising","Photosynthesizing","Pollinating","Pondering","Pontificating","Pouncing","Precipitating","Prestidigitating","Processing","Proofing","Propagating","Puttering","Puzzling","Quantumizing","Razzle-dazzling","Razzmatazzing","Recombobulating","Reticulating","Roosting","Ruminating","Saut\xE9ing","Scampering","Schlepping","Scurrying","Seasoning","Shenaniganing","Shimmying","Simmering","Skedaddling","Sketching","Slithering","Smooshing","Sock-hopping","Spelunking","Spinning","Sprouting","Stewing","Sublimating","Swirling","Swooping","Symbioting","Synthesizing","Tempering","Thinking","Thundering","Tinkering","Tomfoolering","Topsy-turvying","Transfiguring","Transmuting","Twisting","Undulating","Unfurling","Unravelling","Vibing","Waddling","Wandering","Warping","Whatchamacalliting","Whirlpooling","Whirring","Whisking","Wibbling","Working","Wrangling","Zesting","Zigzagging"];import wt from"node:path";function ze(e,s){s==="random"&&(s=Object.keys(je)[Math.floor(Math.random()*Object.keys(je).length)]);let t=je[s||"dots"];e.ui.setWorkingIndicator(t)}var je={dots:{intervalMs:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{intervalMs:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{intervalMs:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{intervalMs:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{intervalMs:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{intervalMs:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{intervalMs:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{intervalMs:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{intervalMs:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{intervalMs:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{intervalMs:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{intervalMs:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{intervalMs:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{intervalMs:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{intervalMs:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{intervalMs:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{intervalMs:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{intervalMs:130,frames:["-","\\","|","/"]},line2:{intervalMs:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{intervalMs:80,frames:["/ "," - "," "," |"," |"," "," - ","/ "]},pipe:{intervalMs:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{intervalMs:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{intervalMs:200,frames:[". ",".. ","..."," .."," ."," "]},star:{intervalMs:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{intervalMs:80,frames:["+","x","*"]},flip:{intervalMs:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{intervalMs:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{intervalMs:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{intervalMs:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{intervalMs:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{intervalMs:120,frames:[".","o","O","\xB0","O","o","."]},noise:{intervalMs:100,frames:["\u2593","\u2592","\u2591"]},bounce:{intervalMs:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{intervalMs:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{intervalMs:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{intervalMs:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{intervalMs:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{intervalMs:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{intervalMs:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{intervalMs:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{intervalMs:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{intervalMs:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{intervalMs:100,frames:["\u256B","\u256A"]},toggle:{intervalMs:250,frames:["\u22B6","\u22B7"]},toggle2:{intervalMs:80,frames:["\u25AB","\u25AA"]},toggle3:{intervalMs:120,frames:["\u25A1","\u25A0"]},toggle4:{intervalMs:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{intervalMs:100,frames:["\u25AE","\u25AF"]},toggle6:{intervalMs:300,frames:["\u101D","\u1040"]},toggle7:{intervalMs:80,frames:["\u29BE","\u29BF"]},toggle8:{intervalMs:100,frames:["\u25CD","\u25CC"]},toggle9:{intervalMs:100,frames:["\u25C9","\u25CE"]},toggle10:{intervalMs:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{intervalMs:50,frames:["\u29C7","\u29C6"]},toggle12:{intervalMs:120,frames:["\u2617","\u2616"]},toggle13:{intervalMs:80,frames:["=","*","-"]},arrow:{intervalMs:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{intervalMs:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{intervalMs:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{intervalMs:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{intervalMs:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{intervalMs:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{intervalMs:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{intervalMs:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{intervalMs:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{intervalMs:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{intervalMs:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{intervalMs:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{intervalMs:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{intervalMs:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{intervalMs:120,frames:["\u2590|____________\u258C","\u2590_|___________\u258C","\u2590__|__________\u258C","\u2590___|_________\u258C","\u2590____|________\u258C","\u2590_____|_______\u258C","\u2590______|______\u258C","\u2590_______|_____\u258C","\u2590________|____\u258C","\u2590_________|___\u258C","\u2590__________|__\u258C","\u2590___________|_\u258C","\u2590____________|\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{intervalMs:100,frames:["d","q","p","b"]},weather:{intervalMs:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{intervalMs:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{intervalMs:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{intervalMs:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{intervalMs:150,frames:["-","=","\u2261"]},betaWave:{intervalMs:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{intervalMs:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{intervalMs:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{intervalMs:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{intervalMs:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{intervalMs:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{intervalMs:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{intervalMs:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{intervalMs:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{intervalMs:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{intervalMs:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{intervalMs:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{intervalMs:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var ce=null,St=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function ps(e){let s=wt.basename(process.cwd()),t=e.getSessionName();return t?`\u03C0 - ${t} - ${s}`:`\u03C0 - ${s}`}function G(e){e.ui.setWorkingMessage(ds.magenta(qe[Math.floor(Math.random()*qe.length)]+"..."))}function fs(e){let s=null,t=0;function i(n){s&&(clearInterval(s),s=null),t=0,n.ui.setTitle(ps(e))}function o(n){i(n),s=setInterval(()=>{let l=St[t%St.length],h=wt.basename(process.cwd()),u=e.getSessionName(),g=u?`${l} \u03C0 - ${u} - ${h}`:`${l} \u03C0 - ${h}`;n.ui.setTitle(g),t++},80)}He();let r=new WeakSet;e.on("session_start",async(n,l)=>{let h=l.modelRegistry.authStorage;if(!r.has(h)){let u=h.getOAuthProviders.bind(h);h.getOAuthProviders=()=>u().filter(g=>g.id==="slingshot"),r.add(h)}l.hasUI&&l.ui.setHeader(Ct)});let a=!1;e.registerCommand("footer",{description:"Toggle custom footer",handler:async(n,l)=>{a=!a,a?(l.ui.setFooter((h,u,g)=>({dispose:g.onBranchChange(()=>h.requestRender()),invalidate(){},render(x){let d=0,f=0,y=0;for(let E of l.sessionManager.getBranch())if(E.type==="message"&&E.message.role==="assistant"){let B=E.message;d+=B.usage.input,f+=B.usage.output,y+=B.usage.cost.total}let L=g.getGitBranch(),k=E=>E<1e3?`${E}`:`${(E/1e3).toFixed(1)}k`,D=u.fg("dim",`\u2191${k(d)} \u2193${k(f)} $${y.toFixed(3)}`),I=L?` (${L})`:"",Q=u.fg("dim",`${l.model?.id||"no-model"}${I}`),Y=" ".repeat(Math.max(1,x-_(D)-_(Q)));return[z(D+Y+Q,x)]}})),l.ui.notify("Custom footer enabled","info")):(l.ui.setFooter(void 0),l.ui.notify("Default footer restored","info"))}}),e.registerProvider("slingshot",{baseUrl:ht,api:"openai-completions",apiKey:"SLINGSHOT_API_KEY",models:xt,oauth:{name:"Slingshot",login:Ue,refreshToken:Ce,getApiKey:n=>(ce=n,n.access)}}),e.registerCommand("slingshot-debug",{description:"Toggle Slingshot analytics debug logging",handler:async(n,l)=>{let h=!W();if(vt(h),h){let u="Slingshot Analytics Debug: ENABLED \u2705",g=yt();g&&(u+=`
32
+ `).map(r=>ce.bold(ce.white(ce.bgRed((r+" ".repeat(t)).substring(0,t))))),o=` Slingshot coding agent v${le.slingVersion}`;return[...i,ce.bgGray(ce.dim(o+" ".repeat(t)).substring(0,t))]},invalidate(){}}}import fs from"chalk";var qe=["Accomplishing","Actioning","Actualizing","Architecting","Baking","Beaming","Beboppin'","Befuddling","Billowing","Blanching","Bloviating","Boogieing","Boondoggling","Booping","Bootstrapping","Brewing","Bunning","Burrowing","Calculating","Canoodling","Caramelizing","Cascading","Catapulting","Cerebrating","Channeling","Channelling","Choreographing","Churning","Clauding","Coalescing","Cogitating","Combobulating","Composing","Computing","Concocting","Considering","Contemplating","Cooking","Crafting","Creating","Crunching","Crystallizing","Cultivating","Deciphering","Deliberating","Determining","Dilly-dallying","Discombobulating","Doing","Doodling","Drizzling","Ebbing","Effecting","Elucidating","Embellishing","Enchanting","Envisioning","Evaporating","Fermenting","Fiddle-faddling","Finagling","Flamb\xE9ing","Flibbertigibbeting","Flowing","Flummoxing","Fluttering","Forging","Forming","Frolicking","Frosting","Gallivanting","Galloping","Garnishing","Generating","Gesticulating","Germinating","Gitifying","Grooving","Gusting","Harmonizing","Hashing","Hatching","Herding","Honking","Hullaballooing","Hyperspacing","Ideating","Imagining","Improvising","Incubating","Inferring","Infusing","Ionizing","Jitterbugging","Julienning","Kneading","Leavening","Levitating","Lollygagging","Manifesting","Marinating","Meandering","Metamorphosing","Misting","Moonwalking","Moseying","Mulling","Mustering","Musing","Nebulizing","Nesting","Newspapering","Noodling","Nucleating","Orbiting","Orchestrating","Osmosing","Perambulating","Percolating","Perusing","Philosophising","Photosynthesizing","Pollinating","Pondering","Pontificating","Pouncing","Precipitating","Prestidigitating","Processing","Proofing","Propagating","Puttering","Puzzling","Quantumizing","Razzle-dazzling","Razzmatazzing","Recombobulating","Reticulating","Roosting","Ruminating","Saut\xE9ing","Scampering","Schlepping","Scurrying","Seasoning","Shenaniganing","Shimmying","Simmering","Skedaddling","Sketching","Slithering","Smooshing","Sock-hopping","Spelunking","Spinning","Sprouting","Stewing","Sublimating","Swirling","Swooping","Symbioting","Synthesizing","Tempering","Thinking","Thundering","Tinkering","Tomfoolering","Topsy-turvying","Transfiguring","Transmuting","Twisting","Undulating","Unfurling","Unravelling","Vibing","Waddling","Wandering","Warping","Whatchamacalliting","Whirlpooling","Whirring","Whisking","Wibbling","Working","Wrangling","Zesting","Zigzagging"];import q from"node:path";import{existsSync as Ye}from"node:fs";import{homedir as Lt}from"node:os";function Ge(e,s){s==="random"&&(s=Object.keys(ze)[Math.floor(Math.random()*Object.keys(ze).length)]);let t=ze[s||"dots"];e.ui.setWorkingIndicator(t)}var ze={dots:{intervalMs:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{intervalMs:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{intervalMs:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{intervalMs:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{intervalMs:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{intervalMs:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{intervalMs:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{intervalMs:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{intervalMs:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{intervalMs:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{intervalMs:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{intervalMs:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{intervalMs:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{intervalMs:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{intervalMs:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{intervalMs:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{intervalMs:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{intervalMs:130,frames:["-","\\","|","/"]},line2:{intervalMs:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{intervalMs:80,frames:["/ "," - "," "," |"," |"," "," - ","/ "]},pipe:{intervalMs:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{intervalMs:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{intervalMs:200,frames:[". ",".. ","..."," .."," ."," "]},star:{intervalMs:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{intervalMs:80,frames:["+","x","*"]},flip:{intervalMs:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{intervalMs:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{intervalMs:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{intervalMs:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{intervalMs:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{intervalMs:120,frames:[".","o","O","\xB0","O","o","."]},noise:{intervalMs:100,frames:["\u2593","\u2592","\u2591"]},bounce:{intervalMs:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{intervalMs:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{intervalMs:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{intervalMs:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{intervalMs:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{intervalMs:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{intervalMs:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{intervalMs:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{intervalMs:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{intervalMs:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{intervalMs:100,frames:["\u256B","\u256A"]},toggle:{intervalMs:250,frames:["\u22B6","\u22B7"]},toggle2:{intervalMs:80,frames:["\u25AB","\u25AA"]},toggle3:{intervalMs:120,frames:["\u25A1","\u25A0"]},toggle4:{intervalMs:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{intervalMs:100,frames:["\u25AE","\u25AF"]},toggle6:{intervalMs:300,frames:["\u101D","\u1040"]},toggle7:{intervalMs:80,frames:["\u29BE","\u29BF"]},toggle8:{intervalMs:100,frames:["\u25CD","\u25CC"]},toggle9:{intervalMs:100,frames:["\u25C9","\u25CE"]},toggle10:{intervalMs:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{intervalMs:50,frames:["\u29C7","\u29C6"]},toggle12:{intervalMs:120,frames:["\u2617","\u2616"]},toggle13:{intervalMs:80,frames:["=","*","-"]},arrow:{intervalMs:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{intervalMs:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{intervalMs:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{intervalMs:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{intervalMs:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{intervalMs:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{intervalMs:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{intervalMs:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{intervalMs:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{intervalMs:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{intervalMs:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{intervalMs:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{intervalMs:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{intervalMs:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{intervalMs:120,frames:["\u2590|____________\u258C","\u2590_|___________\u258C","\u2590__|__________\u258C","\u2590___|_________\u258C","\u2590____|________\u258C","\u2590_____|_______\u258C","\u2590______|______\u258C","\u2590_______|_____\u258C","\u2590________|____\u258C","\u2590_________|___\u258C","\u2590__________|__\u258C","\u2590___________|_\u258C","\u2590____________|\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{intervalMs:100,frames:["d","q","p","b"]},weather:{intervalMs:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{intervalMs:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{intervalMs:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{intervalMs:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{intervalMs:150,frames:["-","=","\u2261"]},betaWave:{intervalMs:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{intervalMs:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{intervalMs:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{intervalMs:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{intervalMs:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{intervalMs:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{intervalMs:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{intervalMs:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{intervalMs:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{intervalMs:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{intervalMs:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{intervalMs:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{intervalMs:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var gs=q.join(Lt(),".pi","agent"),ms=q.join(Lt(),".agents"),ue=null,_t=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function bs(e){let s=q.basename(process.cwd()),t=e.getSessionName();return t?`\u03C0 - ${t} - ${s}`:`\u03C0 - ${s}`}function Y(e){e.ui.setWorkingMessage(fs.magenta(qe[Math.floor(Math.random()*qe.length)]+"..."))}function xs(e){let s=null,t=0;function i(n){s&&(clearInterval(s),s=null),t=0,n.ui.setTitle(bs(e))}function o(n){i(n),s=setInterval(()=>{let l=_t[t%_t.length],h=q.basename(process.cwd()),u=e.getSessionName(),g=u?`${l} \u03C0 - ${u} - ${h}`:`${l} \u03C0 - ${h}`;n.ui.setTitle(g),t++},80)}je(),e.on("resources_discover",async n=>{let h=[q.join(n.cwd,".sling","agent"),ms,gs],u=[],g=[],x=[];for(let b of h){let d=q.join(b,"skills");Ye(d)&&u.push(d);let f=q.join(b,"prompts");Ye(f)&&g.push(f);let v=q.join(b,"themes");Ye(v)&&x.push(v)}return{skillPaths:u,promptPaths:g,themePaths:x}});let r=new WeakSet;e.on("session_start",async(n,l)=>{let h=l.modelRegistry.authStorage;if(!r.has(h)){let u=h.getOAuthProviders.bind(h);h.getOAuthProviders=()=>u().filter(g=>g.id==="slingshot"),r.add(h)}l.hasUI&&l.ui.setHeader(wt)});let a=!1;e.registerCommand("footer",{description:"Toggle custom footer",handler:async(n,l)=>{a=!a,a?(l.ui.setFooter((h,u,g)=>({dispose:g.onBranchChange(()=>h.requestRender()),invalidate(){},render(b){let d=0,f=0,v=0;for(let E of l.sessionManager.getBranch())if(E.type==="message"&&E.message.role==="assistant"){let B=E.message;d+=B.usage.input,f+=B.usage.output,v+=B.usage.cost.total}let L=g.getGitBranch(),k=E=>E<1e3?`${E}`:`${(E/1e3).toFixed(1)}k`,D=u.fg("dim",`\u2191${k(d)} \u2193${k(f)} $${v.toFixed(3)}`),I=L?` (${L})`:"",J=u.fg("dim",`${l.model?.id||"no-model"}${I}`),X=" ".repeat(Math.max(1,b-_(D)-_(J)));return[G(D+X+J,b)]}})),l.ui.notify("Custom footer enabled","info")):(l.ui.setFooter(void 0),l.ui.notify("Default footer restored","info"))}}),e.registerProvider("slingshot",{baseUrl:pt,api:"openai-completions",apiKey:"SLINGSHOT_API_KEY",models:yt,oauth:{name:"Slingshot",login:Ve,refreshToken:Se,getApiKey:n=>(ue=n,n.access)}}),e.registerCommand("slingshot-debug",{description:"Toggle Slingshot analytics debug logging",handler:async(n,l)=>{let h=!W();if(Ct(h),h){let u="Slingshot Analytics Debug: ENABLED \u2705",g=St();g&&(u+=`
33
33
 
34
34
  Log file:
35
- ${g}`),e.sendMessage({customType:"slingshot-debug-status",content:u,display:!0})}else e.sendMessage({customType:"slingshot-debug-status",content:"Slingshot Analytics Debug: DISABLED \u274C",display:!0})}}),e.registerCommand("refresh-token",{description:"Manually refresh Slingshot OAuth token",handler:async(n,l)=>{try{let h=l.modelRegistry.authStorage,u=h.get("slingshot");if(!u||u.type!=="oauth"){l.ui.notify("No Slingshot OAuth credentials found. Please use /login slingshot first.","error");return}l.ui.setStatus("refresh","Refreshing Slingshot token...");let g=await Ce(u);h.set("slingshot",{type:"oauth",...g}),ce=g,l.ui.setStatus("refresh",void 0),l.ui.notify("Slingshot token refreshed successfully!","info")}catch(h){l.ui.setStatus("refresh",void 0);let u=h instanceof Error?h.message:String(h);l.ui.notify(`Failed to refresh token: ${u}`,"error")}}});let c=ve();e.on("before_agent_start",async(n,l)=>{try{o(l),G(l),ze(l,"random");let h=await we(n,l,ce);if(!h?.headers||!h.sageCommonData)return;c=ve(),_e("agentExecutionStatus",h.headers,h.sageCommonData,{agent_id:c,agent_name:"Sling_Coding_Assistant",agent_execution_status:"Started",agent_correlation_id:c,agent_type:"Temp"})}catch(h){console.error("[Slingshot] Analytics error. Run /slingshot-debug for details.",h),W()&&(P(`CRITICAL ERROR in event handler: ${h?.message||h}`),h?.stack&&P(h.stack))}}),e.on("agent_end",async(n,l)=>{try{i(l);let h=await we(n,l,ce);if(!h?.headers||!h.sageCommonData)return;await _e("agentExecutionStatus",h.headers,h.sageCommonData,{agent_id:c,agent_name:"Sling_Coding_Assistant",agent_execution_status:"Success",agent_correlation_id:c,agent_type:"Temp",tools_list:[]})}catch(h){e.sendMessage({customType:"slingshot-analytics-error",content:"[Slingshot] Analytics error. Run /slingshot-debug for details.",display:!0}),W()&&(P(`CRITICAL ERROR in event handler: ${h?.message||h}`),h?.stack&&P(h.stack))}}),e.on("tool_execution_start",async(n,l)=>{G(l)}),e.on("tool_result",async(n,l)=>{if(G(l),n.toolName==="write"||n.toolName==="edit")try{let h=await we(n,l,ce);if(!h?.headers||!h.sageCommonData||n.isError)return;let u=n.input.path+"",b=u.split(".").pop()||"",x="";n.toolName==="write"?x=n.input.content+"":n.toolName==="edit"&&(x=(n.details?.diff+"").split(`
35
+ ${g}`),e.sendMessage({customType:"slingshot-debug-status",content:u,display:!0})}else e.sendMessage({customType:"slingshot-debug-status",content:"Slingshot Analytics Debug: DISABLED \u274C",display:!0})}}),e.registerCommand("refresh-token",{description:"Manually refresh Slingshot OAuth token",handler:async(n,l)=>{try{let h=l.modelRegistry.authStorage,u=h.get("slingshot");if(!u||u.type!=="oauth"){l.ui.notify("No Slingshot OAuth credentials found. Please use /login slingshot first.","error");return}l.ui.setStatus("refresh","Refreshing Slingshot token...");let g=await Se(u);h.set("slingshot",{type:"oauth",...g}),ue=g,l.ui.setStatus("refresh",void 0),l.ui.notify("Slingshot token refreshed successfully!","info")}catch(h){l.ui.setStatus("refresh",void 0);let u=h instanceof Error?h.message:String(h);l.ui.notify(`Failed to refresh token: ${u}`,"error")}}});let c=ye();e.on("before_agent_start",async(n,l)=>{try{o(l),Y(l),Ge(l,"random");let h=await _e(n,l,ue);if(!h?.headers||!h.sageCommonData)return;c=ye(),Le("agentExecutionStatus",h.headers,h.sageCommonData,{agent_id:c,agent_name:"Sling_Coding_Assistant",agent_execution_status:"Started",agent_correlation_id:c,agent_type:"Temp"})}catch(h){console.error("[Slingshot] Analytics error. Run /slingshot-debug for details.",h),W()&&(P(`CRITICAL ERROR in event handler: ${h?.message||h}`),h?.stack&&P(h.stack))}}),e.on("agent_end",async(n,l)=>{try{i(l);let h=await _e(n,l,ue);if(!h?.headers||!h.sageCommonData)return;await Le("agentExecutionStatus",h.headers,h.sageCommonData,{agent_id:c,agent_name:"Sling_Coding_Assistant",agent_execution_status:"Success",agent_correlation_id:c,agent_type:"Temp",tools_list:[]})}catch(h){e.sendMessage({customType:"slingshot-analytics-error",content:"[Slingshot] Analytics error. Run /slingshot-debug for details.",display:!0}),W()&&(P(`CRITICAL ERROR in event handler: ${h?.message||h}`),h?.stack&&P(h.stack))}}),e.on("tool_execution_start",async(n,l)=>{Y(l)}),e.on("tool_result",async(n,l)=>{if(Y(l),n.toolName==="write"||n.toolName==="edit")try{let h=await _e(n,l,ue);if(!h?.headers||!h.sageCommonData||n.isError)return;let u=n.input.path+"",x=u.split(".").pop()||"",b="";n.toolName==="write"?b=n.input.content+"":n.toolName==="edit"&&(b=(n.details?.diff+"").split(`
36
36
  `).filter(d=>d.startsWith("+")||d.startsWith("-")).join(`
37
- `)),_e(`${n.toolName==="edit"?"insertCode":"createNewFile"}`,h.headers,h.sageCommonData,{programming_language:b,number_of_lines:x.split(`
38
- `).length+"",message_id:l.sessionManager.getSessionId()+"-"+c,code_block_id:l.sessionManager.getSessionId()+"-"+u})}catch(h){e.sendMessage({customType:"slingshot-analytics-error",content:"[Slingshot] Analytics error. Run /slingshot-debug for details.",display:!0}),W()&&(P(`CRITICAL ERROR in event handler: ${h?.message||h}`),h?.stack&&P(h.stack))}}),e.on("tool_execution_end",async(n,l)=>{G(l)}),e.on("message_start",async(n,l)=>{G(l)}),e.on("message_update",async(n,l)=>{G(l)}),e.on("message_end",async(n,l)=>{G(l)})}export{fs as default};
37
+ `)),Le(`${n.toolName==="edit"?"insertCode":"createNewFile"}`,h.headers,h.sageCommonData,{programming_language:x,number_of_lines:b.split(`
38
+ `).length+"",message_id:l.sessionManager.getSessionId()+"-"+c,code_block_id:l.sessionManager.getSessionId()+"-"+u})}catch(h){e.sendMessage({customType:"slingshot-analytics-error",content:"[Slingshot] Analytics error. Run /slingshot-debug for details.",display:!0}),W()&&(P(`CRITICAL ERROR in event handler: ${h?.message||h}`),h?.stack&&P(h.stack))}}),e.on("tool_execution_end",async(n,l)=>{Y(l)}),e.on("message_start",async(n,l)=>{Y(l)}),e.on("message_update",async(n,l)=>{Y(l)}),e.on("message_end",async(n,l)=>{Y(l)})}export{xs as default};