aicommit2 0.0.0-semantic-release

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +248 -0
  3. package/dist/cli.mjs +100 -0
  4. package/package.json +26 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Hassan El Mghari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,248 @@
1
+ <div align="center">
2
+ <div>
3
+ <img src=".github/screenshot.png" alt="AI Commits"/>
4
+ <h1 align="center">AI Commit2</h1>
5
+ </div>
6
+ <p>The project was inspired by the <a href="https://https://github.com/Nutlope/aicommit2">AI Commits</a></p>
7
+ <a href="https://www.npmjs.com/package/aicommit2"><img src="https://img.shields.io/npm/v/aicommit2" alt="Current version"></a>
8
+ </div>
9
+
10
+ ---
11
+
12
+ ## Setup
13
+
14
+ > The minimum supported version of Node.js is the latest v14. Check your Node.js version with `node --version`.
15
+
16
+
17
+ 1. Install _aicommit2_:
18
+
19
+ ```sh
20
+ npm install -g aicommit2
21
+ ```
22
+
23
+ 2. Retrieve your API key from [OpenAI](https://platform.openai.com/account/api-keys)
24
+
25
+ > Note: If you haven't already, you'll have to create an account and set up billing.
26
+
27
+ 3. Set the key so aicommit2 can use it:
28
+
29
+ ```sh
30
+ aicommit2 config set OPENAI_KEY=<your token>
31
+ ```
32
+
33
+ This will create a `.aicommit2` file in your home directory.
34
+
35
+
36
+ ### Upgrading
37
+
38
+ Check the installed version with:
39
+ ```
40
+ aicommit2 --version
41
+ ```
42
+
43
+ If it's not the [latest version](https://github.com/Nutlope/aicommit2/releases/latest), run:
44
+
45
+ ```sh
46
+ npm update -g aicommit2
47
+ ```
48
+
49
+ ## Usage
50
+ ### CLI mode
51
+
52
+ You can call `aicommit2` directly to generate a commit message for your staged changes:
53
+
54
+ ```sh
55
+ git add <files...>
56
+ aicommit2
57
+ ```
58
+
59
+ `aicommit2` passes down unknown flags to `git commit`, so you can pass in [`commit` flags](https://git-scm.com/docs/git-commit).
60
+
61
+ For example, you can stage all changes in tracked files with as you commit:
62
+ ```sh
63
+ aicommit2 --all # or -a
64
+ ```
65
+
66
+ > 👉 **Tip:** Use the `aic` alias if `aicommit2` is too long for you.
67
+
68
+ #### Generate multiple recommendations
69
+
70
+ Sometimes the recommended commit message isn't the best so you want it to generate a few to pick from. You can generate multiple commit messages at once by passing in the `--generate <i>` flag, where 'i' is the number of generated messages:
71
+ ```sh
72
+ aicommit2 --generate <i> # or -g <i>
73
+ ```
74
+
75
+ > Warning: this uses more tokens, meaning it costs more.
76
+
77
+ #### Generating Conventional Commits
78
+
79
+ If you'd like to generate [Conventional Commits](https://conventionalcommits.org/), you can use the `--type` flag followed by `conventional`. This will prompt `aicommit2` to format the commit message according to the Conventional Commits specification:
80
+
81
+ ```sh
82
+ aicommit2 --type conventional # or -t conventional
83
+ ```
84
+
85
+ This feature can be useful if your project follows the Conventional Commits standard or if you're using tools that rely on this commit format.
86
+
87
+ ### Git hook
88
+
89
+ You can also integrate _aicommit2_ with Git via the [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. This lets you use Git like you normally would, and edit the commit message before committing.
90
+
91
+ #### Install
92
+
93
+ In the Git repository you want to install the hook in:
94
+ ```sh
95
+ aicommit2 hook install
96
+ ```
97
+
98
+ #### Uninstall
99
+ In the Git repository you want to uninstall the hook from:
100
+
101
+ ```sh
102
+ aicommit2 hook uninstall
103
+ ```
104
+
105
+ #### Usage
106
+
107
+ 1. Stage your files and commit:
108
+ ```sh
109
+ git add <files...>
110
+ git commit # Only generates a message when it's not passed in
111
+ ```
112
+
113
+ > If you ever want to write your own message instead of generating one, you can simply pass one in: `git commit -m "My message"`
114
+
115
+ 2. aicommit2 will generate the commit message for you and pass it back to Git. Git will open it with the [configured editor](https://docs.github.com/en/get-started/getting-started-with-git/associating-text-editors-with-git) for you to review/edit it.
116
+
117
+ 3. Save and close the editor to commit!
118
+
119
+ ## Configuration
120
+
121
+ ### Reading a configuration value
122
+ To retrieve a configuration option, use the command:
123
+
124
+ ```sh
125
+ aicommit2 config get <key>
126
+ ```
127
+
128
+ For example, to retrieve the API key, you can use:
129
+ ```sh
130
+ aicommit2 config get OPENAI_KEY
131
+ ```
132
+
133
+ You can also retrieve multiple configuration options at once by separating them with spaces:
134
+
135
+ ```sh
136
+ aicommit2 config get OPENAI_KEY generate
137
+ ```
138
+
139
+ ### Setting a configuration value
140
+
141
+ To set a configuration option, use the command:
142
+
143
+ ```sh
144
+ aicommit2 config set <key>=<value>
145
+ ```
146
+
147
+ For example, to set the API key, you can use:
148
+
149
+ ```sh
150
+ aicommit2 config set OPENAI_KEY=<your-api-key>
151
+ ```
152
+
153
+ You can also set multiple configuration options at once by separating them with spaces, like
154
+
155
+ ```sh
156
+ aicommit2 config set OPENAI_KEY=<your-api-key> generate=3 locale=en
157
+ ```
158
+
159
+ ### Options
160
+ #### OPENAI_KEY
161
+
162
+ Required
163
+
164
+ The OpenAI API key. You can retrieve it from [OpenAI API Keys page](https://platform.openai.com/account/api-keys).
165
+
166
+ #### locale
167
+ Default: `en`
168
+
169
+ The locale to use for the generated commit messages. Consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes.
170
+
171
+ #### generate
172
+
173
+ Default: `1`
174
+
175
+ The number of commit messages to generate to pick from.
176
+
177
+ Note, this will use more tokens as it generates more results.
178
+
179
+ #### proxy
180
+
181
+ Set a HTTP/HTTPS proxy to use for requests.
182
+
183
+ To clear the proxy option, you can use the command (note the empty value after the equals sign):
184
+
185
+ ```sh
186
+ aicommit2 config set proxy=
187
+ ```
188
+
189
+ #### model
190
+
191
+ Default: `gpt-3.5-turbo`
192
+
193
+ The Chat Completions (`/v1/chat/completions`) model to use. Consult the list of models available in the [OpenAI Documentation](https://platform.openai.com/docs/models/model-endpoint-compatibility).
194
+
195
+ > Tip: If you have access, try upgrading to [`gpt-4`](https://platform.openai.com/docs/models/gpt-4) for next-level code analysis. It can handle double the input size, but comes at a higher cost. Check out OpenAI's website to learn more.
196
+
197
+
198
+ #### timeout
199
+ The timeout for network requests to the OpenAI API in milliseconds.
200
+
201
+ Default: `10000` (10 seconds)
202
+
203
+ ```sh
204
+ aicommit2 config set timeout=20000 # 20s
205
+ ```
206
+
207
+ #### max-length
208
+ The maximum character length of the generated commit message.
209
+
210
+ Default: `50`
211
+
212
+ ```sh
213
+ aicommit2 config set max-length=100
214
+ ```
215
+
216
+ #### type
217
+
218
+ Default: `""` (Empty string)
219
+
220
+ The type of commit message to generate. Set this to "conventional" to generate commit messages that follow the Conventional Commits specification:
221
+
222
+ ```sh
223
+ aicommit2 config set type=conventional
224
+ ```
225
+
226
+ You can clear this option by setting it to an empty string:
227
+
228
+ ```sh
229
+ aicommit2 config set type=
230
+ ```
231
+
232
+ ## How it works
233
+
234
+ This CLI tool runs `git diff` to grab all your latest code changes, sends them to OpenAI's GPT-3, then returns the AI generated commit message.
235
+
236
+ Video coming soon where I rebuild it from scratch to show you how to easily build your own CLI tools powered by AI.
237
+
238
+ ## Maintainers
239
+
240
+ - **Hassan El Mghari**: [@Nutlope](https://github.com/Nutlope) [<img src="https://img.shields.io/twitter/follow/nutlope?style=flat&label=nutlope&logo=twitter&color=0bf&logoColor=fff" align="center">](https://twitter.com/nutlope)
241
+
242
+
243
+ - **Hiroki Osame**: [@privatenumber](https://github.com/privatenumber) [<img src="https://img.shields.io/twitter/follow/privatenumbr?style=flat&label=privatenumbr&logo=twitter&color=0bf&logoColor=fff" align="center">](https://twitter.com/privatenumbr)
244
+
245
+
246
+ ## Contributing
247
+
248
+ If you want to help fix a bug or implement a feature in [Issues](https://github.com/Nutlope/aicommit2/issues), checkout the [Contribution Guide](CONTRIBUTING.md) to learn how to setup and test the project.
package/dist/cli.mjs ADDED
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env node
2
+ import Fu from"tty";import{Buffer as Ht}from"node:buffer";import U from"node:path";import WD from"node:child_process";import b,{stdin as HD,stdout as qD}from"node:process";import qt from"child_process";import W from"path";import _u from"fs";import zt from"node:url";import Kt,{constants as zD}from"node:os";import KD from"assert";import VD from"events";import Vt from"buffer";import ku from"stream";import YD from"util";import*as Cu from"node:readline";import JD from"node:readline";import{WriteStream as Yt}from"node:tty";import T from"fs/promises";import XD from"os";import Jt from"https";import Xt from"net";import Zt from"tls";import Qt,{fileURLToPath as un,pathToFileURL as Dn}from"url";const en="known-flag",tn="unknown-flag",nn="argument",{stringify:Z}=JSON,rn=/\B([A-Z])/g,on=u=>u.replace(rn,"-$1").toLowerCase(),{hasOwnProperty:sn}=Object.prototype,Q=(u,D)=>sn.call(u,D),an=u=>Array.isArray(u),ZD=u=>typeof u=="function"?[u,!1]:an(u)?[u[0],!0]:ZD(u.type),cn=(u,D)=>u===Boolean?D!=="false":D,ln=(u,D)=>typeof D=="boolean"?D:u===Number&&D===""?Number.NaN:u(D),Fn=/[\s.:=]/,Cn=u=>{const D=`Flag name ${Z(u)}`;if(u.length===0)throw new Error(`${D} cannot be empty`);if(u.length===1)throw new Error(`${D} must be longer than a character`);const n=u.match(Fn);if(n)throw new Error(`${D} cannot contain ${Z(n?.[0])}`)},fn=u=>{const D={},n=(e,r)=>{if(Q(D,e))throw new Error(`Duplicate flags named ${Z(e)}`);D[e]=r};for(const e in u){if(!Q(u,e))continue;Cn(e);const r=u[e],o=[[],...ZD(r),r];n(e,o);const t=on(e);if(e!==t&&n(t,o),"alias"in r&&typeof r.alias=="string"){const{alias:s}=r,i=`Flag alias ${Z(s)} for flag ${Z(e)}`;if(s.length===0)throw new Error(`${i} cannot be empty`);if(s.length>1)throw new Error(`${i} must be a single character`);n(s,o)}}return D},En=(u,D)=>{const n={};for(const e in u){if(!Q(u,e))continue;const[r,,o,t]=D[e];if(r.length===0&&"default"in t){let{default:s}=t;typeof s=="function"&&(s=s()),n[e]=s}else n[e]=o?r:r.pop()}return n},fu="--",dn=/[.:=]/,pn=/^-{1,2}\w/,hn=u=>{if(!pn.test(u))return;const D=!u.startsWith(fu);let n=u.slice(D?1:2),e;const r=n.match(dn);if(r){const{index:o}=r;e=n.slice(o+1),n=n.slice(0,o)}return[n,e,D]},mn=(u,{onFlag:D,onArgument:n})=>{let e;const r=(o,t)=>{if(typeof e!="function")return!0;e(o,t),e=void 0};for(let o=0;o<u.length;o+=1){const t=u[o];if(t===fu){r();const i=u.slice(o+1);n?.(i,[o],!0);break}const s=hn(t);if(s){if(r(),!D)continue;const[i,l,F]=s;if(F)for(let a=0;a<i.length;a+=1){r();const c=a===i.length-1;e=D(i[a],c?l:void 0,[o,a+1,c])}else e=D(i,l,[o])}else r(t,[o])&&n?.([t],[o])}r()},gn=(u,D)=>{for(const[n,e,r]of D.reverse()){if(e){const o=u[n];let t=o.slice(0,e);if(r||(t+=o.slice(e+1)),t!=="-"){u[n]=t;continue}}u.splice(n,1)}},Bn=(u,D=process.argv.slice(2),{ignore:n}={})=>{const e=[],r=fn(u),o={},t=[];return t[fu]=[],mn(D,{onFlag(s,i,l){const F=Q(r,s);if(!n?.(F?en:tn,s,i)){if(F){const[a,c]=r[s],C=cn(c,i),f=(E,p)=>{e.push(l),p&&e.push(p),a.push(ln(c,E||""))};return C===void 0?f:f(C)}Q(o,s)||(o[s]=[]),o[s].push(i===void 0?!0:i),e.push(l)}},onArgument(s,i,l){n?.(nn,D[i[0]])||(t.push(...s),l?(t[fu]=s,D.splice(i[0])):e.push(i))}}),gn(D,e),{flags:En(u,r),unknownFlags:o,_:t}};var An=Object.create,Eu=Object.defineProperty,bn=Object.defineProperties,yn=Object.getOwnPropertyDescriptor,wn=Object.getOwnPropertyDescriptors,$n=Object.getOwnPropertyNames,QD=Object.getOwnPropertySymbols,vn=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,De=(u,D,n)=>D in u?Eu(u,D,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[D]=n,du=(u,D)=>{for(var n in D||(D={}))ue.call(D,n)&&De(u,n,D[n]);if(QD)for(var n of QD(D))xn.call(D,n)&&De(u,n,D[n]);return u},Ru=(u,D)=>bn(u,wn(D)),Sn=u=>Eu(u,"__esModule",{value:!0}),On=(u,D)=>()=>(u&&(D=u(u=0)),D),Tn=(u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),Pn=(u,D,n,e)=>{if(D&&typeof D=="object"||typeof D=="function")for(let r of $n(D))!ue.call(u,r)&&(n||r!=="default")&&Eu(u,r,{get:()=>D[r],enumerable:!(e=yn(D,r))||e.enumerable});return u},In=(u,D)=>Pn(Sn(Eu(u!=null?An(vn(u)):{},"default",!D&&u&&u.__esModule?{get:()=>u.default,enumerable:!0}:{value:u,enumerable:!0})),u),x=On(()=>{}),_n=Tn((u,D)=>{x(),D.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});x(),x(),x();var kn=u=>{var D,n,e;let r=(D=process.stdout.columns)!=null?D:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(r)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:r}:{columns:(n=u.columns)!=null?n:[],stdoutColumns:(e=u.stdoutColumns)!=null?e:r}};x(),x(),x(),x(),x();function Rn({onlyFirst:u=!1}={}){let D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}function ee(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Rn(),"")}x();function Mn(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}var jn=In(_n(),1);function M(u){if(typeof u!="string"||u.length===0||(u=ee(u),u.length===0))return 0;u=u.replace((0,jn.default)()," ");let D=0;for(let n=0;n<u.length;n++){let e=u.codePointAt(n);e<=31||e>=127&&e<=159||e>=768&&e<=879||(e>65535&&n++,D+=Mn(e)?2:1)}return D}var te=u=>Math.max(...u.split(`
3
+ `).map(M)),Nn=u=>{let D=[];for(let n of u){let{length:e}=n,r=e-D.length;for(let o=0;o<r;o+=1)D.push(0);for(let o=0;o<e;o+=1){let t=te(n[o]);t>D[o]&&(D[o]=t)}}return D};x();var ne=/^\d+%$/,re={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ln=(u,D)=>{var n;let e=[];for(let r=0;r<u.length;r+=1){let o=(n=D[r])!=null?n:"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&ne.test(o)){e.push(Ru(du({},re),{width:o,contentWidth:u[r]}));continue}if(o&&typeof o=="object"){let t=Ru(du(du({},re),o),{contentWidth:u[r]});t.horizontalPadding=t.paddingLeft+t.paddingRight,e.push(t);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return e};function Gn(u,D){for(let n of u){let{width:e}=n;if(e==="content-width"&&(n.width=n.contentWidth),e==="auto"){let i=Math.min(20,n.contentWidth);n.width=i,n.autoOverflow=n.contentWidth-i}if(typeof e=="string"&&ne.test(e)){let i=Number.parseFloat(e.slice(0,-1))/100;n.width=Math.floor(D*i)-(n.paddingLeft+n.paddingRight)}let{horizontalPadding:r}=n,o=1,t=o+r;if(t>=D){let i=t-D,l=Math.ceil(n.paddingLeft/r*i),F=i-l;n.paddingLeft-=l,n.paddingRight-=F,n.horizontalPadding=n.paddingLeft+n.paddingRight}n.paddingLeftString=n.paddingLeft?" ".repeat(n.paddingLeft):"",n.paddingRightString=n.paddingRight?" ".repeat(n.paddingRight):"";let s=D-n.horizontalPadding;n.width=Math.max(Math.min(n.width,s),o)}}var oe=()=>Object.assign([],{columns:0});function Un(u,D){let n=[oe()],[e]=n;for(let r of u){let o=r.width+r.horizontalPadding;e.columns+o>D&&(e=oe(),n.push(e)),e.push(r),e.columns+=o}for(let r of n){let o=r.reduce((c,C)=>c+C.width+C.horizontalPadding,0),t=D-o;if(t===0)continue;let s=r.filter(c=>"autoOverflow"in c),i=s.filter(c=>c.autoOverflow>0),l=i.reduce((c,C)=>c+C.autoOverflow,0),F=Math.min(l,t);for(let c of i){let C=Math.floor(c.autoOverflow/l*F);c.width+=C,t-=C}let a=Math.floor(t/s.length);for(let c=0;c<s.length;c+=1){let C=s[c];c===s.length-1?C.width+=t:C.width+=a,t-=a}}return n}function Wn(u,D,n){let e=Ln(n,D);return Gn(e,u),Un(e,u)}x(),x(),x();var Mu=10,se=(u=0)=>D=>`\x1B[${D+u}m`,ie=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,ae=(u=0)=>(D,n,e)=>`\x1B[${38+u};2;${D};${n};${e}m`;function Hn(){let u=new Map,D={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};D.color.gray=D.color.blackBright,D.bgColor.bgGray=D.bgColor.bgBlackBright,D.color.grey=D.color.blackBright,D.bgColor.bgGrey=D.bgColor.bgBlackBright;for(let[n,e]of Object.entries(D)){for(let[r,o]of Object.entries(e))D[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},e[r]=D[r],u.set(o[0],o[1]);Object.defineProperty(D,n,{value:e,enumerable:!1})}return Object.defineProperty(D,"codes",{value:u,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=se(),D.color.ansi256=ie(),D.color.ansi16m=ae(),D.bgColor.ansi=se(Mu),D.bgColor.ansi256=ie(Mu),D.bgColor.ansi16m=ae(Mu),Object.defineProperties(D,{rgbToAnsi256:{value:(n,e,r)=>n===e&&e===r?n<8?16:n>248?231:Math.round((n-8)/247*24)+232:16+36*Math.round(n/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:n=>{let e=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(n.toString(16));if(!e)return[0,0,0];let{colorString:r}=e.groups;r.length===3&&(r=r.split("").map(t=>t+t).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:n=>D.rgbToAnsi256(...D.hexToRgb(n)),enumerable:!1},ansi256ToAnsi:{value:n=>{if(n<8)return 30+n;if(n<16)return 90+(n-8);let e,r,o;if(n>=232)e=((n-232)*10+8)/255,r=e,o=e;else{n-=16;let i=n%36;e=Math.floor(n/36)/5,r=Math.floor(i/6)/5,o=i%6/5}let t=Math.max(e,r,o)*2;if(t===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(e));return t===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(n,e,r)=>D.ansi256ToAnsi(D.rgbToAnsi256(n,e,r)),enumerable:!1},hexToAnsi:{value:n=>D.ansi256ToAnsi(D.hexToAnsi256(n)),enumerable:!1}}),D}var qn=Hn(),zn=qn,pu=new Set(["\x1B","\x9B"]),Kn=39,ju="\x07",ce="[",Vn="]",le="m",Nu=`${Vn}8;;`,Fe=u=>`${pu.values().next().value}${ce}${u}${le}`,Ce=u=>`${pu.values().next().value}${Nu}${u}${ju}`,Yn=u=>u.split(" ").map(D=>M(D)),Lu=(u,D,n)=>{let e=[...D],r=!1,o=!1,t=M(ee(u[u.length-1]));for(let[s,i]of e.entries()){let l=M(i);if(t+l<=n?u[u.length-1]+=i:(u.push(i),t=0),pu.has(i)&&(r=!0,o=e.slice(s+1).join("").startsWith(Nu)),r){o?i===ju&&(r=!1,o=!1):i===le&&(r=!1);continue}t+=l,t===n&&s<e.length-1&&(u.push(""),t=0)}!t&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},Jn=u=>{let D=u.split(" "),n=D.length;for(;n>0&&!(M(D[n-1])>0);)n--;return n===D.length?u:D.slice(0,n).join(" ")+D.slice(n).join("")},Xn=(u,D,n={})=>{if(n.trim!==!1&&u.trim()==="")return"";let e="",r,o,t=Yn(u),s=[""];for(let[l,F]of u.split(" ").entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let a=M(s[s.length-1]);if(l!==0&&(a>=D&&(n.wordWrap===!1||n.trim===!1)&&(s.push(""),a=0),(a>0||n.trim===!1)&&(s[s.length-1]+=" ",a++)),n.hard&&t[l]>D){let c=D-a,C=1+Math.floor((t[l]-c-1)/D);Math.floor((t[l]-1)/D)<C&&s.push(""),Lu(s,F,D);continue}if(a+t[l]>D&&a>0&&t[l]>0){if(n.wordWrap===!1&&a<D){Lu(s,F,D);continue}s.push("")}if(a+t[l]>D&&n.wordWrap===!1){Lu(s,F,D);continue}s[s.length-1]+=F}n.trim!==!1&&(s=s.map(l=>Jn(l)));let i=[...s.join(`
4
+ `)];for(let[l,F]of i.entries()){if(e+=F,pu.has(F)){let{groups:c}=new RegExp(`(?:\\${ce}(?<code>\\d+)m|\\${Nu}(?<uri>.*)${ju})`).exec(i.slice(l).join(""))||{groups:{}};if(c.code!==void 0){let C=Number.parseFloat(c.code);r=C===Kn?void 0:C}else c.uri!==void 0&&(o=c.uri.length===0?void 0:c.uri)}let a=zn.codes.get(Number(r));i[l+1]===`
5
+ `?(o&&(e+=Ce("")),r&&a&&(e+=Fe(a))):F===`
6
+ `&&(r&&a&&(e+=Fe(r)),o&&(e+=Ce(o)))}return e};function Zn(u,D,n){return String(u).normalize().replace(/\r\n/g,`
7
+ `).split(`
8
+ `).map(e=>Xn(e,D,n)).join(`
9
+ `)}var fe=u=>Array.from({length:u}).fill("");function Qn(u,D){let n=[],e=0;for(let r of u){let o=0,t=r.map(i=>{var l;let F=(l=D[e])!=null?l:"";e+=1,i.preprocess&&(F=i.preprocess(F)),te(F)>i.width&&(F=Zn(F,i.width,{hard:!0}));let a=F.split(`
10
+ `);if(i.postprocess){let{postprocess:c}=i;a=a.map((C,f)=>c.call(i,C,f))}return i.paddingTop&&a.unshift(...fe(i.paddingTop)),i.paddingBottom&&a.push(...fe(i.paddingBottom)),a.length>o&&(o=a.length),Ru(du({},i),{lines:a})}),s=[];for(let i=0;i<o;i+=1){let l=t.map(F=>{var a;let c=(a=F.lines[i])!=null?a:"",C=Number.isFinite(F.width)?" ".repeat(F.width-M(c)):"",f=F.paddingLeftString;return F.align==="right"&&(f+=C),f+=c,F.align==="left"&&(f+=C),f+F.paddingRightString}).join("");s.push(l)}n.push(s.join(`
11
+ `))}return n.join(`
12
+ `)}function ur(u,D){if(!u||u.length===0)return"";let n=Nn(u),e=n.length;if(e===0)return"";let{stdoutColumns:r,columns:o}=kn(D);if(o.length>e)throw new Error(`${o.length} columns defined, but only ${e} columns found`);let t=Wn(r,o,n);return u.map(s=>Qn(t,s)).join(`
13
+ `)}x();var Dr=["<",">","=",">=","<="];function er(u){if(!Dr.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}function tr(u){let D=Object.keys(u).map(n=>{let[e,r]=n.split(" ");er(e);let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new TypeError(`Invalid breakpoint value: ${r}`);let t=u[n];return{operator:e,breakpoint:o,value:t}}).sort((n,e)=>e.breakpoint-n.breakpoint);return n=>{var e;return(e=D.find(({operator:r,breakpoint:o})=>r==="="&&n===o||r===">"&&n>o||r==="<"&&n<o||r===">="&&n>=o||r==="<="&&n<=o))==null?void 0:e.value}}const nr=u=>u.replace(/[\W_]([a-z\d])?/gi,(D,n)=>n?n.toUpperCase():""),rr=u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),or={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:u=>u.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function sr(u){let D=!1;return{type:"table",data:{tableData:Object.keys(u).sort((n,e)=>n.localeCompare(e)).map(n=>{const e=u[n],r="alias"in e;return r&&(D=!0),{name:n,flag:e,flagFormatted:`--${rr(n)}`,aliasesEnabled:D,aliasFormatted:r?`-${e.alias}`:void 0}}).map(n=>(n.aliasesEnabled=D,[{type:"flagName",data:n},{type:"flagDescription",data:n}])),tableBreakpoints:or}}}const Ee=u=>!u||(u.version??(u.help?u.help.version:void 0)),de=u=>{const D="parent"in u&&u.parent?.name;return(D?`${D} `:"")+u.name};function ir(u){const D=[];u.name&&D.push(de(u));const n=Ee(u)??("parent"in u&&Ee(u.parent));if(n&&D.push(`v${n}`),D.length!==0)return{id:"name",type:"text",data:`${D.join(" ")}
14
+ `}}function ar(u){const{help:D}=u;if(!(!D||!D.description))return{id:"description",type:"text",data:`${D.description}
15
+ `}}function cr(u){const D=u.help||{};if("usage"in D)return D.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(D.usage)?D.usage.join(`
16
+ `):D.usage}}:void 0;if(u.name){const n=[],e=[de(u)];if(u.flags&&Object.keys(u.flags).length>0&&e.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:r}=u,o=r.indexOf("--"),t=o>-1&&r.slice(o+1).some(s=>s.startsWith("<"));e.push(r.map(s=>s!=="--"?s:t?"--":"[--]").join(" "))}if(e.length>1&&n.push(e.join(" ")),"commands"in u&&u.commands?.length&&n.push(`${u.name} <command>`),n.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:n.join(`
17
+ `)}}}}function lr(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(D=>[D.options.name,D.options.help?D.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function Fr(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:sr(u.flags),indentBody:0}}}function Cr(u){const{help:D}=u;if(!D||!D.examples||D.examples.length===0)return;let{examples:n}=D;if(Array.isArray(n)&&(n=n.join(`
18
+ `)),n)return{id:"examples",type:"section",data:{title:"Examples:",body:n}}}function fr(u){if(!("alias"in u)||!u.alias)return;const{alias:D}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(D)?D.join(", "):D}}}const Er=u=>[ir,ar,cr,lr,Fr,Cr,fr].map(D=>D(u)).filter(Boolean),dr=Fu.WriteStream.prototype.hasColors();class pr{text(D){return D}bold(D){return dr?`\x1B[1m${D}\x1B[22m`:D.toLocaleUpperCase()}indentText({text:D,spaces:n}){return D.replace(/^/gm," ".repeat(n))}heading(D){return this.bold(D)}section({title:D,body:n,indentBody:e=2}){return`${(D?`${this.heading(D)}
19
+ `:"")+(n?this.indentText({text:this.render(n),spaces:e}):"")}
20
+ `}table({tableData:D,tableOptions:n,tableBreakpoints:e}){return ur(D.map(r=>r.map(o=>this.render(o))),e?tr(e):n)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:n,flagFormatted:e,aliasesEnabled:r,aliasFormatted:o}=D;let t="";if(o?t+=`${o}, `:r&&(t+=" "),t+=e,"placeholder"in n&&typeof n.placeholder=="string")t+=`${this.flagOperator(D)}${n.placeholder}`;else{const s=this.flagParameter("type"in n?n.type:n);s&&(t+=`${this.flagOperator(D)}${s}`)}return t}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let n="description"in D?D.description??"":"";if("default"in D){let{default:e}=D;typeof e=="function"&&(e=e()),e&&(n+=` (default: ${this.flagDefault(e)})`)}return n}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(n=>this.render(n)).join(`
21
+ `);if("type"in D&&this[D.type]){const n=this[D.type];if(typeof n=="function")return n.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}}const Gu=/^[\w.-]+$/,{stringify:I}=JSON,hr=/[|\\{}()[\]^$+*?.]/;function Uu(u){const D=[];let n,e;for(const r of u){if(e)throw new Error(`Invalid parameter: Spread parameter ${I(e)} must be last`);const o=r[0],t=r[r.length-1];let s;if(o==="<"&&t===">"&&(s=!0,n))throw new Error(`Invalid parameter: Required parameter ${I(r)} cannot come after optional parameter ${I(n)}`);if(o==="["&&t==="]"&&(s=!1,n=r),s===void 0)throw new Error(`Invalid parameter: ${I(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=r.slice(1,-1);const l=i.slice(-3)==="...";l&&(e=r,i=i.slice(0,-3));const F=i.match(hr);if(F)throw new Error(`Invalid parameter: ${I(r)}. Invalid character found ${I(F[0])}`);D.push({name:i,required:s,spread:l})}return D}function Wu(u,D,n,e){for(let r=0;r<D.length;r+=1){const{name:o,required:t,spread:s}=D[r],i=nr(o);if(i in u)throw new Error(`Invalid parameter: ${I(o)} is used more than once.`);const l=s?n.slice(r):n[r];if(s&&(r=D.length),t&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${I(o)}
22
+ `),e(),process.exit(1);u[i]=l}}function mr(u){return u===void 0||u!==!1}function pe(u,D,n,e){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:t}=D,s=mr(t);s&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=Bn(r,e,{ignore:D.ignoreArgv}),l=()=>{console.log(D.version)};if(o&&i.flags.version===!0)return l(),process.exit(0);const F=new pr,a=s&&t?.render?t.render:f=>F.render(f),c=f=>{const E=Er({...D,...f?{help:f}:{},flags:r});console.log(a(E,F))};if(s&&i.flags.help===!0)return c(),process.exit(0);if(D.parameters){let{parameters:f}=D,E=i._;const p=f.indexOf("--"),h=f.slice(p+1),w=Object.create(null);if(p>-1&&h.length>0){f=f.slice(0,p);const _=i._["--"];E=E.slice(0,-_.length||void 0),Wu(w,Uu(f),E,c),Wu(w,Uu(h),_,c)}else Wu(w,Uu(f),E,c);Object.assign(i._,w)}const C={...i,showVersion:l,showHelp:c};return typeof n=="function"&&n(C),{command:u,...C}}function gr(u,D){const n=new Map;for(const e of D){const r=[e.options.name],{alias:o}=e.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const t of r){if(n.has(t))throw new Error(`Duplicate command name found: ${I(t)}`);n.set(t,e)}}return n.get(u)}function Br(u,D,n=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Gu.test(u.name)))throw new Error(`Invalid script name: ${I(u.name)}`);const e=n[0];if(u.commands&&Gu.test(e)){const r=gr(e,u.commands);if(r)return pe(r.options.name,{...r.options,parent:u},r.callback,n.slice(1))}return pe(void 0,u,D,n)}function he(u,D){if(!u)throw new Error("Command options are required");const{name:n}=u;if(u.name===void 0)throw new Error("Command name is required");if(!Gu.test(n))throw new Error(`Invalid command name ${JSON.stringify(n)}. Command names must be one word.`);return{options:u,callback:D}}var me="0.0.0-semantic-release",Ar="Writes your git commit messages for you with AI",y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var H={exports:{}},Hu,ge;function br(){if(ge)return Hu;ge=1,Hu=e,e.sync=r;var u=_u;function D(o,t){var s=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!s||(s=s.split(";"),s.indexOf("")!==-1))return!0;for(var i=0;i<s.length;i++){var l=s[i].toLowerCase();if(l&&o.substr(-l.length).toLowerCase()===l)return!0}return!1}function n(o,t,s){return!o.isSymbolicLink()&&!o.isFile()?!1:D(t,s)}function e(o,t,s){u.stat(o,function(i,l){s(i,i?!1:n(l,o,t))})}function r(o,t){return n(u.statSync(o),o,t)}return Hu}var qu,Be;function yr(){if(Be)return qu;Be=1,qu=D,D.sync=n;var u=_u;function D(o,t,s){u.stat(o,function(i,l){s(i,i?!1:e(l,t))})}function n(o,t){return e(u.statSync(o),t)}function e(o,t){return o.isFile()&&r(o,t)}function r(o,t){var s=o.mode,i=o.uid,l=o.gid,F=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),c=parseInt("100",8),C=parseInt("010",8),f=parseInt("001",8),E=c|C,p=s&f||s&C&&l===a||s&c&&i===F||s&E&&F===0;return p}return qu}var hu;process.platform==="win32"||y.TESTING_WINDOWS?hu=br():hu=yr();var wr=zu;zu.sync=$r;function zu(u,D,n){if(typeof D=="function"&&(n=D,D={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(e,r){zu(u,D||{},function(o,t){o?r(o):e(t)})})}hu(u,D||{},function(e,r){e&&(e.code==="EACCES"||D&&D.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function $r(u,D){try{return hu.sync(u,D||{})}catch(n){if(D&&D.ignoreErrors||n.code==="EACCES")return!1;throw n}}const q=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Ae=W,vr=q?";":":",be=wr,ye=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),we=(u,D)=>{const n=D.colon||vr,e=u.match(/\//)||q&&u.match(/\\/)?[""]:[...q?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(n)],r=q?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=q?r.split(n):[""];return q&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:e,pathExt:o,pathExtExe:r}},$e=(u,D,n)=>{typeof D=="function"&&(n=D,D={}),D||(D={});const{pathEnv:e,pathExt:r,pathExtExe:o}=we(u,D),t=[],s=l=>new Promise((F,a)=>{if(l===e.length)return D.all&&t.length?F(t):a(ye(u));const c=e[l],C=/^".*"$/.test(c)?c.slice(1,-1):c,f=Ae.join(C,u),E=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+f:f;F(i(E,l,0))}),i=(l,F,a)=>new Promise((c,C)=>{if(a===r.length)return c(s(F+1));const f=r[a];be(l+f,{pathExt:o},(E,p)=>{if(!E&&p)if(D.all)t.push(l+f);else return c(l+f);return c(i(l,F,a+1))})});return n?s(0).then(l=>n(null,l),n):s(0)},xr=(u,D)=>{D=D||{};const{pathEnv:n,pathExt:e,pathExtExe:r}=we(u,D),o=[];for(let t=0;t<n.length;t++){const s=n[t],i=/^".*"$/.test(s)?s.slice(1,-1):s,l=Ae.join(i,u),F=!i&&/^\.[\\\/]/.test(u)?u.slice(0,2)+l:l;for(let a=0;a<e.length;a++){const c=F+e[a];try{if(be.sync(c,{pathExt:r}))if(D.all)o.push(c);else return c}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw ye(u)};var Sr=$e;$e.sync=xr;var Ku={exports:{}};const ve=(u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"};Ku.exports=ve,Ku.exports.default=ve;var Or=Ku.exports;const xe=W,Tr=Sr,Pr=Or;function Se(u,D){const n=u.options.env||process.env,e=process.cwd(),r=u.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}let t;try{t=Tr.sync(u.command,{path:n[Pr({env:n})],pathExt:D?xe.delimiter:void 0})}catch{}finally{o&&process.chdir(e)}return t&&(t=xe.resolve(r?u.options.cwd:"",t)),t}function Ir(u){return Se(u)||Se(u,!0)}var _r=Ir,Vu={};const Yu=/([()\][%!^"`<>&|;, *?])/g;function kr(u){return u=u.replace(Yu,"^$1"),u}function Rr(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(Yu,"^$1"),D&&(u=u.replace(Yu,"^$1")),u}Vu.command=kr,Vu.argument=Rr;var Mr=/^#!(.*)/;const jr=Mr;var Nr=(u="")=>{const D=u.match(jr);if(!D)return null;const[n,e]=D[0].replace(/#! ?/,"").split(" "),r=n.split("/").pop();return r==="env"?e:e?`${r} ${e}`:r};const Ju=_u,Lr=Nr;function Gr(u){const n=Buffer.alloc(150);let e;try{e=Ju.openSync(u,"r"),Ju.readSync(e,n,0,150,0),Ju.closeSync(e)}catch{}return Lr(n.toString())}var Ur=Gr;const Wr=W,Oe=_r,Te=Vu,Hr=Ur,qr=process.platform==="win32",zr=/\.(?:com|exe)$/i,Kr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Vr(u){u.file=Oe(u);const D=u.file&&Hr(u.file);return D?(u.args.unshift(u.file),u.command=D,Oe(u)):u.file}function Yr(u){if(!qr)return u;const D=Vr(u),n=!zr.test(D);if(u.options.forceShell||n){const e=Kr.test(D);u.command=Wr.normalize(u.command),u.command=Te.command(u.command),u.args=u.args.map(o=>Te.argument(o,e));const r=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${r}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}function Jr(u,D,n){D&&!Array.isArray(D)&&(n=D,D=null),D=D?D.slice(0):[],n=Object.assign({},n);const e={command:u,args:D,options:n,file:void 0,original:{command:u,args:D}};return n.shell?e:Yr(e)}var Xr=Jr;const Xu=process.platform==="win32";function Zu(u,D){return Object.assign(new Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function Zr(u,D){if(!Xu)return;const n=u.emit;u.emit=function(e,r){if(e==="exit"){const o=Pe(r,D);if(o)return n.call(u,"error",o)}return n.apply(u,arguments)}}function Pe(u,D){return Xu&&u===1&&!D.file?Zu(D.original,"spawn"):null}function Qr(u,D){return Xu&&u===1&&!D.file?Zu(D.original,"spawnSync"):null}var uo={hookChildProcess:Zr,verifyENOENT:Pe,verifyENOENTSync:Qr,notFoundError:Zu};const Ie=qt,Qu=Xr,uD=uo;function _e(u,D,n){const e=Qu(u,D,n),r=Ie.spawn(e.command,e.args,e.options);return uD.hookChildProcess(r,e),r}function Do(u,D,n){const e=Qu(u,D,n),r=Ie.spawnSync(e.command,e.args,e.options);return r.error=r.error||uD.verifyENOENTSync(r.status,e),r}H.exports=_e,H.exports.spawn=_e,H.exports.sync=Do,H.exports._parse=Qu,H.exports._enoent=uD;var eo=H.exports,to=j(eo);function no(u){const D=typeof u=="string"?`
23
+ `:`
24
+ `.charCodeAt(),n=typeof u=="string"?"\r":"\r".charCodeAt();return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===n&&(u=u.slice(0,-1)),u}function ke(u={}){const{env:D=process.env,platform:n=process.platform}=u;return n!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"}function ro(u={}){const{cwd:D=b.cwd(),path:n=b.env[ke()],execPath:e=b.execPath}=u;let r;const o=D instanceof URL?zt.fileURLToPath(D):D;let t=U.resolve(o);const s=[];for(;r!==t;)s.push(U.join(t,"node_modules/.bin")),r=t,t=U.resolve(t,"..");return s.push(U.resolve(o,e,"..")),[...s,n].join(U.delimiter)}function oo({env:u=b.env,...D}={}){u={...u};const n=ke({env:u});return D.path=u[n],u[n]=ro(D),u}const so=(u,D,n,e)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const r=Object.getOwnPropertyDescriptor(u,n),o=Object.getOwnPropertyDescriptor(D,n);!io(r,o)&&e||Object.defineProperty(u,n,o)},io=function(u,D){return u===void 0||u.configurable||u.writable===D.writable&&u.enumerable===D.enumerable&&u.configurable===D.configurable&&(u.writable||u.value===D.value)},ao=(u,D)=>{const n=Object.getPrototypeOf(D);n!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,n)},co=(u,D)=>`/* Wrapped ${u}*/
25
+ ${D}`,lo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Fo=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Co=(u,D,n)=>{const e=n===""?"":`with ${n.trim()}() `,r=co.bind(null,e,D.toString());Object.defineProperty(r,"name",Fo),Object.defineProperty(u,"toString",{...lo,value:r})};function fo(u,D,{ignoreNonConfigurable:n=!1}={}){const{name:e}=u;for(const r of Reflect.ownKeys(D))so(u,D,r,n);return ao(u,D),Co(u,D,e),u}const mu=new WeakMap,Re=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let n,e=0;const r=u.displayName||u.name||"<anonymous>",o=function(...t){if(mu.set(o,++e),e===1)n=u.apply(this,t),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return n};return fo(o,u),mu.set(o,e),o};Re.callCount=u=>{if(!mu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return mu.get(u)};const Eo=()=>{const u=je-Me+1;return Array.from({length:u},po)},po=(u,D)=>({name:`SIGRT${D+1}`,number:Me+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Me=34,je=64,ho=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],Ne=()=>{const u=Eo();return[...ho,...u].map(mo)},mo=({name:u,number:D,description:n,action:e,forced:r=!1,standard:o})=>{const{signals:{[u]:t}}=zD,s=t!==void 0;return{name:u,number:s?t:D,description:n,supported:s,action:e,forced:r,standard:o}},go=()=>{const u=Ne();return Object.fromEntries(u.map(Bo))},Bo=({name:u,number:D,description:n,supported:e,action:r,forced:o,standard:t})=>[u,{name:u,number:D,description:n,supported:e,action:r,forced:o,standard:t}],Ao=go(),bo=()=>{const u=Ne(),D=je+1,n=Array.from({length:D},(e,r)=>yo(r,u));return Object.assign({},...n)},yo=(u,D)=>{const n=wo(u,D);if(n===void 0)return{};const{name:e,description:r,supported:o,action:t,forced:s,standard:i}=n;return{[u]:{name:e,number:u,description:r,supported:o,action:t,forced:s,standard:i}}},wo=(u,D)=>{const n=D.find(({name:e})=>zD.signals[e]===u);return n!==void 0?n:D.find(e=>e.number===u)};bo();const $o=({timedOut:u,timeout:D,errorCode:n,signal:e,signalDescription:r,exitCode:o,isCanceled:t})=>u?`timed out after ${D} milliseconds`:t?"was canceled":n!==void 0?`failed with ${n}`:e!==void 0?`was killed with ${e} (${r})`:o!==void 0?`failed with exit code ${o}`:"failed",Le=({stdout:u,stderr:D,all:n,error:e,signal:r,exitCode:o,command:t,escapedCommand:s,timedOut:i,isCanceled:l,killed:F,parsed:{options:{timeout:a}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const c=r===void 0?void 0:Ao[r].description,C=e&&e.code,E=`Command ${$o({timedOut:i,timeout:a,errorCode:C,signal:r,signalDescription:c,exitCode:o,isCanceled:l})}: ${t}`,p=Object.prototype.toString.call(e)==="[object Error]",h=p?`${E}
26
+ ${e.message}`:E,w=[h,D,u].filter(Boolean).join(`
27
+ `);return p?(e.originalMessage=e.message,e.message=w):e=new Error(w),e.shortMessage=h,e.command=t,e.escapedCommand=s,e.exitCode=o,e.signal=r,e.signalDescription=c,e.stdout=u,e.stderr=D,n!==void 0&&(e.all=n),"bufferedData"in e&&delete e.bufferedData,e.failed=!0,e.timedOut=!!i,e.isCanceled=l,e.killed=F&&!i,e},gu=["stdin","stdout","stderr"],vo=u=>gu.some(D=>u[D]!==void 0),xo=u=>{if(!u)return;const{stdio:D}=u;if(D===void 0)return gu.map(e=>u[e]);if(vo(u))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${gu.map(e=>`\`${e}\``).join(", ")}`);if(typeof D=="string")return D;if(!Array.isArray(D))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof D}\``);const n=Math.max(D.length,gu.length);return Array.from({length:n},(e,r)=>D[r])};var z={exports:{}},Bu={exports:{}};Bu.exports;var Ge;function So(){return Ge||(Ge=1,function(u){u.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&u.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&u.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Bu)),Bu.exports}var m=y.process;const N=function(u){return u&&typeof u=="object"&&typeof u.removeListener=="function"&&typeof u.emit=="function"&&typeof u.reallyExit=="function"&&typeof u.listeners=="function"&&typeof u.kill=="function"&&typeof u.pid=="number"&&typeof u.on=="function"};if(!N(m))z.exports=function(){return function(){}};else{var Oo=KD,uu=So(),To=/^win/i.test(m.platform),Au=VD;typeof Au!="function"&&(Au=Au.EventEmitter);var $;m.__signal_exit_emitter__?$=m.__signal_exit_emitter__:($=m.__signal_exit_emitter__=new Au,$.count=0,$.emitted={}),$.infinite||($.setMaxListeners(1/0),$.infinite=!0),z.exports=function(u,D){if(!N(y.process))return function(){};Oo.equal(typeof u,"function","a callback must be provided for exit handler"),Du===!1&&Ue();var n="exit";D&&D.alwaysLast&&(n="afterexit");var e=function(){$.removeListener(n,u),$.listeners("exit").length===0&&$.listeners("afterexit").length===0&&DD()};return $.on(n,u),e};var DD=function(){!Du||!N(y.process)||(Du=!1,uu.forEach(function(D){try{m.removeListener(D,eD[D])}catch{}}),m.emit=tD,m.reallyExit=We,$.count-=1)};z.exports.unload=DD;var K=function(D,n,e){$.emitted[D]||($.emitted[D]=!0,$.emit(D,n,e))},eD={};uu.forEach(function(u){eD[u]=function(){if(N(y.process)){var n=m.listeners(u);n.length===$.count&&(DD(),K("exit",null,u),K("afterexit",null,u),To&&u==="SIGHUP"&&(u="SIGINT"),m.kill(m.pid,u))}}}),z.exports.signals=function(){return uu};var Du=!1,Ue=function(){Du||!N(y.process)||(Du=!0,$.count+=1,uu=uu.filter(function(D){try{return m.on(D,eD[D]),!0}catch{return!1}}),m.emit=Io,m.reallyExit=Po)};z.exports.load=Ue;var We=m.reallyExit,Po=function(D){N(y.process)&&(m.exitCode=D||0,K("exit",m.exitCode,null),K("afterexit",m.exitCode,null),We.call(m,m.exitCode))},tD=m.emit,Io=function(D,n){if(D==="exit"&&N(y.process)){n!==void 0&&(m.exitCode=n);var e=tD.apply(this,arguments);return K("exit",m.exitCode,null),K("afterexit",m.exitCode,null),e}else return tD.apply(this,arguments)}}var _o=z.exports,ko=j(_o);const Ro=1e3*5,Mo=(u,D="SIGTERM",n={})=>{const e=u(D);return jo(u,D,n,e),e},jo=(u,D,n,e)=>{if(!No(D,n,e))return;const r=Go(n),o=setTimeout(()=>{u("SIGKILL")},r);o.unref&&o.unref()},No=(u,{forceKillAfterTimeout:D},n)=>Lo(u)&&D!==!1&&n,Lo=u=>u===Kt.constants.signals.SIGTERM||typeof u=="string"&&u.toUpperCase()==="SIGTERM",Go=({forceKillAfterTimeout:u=!0})=>{if(u===!0)return Ro;if(!Number.isFinite(u)||u<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${u}\` (${typeof u})`);return u},Uo=(u,D)=>{u.kill()&&(D.isCanceled=!0)},Wo=(u,D,n)=>{u.kill(D),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:D}))},Ho=(u,{timeout:D,killSignal:n="SIGTERM"},e)=>{if(D===0||D===void 0)return e;let r;const o=new Promise((s,i)=>{r=setTimeout(()=>{Wo(u,n,i)},D)}),t=e.finally(()=>{clearTimeout(r)});return Promise.race([o,t])},qo=({timeout:u})=>{if(u!==void 0&&(!Number.isFinite(u)||u<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${u}\` (${typeof u})`)},zo=async(u,{cleanup:D,detached:n},e)=>{if(!D||n)return e;const r=ko(()=>{u.kill()});return e.finally(()=>{r()})};function Ko(u){return u!==null&&typeof u=="object"&&typeof u.pipe=="function"}var eu={exports:{}};const{PassThrough:Vo}=ku;var Yo=u=>{u={...u};const{array:D}=u;let{encoding:n}=u;const e=n==="buffer";let r=!1;D?r=!(n||e):n=n||"utf8",e&&(n=null);const o=new Vo({objectMode:r});n&&o.setEncoding(n);let t=0;const s=[];return o.on("data",i=>{s.push(i),r?t=s.length:t+=i.length}),o.getBufferedValue=()=>D?s:e?Buffer.concat(s,t):s.join(""),o.getBufferedLength=()=>t,o};const{constants:Jo}=Vt,Xo=ku,{promisify:Zo}=YD,Qo=Yo,us=Zo(Xo.pipeline);class He extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function nD(u,D){if(!u)throw new Error("Expected a stream");D={maxBuffer:1/0,...D};const{maxBuffer:n}=D,e=Qo(D);return await new Promise((r,o)=>{const t=s=>{s&&e.getBufferedLength()<=Jo.MAX_LENGTH&&(s.bufferedData=e.getBufferedValue()),o(s)};(async()=>{try{await us(u,e),r()}catch(s){t(s)}})(),e.on("data",()=>{e.getBufferedLength()>n&&t(new He)})}),e.getBufferedValue()}eu.exports=nD,eu.exports.buffer=(u,D)=>nD(u,{...D,encoding:"buffer"}),eu.exports.array=(u,D)=>nD(u,{...D,array:!0}),eu.exports.MaxBufferError=He;var Ds=eu.exports,qe=j(Ds);const{PassThrough:es}=ku;var ts=function(){var u=[],D=new es({objectMode:!0});return D.setMaxListeners(0),D.add=n,D.isEmpty=e,D.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(n),D;function n(o){return Array.isArray(o)?(o.forEach(n),this):(u.push(o),o.once("end",r.bind(null,o)),o.once("error",D.emit.bind(D,"error")),o.pipe(D,{end:!1}),this)}function e(){return u.length==0}function r(o){u=u.filter(function(t){return t!==o}),!u.length&&D.readable&&D.end()}},ns=j(ts);const rs=(u,D)=>{D!==void 0&&(Ko(D)?D.pipe(u.stdin):u.stdin.end(D))},os=(u,{all:D})=>{if(!D||!u.stdout&&!u.stderr)return;const n=ns();return u.stdout&&n.add(u.stdout),u.stderr&&n.add(u.stderr),n},rD=async(u,D)=>{if(!(!u||D===void 0)){u.destroy();try{return await D}catch(n){return n.bufferedData}}},oD=(u,{encoding:D,buffer:n,maxBuffer:e})=>{if(!(!u||!n))return D?qe(u,{encoding:D,maxBuffer:e}):qe.buffer(u,{maxBuffer:e})},ss=async({stdout:u,stderr:D,all:n},{encoding:e,buffer:r,maxBuffer:o},t)=>{const s=oD(u,{encoding:e,buffer:r,maxBuffer:o}),i=oD(D,{encoding:e,buffer:r,maxBuffer:o}),l=oD(n,{encoding:e,buffer:r,maxBuffer:o*2});try{return await Promise.all([t,s,i,l])}catch(F){return Promise.all([{error:F,signal:F.signal,timedOut:F.timedOut},rD(u,s),rD(D,i),rD(n,l)])}},is=(async()=>{})().constructor.prototype,as=["then","catch","finally"].map(u=>[u,Reflect.getOwnPropertyDescriptor(is,u)]),ze=(u,D)=>{for(const[n,e]of as){const r=typeof D=="function"?(...o)=>Reflect.apply(e.value,D(),o):e.value.bind(D);Reflect.defineProperty(u,n,{...e,value:r})}return u},cs=u=>new Promise((D,n)=>{u.on("exit",(e,r)=>{D({exitCode:e,signal:r})}),u.on("error",e=>{n(e)}),u.stdin&&u.stdin.on("error",e=>{n(e)})}),Ke=(u,D=[])=>Array.isArray(D)?[u,...D]:[u],ls=/^[\w.-]+$/,Fs=/"/g,Cs=u=>typeof u!="string"||ls.test(u)?u:`"${u.replace(Fs,'\\"')}"`,fs=(u,D)=>Ke(u,D).join(" "),Es=(u,D)=>Ke(u,D).map(n=>Cs(n)).join(" "),ds=1e3*1e3*100,ps=({env:u,extendEnv:D,preferLocal:n,localDir:e,execPath:r})=>{const o=D?{...b.env,...u}:u;return n?oo({env:o,cwd:e,execPath:r}):o},hs=(u,D,n={})=>{const e=to._parse(u,D,n);return u=e.command,D=e.args,n=e.options,n={maxBuffer:ds,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||b.cwd(),execPath:b.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=ps(n),n.stdio=xo(n),b.platform==="win32"&&U.basename(u,".exe")==="cmd"&&D.unshift("/q"),{file:u,args:D,options:n,parsed:e}},sD=(u,D,n)=>typeof D!="string"&&!Ht.isBuffer(D)?n===void 0?void 0:"":u.stripFinalNewline?no(D):D;function tu(u,D,n){const e=hs(u,D,n),r=fs(u,D),o=Es(u,D);qo(e.options);let t;try{t=WD.spawn(e.file,e.args,e.options)}catch(C){const f=new WD.ChildProcess,E=Promise.reject(Le({error:C,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:e,timedOut:!1,isCanceled:!1,killed:!1}));return ze(f,E)}const s=cs(t),i=Ho(t,e.options,s),l=zo(t,e.options,i),F={isCanceled:!1};t.kill=Mo.bind(null,t.kill.bind(t)),t.cancel=Uo.bind(null,t,F);const c=Re(async()=>{const[{error:C,exitCode:f,signal:E,timedOut:p},h,w,_]=await ss(t,e.options,l),lu=sD(e.options,h),R=sD(e.options,w),Iu=sD(e.options,_);if(C||f!==0||E!==null){const G=Le({error:C,exitCode:f,signal:E,stdout:lu,stderr:R,all:Iu,command:r,escapedCommand:o,parsed:e,timedOut:p,isCanceled:F.isCanceled||(e.options.signal?e.options.signal.aborted:!1),killed:t.killed});if(!e.options.reject)return G;throw G}return{command:r,escapedCommand:o,exitCode:0,stdout:lu,stderr:R,all:Iu,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return rs(t,e.options.input),t.all=os(t,e.options),ze(t,c)}let L=!0;const V=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Ve=0;if(V.process&&V.process.env&&V.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:D,NO_COLOR:n,TERM:e}=V.process.env;D||n||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:e==="dumb"?L=!1:"CI"in V.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in V.process.env)?L=!0:L=process.stdout.isTTY,L&&(Ve=e&&e.endsWith("-256color")?2:1)}let Ye={enabled:L,supportLevel:Ve};function nu(u,D,n=1){const e=`\x1B[${u}m`,r=`\x1B[${D}m`,o=new RegExp(`\\x1b\\[${D}m`,"g");return t=>Ye.enabled&&Ye.supportLevel>=n?e+(""+t).replace(o,e)+r:""+t}const iD=nu(2,22),Je=nu(30,39),bu=nu(31,39),yu=nu(32,39),Xe=nu(46,49),aD="\x1B",A=`${aD}[`,ms="\x07",cD={to(u,D){return D?`${A}${D+1};${u+1}H`:`${A}${u+1}G`},move(u,D){let n="";return u<0?n+=`${A}${-u}D`:u>0&&(n+=`${A}${u}C`),D<0?n+=`${A}${-D}A`:D>0&&(n+=`${A}${D}B`),n},up:(u=1)=>`${A}${u}A`,down:(u=1)=>`${A}${u}B`,forward:(u=1)=>`${A}${u}C`,backward:(u=1)=>`${A}${u}D`,nextLine:(u=1)=>`${A}E`.repeat(u),prevLine:(u=1)=>`${A}F`.repeat(u),left:`${A}G`,hide:`${A}?25l`,show:`${A}?25h`,save:`${aD}7`,restore:`${aD}8`},gs={up:(u=1)=>`${A}S`.repeat(u),down:(u=1)=>`${A}T`.repeat(u)},Bs={screen:`${A}2J`,up:(u=1)=>`${A}1J`.repeat(u),down:(u=1)=>`${A}J`.repeat(u),line:`${A}2K`,lineEnd:`${A}K`,lineStart:`${A}1K`,lines(u){let D="";for(let n=0;n<u;n++)D+=this.line+(n<u-1?cD.up():"");return u&&(D+=cD.left),D}};var v={cursor:cD,scroll:gs,erase:Bs,beep:ms},lD={exports:{}};let As=Fu,bs=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||As.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),g=(u,D,n=u)=>e=>{let r=""+e,o=r.indexOf(D,u.length);return~o?u+Ze(r,D,n,o)+D:u+r+D},Ze=(u,D,n,e)=>{let r=u.substring(0,e)+n,o=u.substring(e+D.length),t=o.indexOf(D);return~t?r+Ze(o,D,n,t):r+o},Qe=(u=bs)=>({isColorSupported:u,reset:u?D=>`\x1B[0m${D}\x1B[0m`:String,bold:u?g("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:u?g("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:u?g("\x1B[3m","\x1B[23m"):String,underline:u?g("\x1B[4m","\x1B[24m"):String,inverse:u?g("\x1B[7m","\x1B[27m"):String,hidden:u?g("\x1B[8m","\x1B[28m"):String,strikethrough:u?g("\x1B[9m","\x1B[29m"):String,black:u?g("\x1B[30m","\x1B[39m"):String,red:u?g("\x1B[31m","\x1B[39m"):String,green:u?g("\x1B[32m","\x1B[39m"):String,yellow:u?g("\x1B[33m","\x1B[39m"):String,blue:u?g("\x1B[34m","\x1B[39m"):String,magenta:u?g("\x1B[35m","\x1B[39m"):String,cyan:u?g("\x1B[36m","\x1B[39m"):String,white:u?g("\x1B[37m","\x1B[39m"):String,gray:u?g("\x1B[90m","\x1B[39m"):String,bgBlack:u?g("\x1B[40m","\x1B[49m"):String,bgRed:u?g("\x1B[41m","\x1B[49m"):String,bgGreen:u?g("\x1B[42m","\x1B[49m"):String,bgYellow:u?g("\x1B[43m","\x1B[49m"):String,bgBlue:u?g("\x1B[44m","\x1B[49m"):String,bgMagenta:u?g("\x1B[45m","\x1B[49m"):String,bgCyan:u?g("\x1B[46m","\x1B[49m"):String,bgWhite:u?g("\x1B[47m","\x1B[49m"):String});lD.exports=Qe(),lD.exports.createColors=Qe;var ys=lD.exports,d=j(ys);function ws({onlyFirst:u=!1}={}){const D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}function ut(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(ws(),"")}var FD={},$s={get exports(){return FD},set exports(u){FD=u}};(function(u){var D={};u.exports=D,D.eastAsianWidth=function(e){var r=e.charCodeAt(0),o=e.length==2?e.charCodeAt(1):0,t=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,t=r<<10|o,t+=65536),t==12288||65281<=t&&t<=65376||65504<=t&&t<=65510?"F":t==8361||65377<=t&&t<=65470||65474<=t&&t<=65479||65482<=t&&t<=65487||65490<=t&&t<=65495||65498<=t&&t<=65500||65512<=t&&t<=65518?"H":4352<=t&&t<=4447||4515<=t&&t<=4519||4602<=t&&t<=4607||9001<=t&&t<=9002||11904<=t&&t<=11929||11931<=t&&t<=12019||12032<=t&&t<=12245||12272<=t&&t<=12283||12289<=t&&t<=12350||12353<=t&&t<=12438||12441<=t&&t<=12543||12549<=t&&t<=12589||12593<=t&&t<=12686||12688<=t&&t<=12730||12736<=t&&t<=12771||12784<=t&&t<=12830||12832<=t&&t<=12871||12880<=t&&t<=13054||13056<=t&&t<=19903||19968<=t&&t<=42124||42128<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||55216<=t&&t<=55238||55243<=t&&t<=55291||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65106||65108<=t&&t<=65126||65128<=t&&t<=65131||110592<=t&&t<=110593||127488<=t&&t<=127490||127504<=t&&t<=127546||127552<=t&&t<=127560||127568<=t&&t<=127569||131072<=t&&t<=194367||177984<=t&&t<=196605||196608<=t&&t<=262141?"W":32<=t&&t<=126||162<=t&&t<=163||165<=t&&t<=166||t==172||t==175||10214<=t&&t<=10221||10629<=t&&t<=10630?"Na":t==161||t==164||167<=t&&t<=168||t==170||173<=t&&t<=174||176<=t&&t<=180||182<=t&&t<=186||188<=t&&t<=191||t==198||t==208||215<=t&&t<=216||222<=t&&t<=225||t==230||232<=t&&t<=234||236<=t&&t<=237||t==240||242<=t&&t<=243||247<=t&&t<=250||t==252||t==254||t==257||t==273||t==275||t==283||294<=t&&t<=295||t==299||305<=t&&t<=307||t==312||319<=t&&t<=322||t==324||328<=t&&t<=331||t==333||338<=t&&t<=339||358<=t&&t<=359||t==363||t==462||t==464||t==466||t==468||t==470||t==472||t==474||t==476||t==593||t==609||t==708||t==711||713<=t&&t<=715||t==717||t==720||728<=t&&t<=731||t==733||t==735||768<=t&&t<=879||913<=t&&t<=929||931<=t&&t<=937||945<=t&&t<=961||963<=t&&t<=969||t==1025||1040<=t&&t<=1103||t==1105||t==8208||8211<=t&&t<=8214||8216<=t&&t<=8217||8220<=t&&t<=8221||8224<=t&&t<=8226||8228<=t&&t<=8231||t==8240||8242<=t&&t<=8243||t==8245||t==8251||t==8254||t==8308||t==8319||8321<=t&&t<=8324||t==8364||t==8451||t==8453||t==8457||t==8467||t==8470||8481<=t&&t<=8482||t==8486||t==8491||8531<=t&&t<=8532||8539<=t&&t<=8542||8544<=t&&t<=8555||8560<=t&&t<=8569||t==8585||8592<=t&&t<=8601||8632<=t&&t<=8633||t==8658||t==8660||t==8679||t==8704||8706<=t&&t<=8707||8711<=t&&t<=8712||t==8715||t==8719||t==8721||t==8725||t==8730||8733<=t&&t<=8736||t==8739||t==8741||8743<=t&&t<=8748||t==8750||8756<=t&&t<=8759||8764<=t&&t<=8765||t==8776||t==8780||t==8786||8800<=t&&t<=8801||8804<=t&&t<=8807||8810<=t&&t<=8811||8814<=t&&t<=8815||8834<=t&&t<=8835||8838<=t&&t<=8839||t==8853||t==8857||t==8869||t==8895||t==8978||9312<=t&&t<=9449||9451<=t&&t<=9547||9552<=t&&t<=9587||9600<=t&&t<=9615||9618<=t&&t<=9621||9632<=t&&t<=9633||9635<=t&&t<=9641||9650<=t&&t<=9651||9654<=t&&t<=9655||9660<=t&&t<=9661||9664<=t&&t<=9665||9670<=t&&t<=9672||t==9675||9678<=t&&t<=9681||9698<=t&&t<=9701||t==9711||9733<=t&&t<=9734||t==9737||9742<=t&&t<=9743||9748<=t&&t<=9749||t==9756||t==9758||t==9792||t==9794||9824<=t&&t<=9825||9827<=t&&t<=9829||9831<=t&&t<=9834||9836<=t&&t<=9837||t==9839||9886<=t&&t<=9887||9918<=t&&t<=9919||9924<=t&&t<=9933||9935<=t&&t<=9953||t==9955||9960<=t&&t<=9983||t==10045||t==10071||10102<=t&&t<=10111||11093<=t&&t<=11097||12872<=t&&t<=12879||57344<=t&&t<=63743||65024<=t&&t<=65039||t==65533||127232<=t&&t<=127242||127248<=t&&t<=127277||127280<=t&&t<=127337||127344<=t&&t<=127386||917760<=t&&t<=917999||983040<=t&&t<=1048573||1048576<=t&&t<=1114109?"A":"N"},D.characterLength=function(e){var r=this.eastAsianWidth(e);return r=="F"||r=="W"||r=="A"?2:1};function n(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}D.length=function(e){for(var r=n(e),o=0,t=0;t<r.length;t++)o=o+this.characterLength(r[t]);return o},D.slice=function(e,r,o){textLen=D.length(e),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var t="",s=0,i=n(e),l=0;l<i.length;l++){var F=i[l],a=D.length(F);if(s>=r-(a==2?1:0))if(s+a<=o)t+=F;else break;s+=a}return t}})($s);const vs=FD;var xs=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function ru(u,D={}){if(typeof u!="string"||u.length===0||(D={ambiguousIsNarrow:!0,...D},u=ut(u),u.length===0))return 0;u=u.replace(xs()," ");const n=D.ambiguousIsNarrow?1:2;let e=0;for(const r of u){const o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(vs.eastAsianWidth(r)){case"F":case"W":e+=2;break;case"A":e+=n;break;default:e+=1}}return e}const CD=10,Dt=(u=0)=>D=>`\x1B[${D+u}m`,et=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,tt=(u=0)=>(D,n,e)=>`\x1B[${38+u};2;${D};${n};${e}m`,B={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(B.modifier);const Ss=Object.keys(B.color),Os=Object.keys(B.bgColor);[...Ss,...Os];function Ts(){const u=new Map;for(const[D,n]of Object.entries(B)){for(const[e,r]of Object.entries(n))B[e]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[e]=B[e],u.set(r[0],r[1]);Object.defineProperty(B,D,{value:n,enumerable:!1})}return Object.defineProperty(B,"codes",{value:u,enumerable:!1}),B.color.close="\x1B[39m",B.bgColor.close="\x1B[49m",B.color.ansi=Dt(),B.color.ansi256=et(),B.color.ansi16m=tt(),B.bgColor.ansi=Dt(CD),B.bgColor.ansi256=et(CD),B.bgColor.ansi16m=tt(CD),Object.defineProperties(B,{rgbToAnsi256:{value:(D,n,e)=>D===n&&n===e?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(n/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:D=>{const n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!n)return[0,0,0];let[e]=n;e.length===3&&(e=[...e].map(o=>o+o).join(""));const r=Number.parseInt(e,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>B.rgbToAnsi256(...B.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let n,e,r;if(D>=232)n=((D-232)*10+8)/255,e=n,r=n;else{D-=16;const s=D%36;n=Math.floor(D/36)/5,e=Math.floor(s/6)/5,r=s%6/5}const o=Math.max(n,e,r)*2;if(o===0)return 30;let t=30+(Math.round(r)<<2|Math.round(e)<<1|Math.round(n));return o===2&&(t+=60),t},enumerable:!1},rgbToAnsi:{value:(D,n,e)=>B.ansi256ToAnsi(B.rgbToAnsi256(D,n,e)),enumerable:!1},hexToAnsi:{value:D=>B.ansi256ToAnsi(B.hexToAnsi256(D)),enumerable:!1}}),B}const Ps=Ts(),wu=new Set(["\x1B","\x9B"]),Is=39,fD="\x07",nt="[",_s="]",rt="m",ED=`${_s}8;;`,ot=u=>`${wu.values().next().value}${nt}${u}${rt}`,st=u=>`${wu.values().next().value}${ED}${u}${fD}`,ks=u=>u.split(" ").map(D=>ru(D)),dD=(u,D,n)=>{const e=[...D];let r=!1,o=!1,t=ru(ut(u[u.length-1]));for(const[s,i]of e.entries()){const l=ru(i);if(t+l<=n?u[u.length-1]+=i:(u.push(i),t=0),wu.has(i)&&(r=!0,o=e.slice(s+1).join("").startsWith(ED)),r){o?i===fD&&(r=!1,o=!1):i===rt&&(r=!1);continue}t+=l,t===n&&s<e.length-1&&(u.push(""),t=0)}!t&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},Rs=u=>{const D=u.split(" ");let n=D.length;for(;n>0&&!(ru(D[n-1])>0);)n--;return n===D.length?u:D.slice(0,n).join(" ")+D.slice(n).join("")},Ms=(u,D,n={})=>{if(n.trim!==!1&&u.trim()==="")return"";let e="",r,o;const t=ks(u);let s=[""];for(const[l,F]of u.split(" ").entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let a=ru(s[s.length-1]);if(l!==0&&(a>=D&&(n.wordWrap===!1||n.trim===!1)&&(s.push(""),a=0),(a>0||n.trim===!1)&&(s[s.length-1]+=" ",a++)),n.hard&&t[l]>D){const c=D-a,C=1+Math.floor((t[l]-c-1)/D);Math.floor((t[l]-1)/D)<C&&s.push(""),dD(s,F,D);continue}if(a+t[l]>D&&a>0&&t[l]>0){if(n.wordWrap===!1&&a<D){dD(s,F,D);continue}s.push("")}if(a+t[l]>D&&n.wordWrap===!1){dD(s,F,D);continue}s[s.length-1]+=F}n.trim!==!1&&(s=s.map(l=>Rs(l)));const i=[...s.join(`
28
+ `)];for(const[l,F]of i.entries()){if(e+=F,wu.has(F)){const{groups:c}=new RegExp(`(?:\\${nt}(?<code>\\d+)m|\\${ED}(?<uri>.*)${fD})`).exec(i.slice(l).join(""))||{groups:{}};if(c.code!==void 0){const C=Number.parseFloat(c.code);r=C===Is?void 0:C}else c.uri!==void 0&&(o=c.uri.length===0?void 0:c.uri)}const a=Ps.codes.get(Number(r));i[l+1]===`
29
+ `?(o&&(e+=st("")),r&&a&&(e+=ot(a))):F===`
30
+ `&&(r&&a&&(e+=ot(r)),o&&(e+=st(o)))}return e};function it(u,D,n){return String(u).normalize().replace(/\r\n/g,`
31
+ `).split(`
32
+ `).map(e=>Ms(e,D,n)).join(`
33
+ `)}function js(u,D){if(u===D)return;const n=u.split(`
34
+ `),e=D.split(`
35
+ `),r=[];for(let o=0;o<Math.max(n.length,e.length);o++)n[o]!==e[o]&&r.push(o);return r}const at=Symbol("clack:cancel");function ct(u){return u===at}function $u(u,D){u.isTTY&&u.setRawMode(D)}const lt=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),Ns=new Set(["up","down","left","right","space","enter"]);class Ft{constructor({render:D,input:n=HD,output:e=qD,...r},o=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=D.bind(this),this._track=o,this.input=n,this.output=e}prompt(){const D=new Yt(0);return D._write=(n,e,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(D),this.rl=JD.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),JD.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),$u(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((n,e)=>{this.once("submit",()=>{this.output.write(v.cursor.show),this.output.off("resize",this.render),$u(this.input,!1),n(this.value)}),this.once("cancel",()=>{this.output.write(v.cursor.show),this.output.off("resize",this.render),$u(this.input,!1),n(at)})})}on(D,n){const e=this.subscribers.get(D)??[];e.push({cb:n}),this.subscribers.set(D,e)}once(D,n){const e=this.subscribers.get(D)??[];e.push({cb:n,once:!0}),this.subscribers.set(D,e)}emit(D,...n){const e=this.subscribers.get(D)??[],r=[];for(const o of e)o.cb(...n),o.once&&r.push(()=>e.splice(e.indexOf(o),1));for(const o of r)o()}unsubscribe(){this.subscribers.clear()}onKeypress(D,n){if(this.state==="error"&&(this.state="active"),n?.name&&!this._track&&lt.has(n.name)&&this.emit("cursor",lt.get(n.name)),n?.name&&Ns.has(n.name)&&this.emit("cursor",n.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D&&this.emit("key",D.toLowerCase()),n?.name==="return"){if(this.opts.validate){const e=this.opts.validate(this.value);e&&(this.error=e,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}D===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
36
+ `),$u(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=it(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
37
+ `).length-1;this.output.write(v.cursor.move(-999,D*-1))}render(){const D=it(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(v.cursor.hide);else{const n=js(this._prevFrame,D);if(this.restoreCursor(),n&&n?.length===1){const e=n[0];this.output.write(v.cursor.move(0,e)),this.output.write(v.erase.lines(1));const r=D.split(`
38
+ `);this.output.write(r[e]),this._prevFrame=D,this.output.write(v.cursor.move(0,r.length-e-1));return}else if(n&&n?.length>1){const e=n[0];this.output.write(v.cursor.move(0,e)),this.output.write(v.erase.down());const r=D.split(`
39
+ `).slice(e);this.output.write(r.join(`
40
+ `)),this._prevFrame=D;return}this.output.write(v.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}class Ls extends Ft{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",n=>{this.output.write(v.cursor.move(0,-1)),this.value=n,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}class Gs extends Ft{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.cursor=this.options.findIndex(({value:n})=>n===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",n=>{switch(n){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}function Us({input:u=HD,output:D=qD,overwrite:n=!0,hideCursor:e=!0}={}){const r=Cu.createInterface({input:u,output:D,prompt:"",tabSize:1});Cu.emitKeypressEvents(u,r),u.isTTY&&u.setRawMode(!0);const o=(t,{name:s})=>{if(String(t)===""&&process.exit(0),!n)return;let i=s==="return"?0:-1,l=s==="return"?-1:0;Cu.moveCursor(D,i,l,()=>{Cu.clearLine(D,1,()=>{u.once("keypress",o)})})};return e&&process.stdout.write(v.cursor.hide),u.once("keypress",o),()=>{u.off("keypress",o),e&&process.stdout.write(v.cursor.show),r.terminal=!1,r.close()}}function Ws(){return b.platform!=="win32"?b.env.TERM!=="linux":!!b.env.CI||!!b.env.WT_SESSION||!!b.env.TERMINUS_SUBLIME||b.env.ConEmuTask==="{cmd::Cmder}"||b.env.TERM_PROGRAM==="Terminus-Sublime"||b.env.TERM_PROGRAM==="vscode"||b.env.TERM==="xterm-256color"||b.env.TERM==="alacritty"||b.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const pD=Ws(),k=(u,D)=>pD?u:D,Hs=k("\u25C6","*"),qs=k("\u25A0","x"),zs=k("\u25B2","x"),Ct=k("\u25C7","o"),Ks=k("\u250C","T"),S=k("\u2502","|"),hD=k("\u2514","\u2014"),mD=k("\u25CF",">"),gD=k("\u25CB"," "),ft=u=>{switch(u){case"initial":case"active":return d.cyan(Hs);case"cancel":return d.red(qs);case"error":return d.yellow(zs);case"submit":return d.green(Ct)}},Vs=u=>{const D=u.active??"Yes",n=u.inactive??"No";return new Ls({active:D,inactive:n,initialValue:u.initialValue??!0,render(){const e=`${d.gray(S)}
41
+ ${ft(this.state)} ${u.message}
42
+ `,r=this.value?D:n;switch(this.state){case"submit":return`${e}${d.gray(S)} ${d.dim(r)}`;case"cancel":return`${e}${d.gray(S)} ${d.strikethrough(d.dim(r))}
43
+ ${d.gray(S)}`;default:return`${e}${d.cyan(S)} ${this.value?`${d.green(mD)} ${D}`:`${d.dim(gD)} ${d.dim(D)}`} ${d.dim("/")} ${this.value?`${d.dim(gD)} ${d.dim(n)}`:`${d.green(mD)} ${n}`}
44
+ ${d.cyan(hD)}
45
+ `}}}).prompt()},Ys=u=>{const D=(n,e)=>{const r=n.label??String(n.value);return e==="active"?`${d.green(mD)} ${r} ${n.hint?d.dim(`(${n.hint})`):""}`:e==="selected"?`${d.dim(r)}`:e==="cancelled"?`${d.strikethrough(d.dim(r))}`:`${d.dim(gD)} ${d.dim(r)}`};return new Gs({options:u.options,initialValue:u.initialValue,render(){const n=`${d.gray(S)}
46
+ ${ft(this.state)} ${u.message}
47
+ `;switch(this.state){case"submit":return`${n}${d.gray(S)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${n}${d.gray(S)} ${D(this.options[this.cursor],"cancelled")}
48
+ ${d.gray(S)}`;default:return`${n}${d.cyan(S)} ${this.options.map((e,r)=>D(e,r===this.cursor?"active":"inactive")).join(`
49
+ ${d.cyan(S)} `)}
50
+ ${d.cyan(hD)}
51
+ `}}}).prompt()},Et=(u="")=>{process.stdout.write(`${d.gray(Ks)} ${u}
52
+ `)},Y=(u="")=>{process.stdout.write(`${d.gray(S)}
53
+ ${d.gray(hD)} ${u}
54
+
55
+ `)},BD=pD?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],AD=()=>{let u,D;const n=pD?80:120;return{start(e=""){e=e.replace(/\.?\.?\.$/,""),u=Us(),process.stdout.write(`${d.gray(S)}
56
+ ${d.magenta("\u25CB")} ${e}
57
+ `);let r=0,o=0;D=setInterval(()=>{let t=BD[r];process.stdout.write(v.cursor.move(-999,-1)),process.stdout.write(`${d.magenta(t)} ${e}${Math.floor(o)>=1?".".repeat(Math.floor(o)).slice(0,3):""}
58
+ `),r=r===BD.length-1?0:r+1,o=o===BD.length?0:o+.125},n)},stop(e=""){process.stdout.write(v.cursor.move(-999,-2)),process.stdout.write(v.erase.down(2)),clearInterval(D),process.stdout.write(`${d.gray(S)}
59
+ ${d.green(Ct)} ${e}
60
+ `),u()}}};class O extends Error{}const bD=" ",vu=u=>{u instanceof Error&&!(u instanceof O)&&(u.stack&&console.error(iD(u.stack.split(`
61
+ `).slice(1).join(`
62
+ `))),console.error(`
63
+ ${bD}${iD(`aicommit2 v${me}`)}`),console.error(`
64
+ ${bD}Please open a Bug report with the information above:`),console.error(`${bD}https://github.com/Nutlope/aicommit2/issues/new/choose`))},dt=async()=>{const{stdout:u,failed:D}=await tu("git",["rev-parse","--show-toplevel"],{reject:!1});if(D)throw new O("The current directory must be a Git repository!");return u},yD=u=>`:(exclude)${u}`,pt=["package-lock.json","pnpm-lock.yaml","*.lock"].map(yD),ht=async u=>{const D=["diff","--cached","--diff-algorithm=minimal"],{stdout:n}=await tu("git",[...D,"--name-only",...pt,...u?u.map(yD):[]]);if(!n)return;const{stdout:e}=await tu("git",[...D,...pt,...u?u.map(yD):[]]);return{files:n.split(`
65
+ `),diff:e}},Js=u=>`Detected ${u.length.toLocaleString()} staged file${u.length>1?"s":""}`,{hasOwnProperty:wD}=Object.prototype,xu=typeof process<"u"&&process.platform==="win32"?`\r
66
+ `:`
67
+ `,$D=(u,D)=>{const n=[];let e="";typeof D=="string"?D={section:D,whitespace:!1}:(D=D||Object.create(null),D.whitespace=D.whitespace===!0);const r=D.whitespace?" = ":"=";for(const o of Object.keys(u)){const t=u[o];if(t&&Array.isArray(t))for(const s of t)e+=J(o+"[]")+r+J(s)+xu;else t&&typeof t=="object"?n.push(o):e+=J(o)+r+J(t)+xu}D.section&&e.length&&(e="["+J(D.section)+"]"+xu+e);for(const o of n){const t=mt(o).join("\\."),s=(D.section?D.section+".":"")+t,{whitespace:i}=D,l=$D(u[o],{section:s,whitespace:i});e.length&&l.length&&(e+=xu),e+=l}return e},mt=u=>u.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(D=>D.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),gt=u=>{const D=Object.create(null);let n=D,e=null;const r=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=u.split(/[\r\n]+/g);for(const s of o){if(!s||s.match(/^\s*[;#]/))continue;const i=s.match(r);if(!i)continue;if(i[1]!==void 0){if(e=Su(i[1]),e==="__proto__"){n=Object.create(null);continue}n=D[e]=D[e]||Object.create(null);continue}const l=Su(i[2]),F=l.length>2&&l.slice(-2)==="[]",a=F?l.slice(0,-2):l;if(a==="__proto__")continue;const c=i[3]?Su(i[4]):!0,C=c==="true"||c==="false"||c==="null"?JSON.parse(c):c;F&&(wD.call(n,a)?Array.isArray(n[a])||(n[a]=[n[a]]):n[a]=[]),Array.isArray(n[a])?n[a].push(C):n[a]=C}const t=[];for(const s of Object.keys(D)){if(!wD.call(D,s)||typeof D[s]!="object"||Array.isArray(D[s]))continue;const i=mt(s);n=D;const l=i.pop(),F=l.replace(/\\\./g,".");for(const a of i)a!=="__proto__"&&((!wD.call(n,a)||typeof n[a]!="object")&&(n[a]=Object.create(null)),n=n[a]);n===D&&F===l||(n[F]=D[s],t.push(s))}for(const s of t)delete D[s];return D},Bt=u=>u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'"),J=u=>typeof u!="string"||u.match(/[=\r\n]/)||u.match(/^\[/)||u.length>1&&Bt(u)||u!==u.trim()?JSON.stringify(u):u.split(";").join("\\;").split("#").join("\\#"),Su=(u,D)=>{if(u=(u||"").trim(),Bt(u)){u.charAt(0)==="'"&&(u=u.slice(1,-1));try{u=JSON.parse(u)}catch{}}else{let n=!1,e="";for(let r=0,o=u.length;r<o;r++){const t=u.charAt(r);if(n)"\\;#".indexOf(t)!==-1?e+=t:e+="\\"+t,n=!1;else{if(";#".indexOf(t)!==-1)break;t==="\\"?n=!0:e+=t}}return n&&(e+="\\"),e.trim()}return u};var Xs={parse:gt,decode:gt,stringify:$D,encode:$D,safe:J,unsafe:Su},At=j(Xs);const bt=u=>T.lstat(u).then(()=>!0,()=>!1),Zs=["","conventional"],{hasOwnProperty:Qs}=Object.prototype,yt=(u,D)=>Qs.call(u,D),P=(u,D,n)=>{if(!D)throw new O(`Invalid config property ${u}: ${n}`)},Ou={OPENAI_KEY(u){if(!u)throw new O("Please set your OpenAI API key via `aicommit2 config set OPENAI_KEY=<your token>`");return P("OPENAI_KEY",u.startsWith("sk-"),'Must start with "sk-"'),u},locale(u){return u?(P("locale",u,"Cannot be empty"),P("locale",/^[a-z-]+$/i.test(u),"Must be a valid locale (letters and dashes/underscores). You can consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes"),u):"en"},generate(u){if(!u)return 1;P("generate",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return P("generate",D>0,"Must be greater than 0"),P("generate",D<=5,"Must be less or equal to 5"),D},type(u){return u?(P("type",Zs.includes(u),"Invalid commit type"),u):""},proxy(u){if(!(!u||u.length===0))return P("proxy",/^https?:\/\//.test(u),"Must be a valid URL"),u},model(u){return!u||u.length===0?"gpt-3.5-turbo":u},timeout(u){if(!u)return 1e4;P("timeout",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return P("timeout",D>=500,"Must be greater than 500ms"),D},"max-length"(u){if(!u)return 50;P("max-length",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return P("max-length",D>=20,"Must be greater than 20 characters"),D}},vD=W.join(XD.homedir(),".aicommit2"),wt=async()=>{if(!await bt(vD))return Object.create(null);const D=await T.readFile(vD,"utf8");return At.parse(D)},xD=async(u,D)=>{const n=await wt(),e={};for(const r of Object.keys(Ou)){const o=Ou[r],t=u?.[r]??n[r];if(D)try{e[r]=o(t)}catch{}else e[r]=o(t)}return e},ui=async u=>{const D=await wt();for(const[n,e]of u){if(!yt(Ou,n))throw new O(`Invalid config property: ${n}`);const r=Ou[n](e);D[n]=r}await T.writeFile(vD,At.stringify(D),"utf8")};var SD={},OD={exports:{}},ou={exports:{}},TD,$t;function Di(){if($t)return TD;$t=1;var u=1e3,D=u*60,n=D*60,e=n*24,r=e*7,o=e*365.25;TD=function(F,a){a=a||{};var c=typeof F;if(c==="string"&&F.length>0)return t(F);if(c==="number"&&isFinite(F))return a.long?i(F):s(F);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(F))};function t(F){if(F=String(F),!(F.length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(F);if(a){var c=parseFloat(a[1]),C=(a[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*r;case"days":case"day":case"d":return c*e;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*D;case"seconds":case"second":case"secs":case"sec":case"s":return c*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function s(F){var a=Math.abs(F);return a>=e?Math.round(F/e)+"d":a>=n?Math.round(F/n)+"h":a>=D?Math.round(F/D)+"m":a>=u?Math.round(F/u)+"s":F+"ms"}function i(F){var a=Math.abs(F);return a>=e?l(F,a,e,"day"):a>=n?l(F,a,n,"hour"):a>=D?l(F,a,D,"minute"):a>=u?l(F,a,u,"second"):F+" ms"}function l(F,a,c,C){var f=a>=c*1.5;return Math.round(F/c)+" "+C+(f?"s":"")}return TD}var PD,vt;function xt(){if(vt)return PD;vt=1;function u(D){e.debug=e,e.default=e,e.coerce=l,e.disable=t,e.enable=o,e.enabled=s,e.humanize=Di(),e.destroy=F,Object.keys(D).forEach(a=>{e[a]=D[a]}),e.names=[],e.skips=[],e.formatters={};function n(a){let c=0;for(let C=0;C<a.length;C++)c=(c<<5)-c+a.charCodeAt(C),c|=0;return e.colors[Math.abs(c)%e.colors.length]}e.selectColor=n;function e(a){let c,C=null,f,E;function p(...h){if(!p.enabled)return;const w=p,_=Number(new Date),lu=_-(c||_);w.diff=lu,w.prev=c,w.curr=_,c=_,h[0]=e.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let R=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(G,Ut)=>{if(G==="%%")return"%";R++;const UD=e.formatters[Ut];if(typeof UD=="function"){const Wt=h[R];G=UD.call(w,Wt),h.splice(R,1),R--}return G}),e.formatArgs.call(w,h),(w.log||e.log).apply(w,h)}return p.namespace=a,p.useColors=e.useColors(),p.color=e.selectColor(a),p.extend=r,p.destroy=e.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>C!==null?C:(f!==e.namespaces&&(f=e.namespaces,E=e.enabled(a)),E),set:h=>{C=h}}),typeof e.init=="function"&&e.init(p),p}function r(a,c){const C=e(this.namespace+(typeof c>"u"?":":c)+a);return C.log=this.log,C}function o(a){e.save(a),e.namespaces=a,e.names=[],e.skips=[];let c;const C=(typeof a=="string"?a:"").split(/[\s,]+/),f=C.length;for(c=0;c<f;c++)C[c]&&(a=C[c].replace(/\*/g,".*?"),a[0]==="-"?e.skips.push(new RegExp("^"+a.slice(1)+"$")):e.names.push(new RegExp("^"+a+"$")))}function t(){const a=[...e.names.map(i),...e.skips.map(i).map(c=>"-"+c)].join(",");return e.enable(""),a}function s(a){if(a[a.length-1]==="*")return!0;let c,C;for(c=0,C=e.skips.length;c<C;c++)if(e.skips[c].test(a))return!1;for(c=0,C=e.names.length;c<C;c++)if(e.names[c].test(a))return!0;return!1}function i(a){return a.toString().substring(2,a.toString().length-2).replace(/\.\*\?$/,"*")}function l(a){return a instanceof Error?a.stack||a.message:a}function F(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}return PD=u,PD}ou.exports;var St;function ei(){return St||(St=1,function(u,D){D.formatArgs=e,D.save=r,D.load=o,D.useColors=n,D.storage=t(),D.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),D.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function e(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+u.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;i.splice(1,0,l,"color: inherit");let F=0,a=0;i[0].replace(/%[a-zA-Z%]/g,c=>{c!=="%%"&&(F++,c==="%c"&&(a=F))}),i.splice(a,0,l)}D.log=console.debug||console.log||(()=>{});function r(i){try{i?D.storage.setItem("debug",i):D.storage.removeItem("debug")}catch{}}function o(){let i;try{i=D.storage.getItem("debug")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function t(){try{return localStorage}catch{}}u.exports=xt()(D);const{formatters:s}=u.exports;s.j=function(i){try{return JSON.stringify(i)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}(ou,ou.exports)),ou.exports}var su={exports:{}},ID,Ot;function ti(){return Ot||(Ot=1,ID=(u,D=process.argv)=>{const n=u.startsWith("-")?"":u.length===1?"-":"--",e=D.indexOf(n+u),r=D.indexOf("--");return e!==-1&&(r===-1||e<r)}),ID}var _D,Tt;function ni(){if(Tt)return _D;Tt=1;const u=XD,D=Fu,n=ti(),{env:e}=process;let r;n("no-color")||n("no-colors")||n("color=false")||n("color=never")?r=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(r=1),"FORCE_COLOR"in e&&(e.FORCE_COLOR==="true"?r=1:e.FORCE_COLOR==="false"?r=0:r=e.FORCE_COLOR.length===0?1:Math.min(parseInt(e.FORCE_COLOR,10),3));function o(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function t(i,l){if(r===0)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(i&&!l&&r===void 0)return 0;const F=r||0;if(e.TERM==="dumb")return F;if(process.platform==="win32"){const a=u.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in e)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(a=>a in e)||e.CI_NAME==="codeship"?1:F;if("TEAMCITY_VERSION"in e)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(e.TEAMCITY_VERSION)?1:0;if(e.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in e){const a=parseInt((e.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(e.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(e.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(e.TERM)||"COLORTERM"in e?1:F}function s(i){const l=t(i,i&&i.isTTY);return o(l)}return _D={supportsColor:s,stdout:o(t(!0,D.isatty(1))),stderr:o(t(!0,D.isatty(2)))},_D}su.exports;var Pt;function ri(){return Pt||(Pt=1,function(u,D){const n=Fu,e=YD;D.init=F,D.log=s,D.formatArgs=o,D.save=i,D.load=l,D.useColors=r,D.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),D.colors=[6,2,3,4,5,1];try{const c=ni();c&&(c.stderr||c).level>=2&&(D.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}D.inspectOpts=Object.keys(process.env).filter(c=>/^debug_/i.test(c)).reduce((c,C)=>{const f=C.substring(6).toLowerCase().replace(/_([a-z])/g,(p,h)=>h.toUpperCase());let E=process.env[C];return/^(yes|on|true|enabled)$/i.test(E)?E=!0:/^(no|off|false|disabled)$/i.test(E)?E=!1:E==="null"?E=null:E=Number(E),c[f]=E,c},{});function r(){return"colors"in D.inspectOpts?!!D.inspectOpts.colors:n.isatty(process.stderr.fd)}function o(c){const{namespace:C,useColors:f}=this;if(f){const E=this.color,p="\x1B[3"+(E<8?E:"8;5;"+E),h=` ${p};1m${C} \x1B[0m`;c[0]=h+c[0].split(`
68
+ `).join(`
69
+ `+h),c.push(p+"m+"+u.exports.humanize(this.diff)+"\x1B[0m")}else c[0]=t()+C+" "+c[0]}function t(){return D.inspectOpts.hideDate?"":new Date().toISOString()+" "}function s(...c){return process.stderr.write(e.format(...c)+`
70
+ `)}function i(c){c?process.env.DEBUG=c:delete process.env.DEBUG}function l(){return process.env.DEBUG}function F(c){c.inspectOpts={};const C=Object.keys(D.inspectOpts);for(let f=0;f<C.length;f++)c.inspectOpts[C[f]]=D.inspectOpts[C[f]]}u.exports=xt()(D);const{formatters:a}=u.exports;a.o=function(c){return this.inspectOpts.colors=this.useColors,e.inspect(c,this.inspectOpts).split(`
71
+ `).map(C=>C.trim()).join(" ")},a.O=function(c){return this.inspectOpts.colors=this.useColors,e.inspect(c,this.inspectOpts)}}(su,su.exports)),su.exports}typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?OD.exports=ei():OD.exports=ri();var kD=OD.exports,RD={};Object.defineProperty(RD,"__esModule",{value:!0});function oi(u){return function(D,n){return new Promise((e,r)=>{u.call(this,D,n,(o,t)=>{o?r(o):e(t)})})}}RD.default=oi;var It=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const si=VD,ii=It(kD),ai=It(RD),iu=ii.default("agent-base");function ci(u){return!!u&&typeof u.addRequest=="function"}function MD(){const{stack:u}=new Error;return typeof u!="string"?!1:u.split(`
72
+ `).some(D=>D.indexOf("(https.js:")!==-1||D.indexOf("node:https:")!==-1)}function Tu(u,D){return new Tu.Agent(u,D)}(function(u){class D extends si.EventEmitter{constructor(e,r){super();let o=r;typeof e=="function"?this.callback=e:e&&(o=e),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:MD()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:MD()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,r,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,r){const o=Object.assign({},r);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=MD()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,e._last=!0,e.shouldKeepAlive=!1;let t=!1,s=null;const i=o.timeout||this.timeout,l=C=>{e._hadError||(e.emit("error",C),e._hadError=!0)},F=()=>{s=null,t=!0;const C=new Error(`A "socket" was not created for HTTP request before ${i}ms`);C.code="ETIMEOUT",l(C)},a=C=>{t||(s!==null&&(clearTimeout(s),s=null),l(C))},c=C=>{if(t)return;if(s!=null&&(clearTimeout(s),s=null),ci(C)){iu("Callback returned another Agent instance %o",C.constructor.name),C.addRequest(e,o);return}if(C){C.once("free",()=>{this.freeSocket(C,o)}),e.onSocket(C);return}const f=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);l(f)};if(typeof this.callback!="function"){l(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(iu("Converting legacy callback function to promise"),this.promisifiedCallback=ai.default(this.callback)):this.promisifiedCallback=this.callback),typeof i=="number"&&i>0&&(s=setTimeout(F,i)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{iu("Resolving socket for %o request: %o",o.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,o)).then(c,a)}catch(C){Promise.reject(C).catch(a)}}freeSocket(e,r){iu("Freeing socket %o %o",e.constructor.name,r),e.destroy()}destroy(){iu("Destroying agent %o",this.constructor.name)}}u.Agent=D,u.prototype=u.Agent.prototype})(Tu||(Tu={}));var li=Tu,jD={},Fi=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(jD,"__esModule",{value:!0});const Ci=Fi(kD),au=Ci.default("https-proxy-agent:parse-proxy-response");function fi(u){return new Promise((D,n)=>{let e=0;const r=[];function o(){const a=u.read();a?F(a):u.once("readable",o)}function t(){u.removeListener("end",i),u.removeListener("error",l),u.removeListener("close",s),u.removeListener("readable",o)}function s(a){au("onclose had error %o",a)}function i(){au("onend")}function l(a){t(),au("onerror %o",a),n(a)}function F(a){r.push(a),e+=a.length;const c=Buffer.concat(r,e);if(c.indexOf(`\r
73
+ \r
74
+ `)===-1){au("have not received end of HTTP headers yet..."),o();return}const f=c.toString("ascii",0,c.indexOf(`\r
75
+ `)),E=+f.split(" ")[1];au("got proxy server response: %o",f),D({statusCode:E,buffered:c})}u.on("error",l),u.on("close",s),u.on("end",i),o()})}jD.default=fi;var Ei=y&&y.__awaiter||function(u,D,n,e){function r(o){return o instanceof n?o:new n(function(t){t(o)})}return new(n||(n=Promise))(function(o,t){function s(F){try{l(e.next(F))}catch(a){t(a)}}function i(F){try{l(e.throw(F))}catch(a){t(a)}}function l(F){F.done?o(F.value):r(F.value).then(s,i)}l((e=e.apply(u,D||[])).next())})},X=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(SD,"__esModule",{value:!0});const _t=X(Xt),kt=X(Zt),di=X(Qt),pi=X(KD),hi=X(kD),mi=li,gi=X(jD),cu=hi.default("https-proxy-agent:agent");class Bi extends mi.Agent{constructor(D){let n;if(typeof D=="string"?n=di.default.parse(D):n=D,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");cu("creating new HttpsProxyAgent instance: %o",n),super(n);const e=Object.assign({},n);this.secureProxy=n.secureProxy||yi(e.protocol),e.host=e.hostname||e.host,typeof e.port=="string"&&(e.port=parseInt(e.port,10)),!e.port&&e.host&&(e.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in e)&&(e.ALPNProtocols=["http 1.1"]),e.host&&e.path&&(delete e.path,delete e.pathname),this.proxy=e}callback(D,n){return Ei(this,void 0,void 0,function*(){const{proxy:e,secureProxy:r}=this;let o;r?(cu("Creating `tls.Socket`: %o",e),o=kt.default.connect(e)):(cu("Creating `net.Socket`: %o",e),o=_t.default.connect(e));const t=Object.assign({},e.headers);let i=`CONNECT ${`${n.host}:${n.port}`} HTTP/1.1\r
76
+ `;e.auth&&(t["Proxy-Authorization"]=`Basic ${Buffer.from(e.auth).toString("base64")}`);let{host:l,port:F,secureEndpoint:a}=n;bi(F,a)||(l+=`:${F}`),t.Host=l,t.Connection="close";for(const p of Object.keys(t))i+=`${p}: ${t[p]}\r
77
+ `;const c=gi.default(o);o.write(`${i}\r
78
+ `);const{statusCode:C,buffered:f}=yield c;if(C===200){if(D.once("socket",Ai),n.secureEndpoint){cu("Upgrading socket connection to TLS");const p=n.servername||n.host;return kt.default.connect(Object.assign(Object.assign({},wi(n,"host","hostname","path","port")),{socket:o,servername:p}))}return o}o.destroy();const E=new _t.default.Socket({writable:!1});return E.readable=!0,D.once("socket",p=>{cu("replaying proxy buffer for failed request"),pi.default(p.listenerCount("data")>0),p.push(f),p.push(null)}),E})}}SD.default=Bi;function Ai(u){u.resume()}function bi(u,D){return!!(!D&&u===80||D&&u===443)}function yi(u){return typeof u=="string"?/^https:?$/i.test(u):!1}function wi(u,...D){const n={};let e;for(e in u)D.includes(e)||(n[e]=u[e]);return n}var $i=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const ND=$i(SD);function LD(u){return new ND.default(u)}(function(u){u.HttpsProxyAgent=ND.default,u.prototype=ND.default.prototype})(LD||(LD={}));var vi=LD,xi=j(vi);const Si={"":"<commit message>",conventional:"<type>(<optional scope>): <commit message>"},Oi=u=>`The output response must be in format:
79
+ ${Si[u]}`,Ti={"":"",conventional:`Choose a type from the type-to-description JSON below that best describes the git diff:
80
+ ${JSON.stringify({docs:"Documentation only changes",style:"Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",refactor:"A code change that neither fixes a bug nor adds a feature",perf:"A code change that improves performance",test:"Adding missing tests or correcting existing tests",build:"Changes that affect the build system or external dependencies",ci:"Changes to our CI configuration files and scripts",chore:"Other changes that don't modify src or test files",revert:"Reverts a previous commit",feat:"A new feature",fix:"A bug fix"},null,2)}`},Pi=(u,D,n)=>["Generate a concise git commit message written in present tense for the following code diff with the given specifications below:",`Message language: ${u}`,`Commit message must be a maximum of ${D} characters.`,"Exclude anything unnecessary such as translation. Your entire response will be passed directly into git commit.",Ti[n],Oi(n)].filter(Boolean).join(`
81
+ `),Ii=async(u,D,n,e,r,o)=>new Promise((t,s)=>{const i=JSON.stringify(e),l=Jt.request({port:443,hostname:u,path:D,method:"POST",headers:{...n,"Content-Type":"application/json","Content-Length":Buffer.byteLength(i)},timeout:r,agent:o?xi(o):void 0},F=>{const a=[];F.on("data",c=>a.push(c)),F.on("end",()=>{t({request:l,response:F,data:Buffer.concat(a).toString()})})});l.on("error",s),l.on("timeout",()=>{l.destroy(),s(new O(`Time out error: request took over ${r}ms. Try increasing the \`timeout\` config, or checking the OpenAI API status https://status.openai.com`))}),l.write(i),l.end()}),_i=async(u,D,n,e)=>{const{response:r,data:o}=await Ii("api.openai.com","/v1/chat/completions",{Authorization:`Bearer ${u}`},D,n,e);if(!r.statusCode||r.statusCode<200||r.statusCode>299){let t=`OpenAI API Error: ${r.statusCode} - ${r.statusMessage}`;throw o&&(t+=`
82
+
83
+ ${o}`),r.statusCode===500&&(t+=`
84
+
85
+ Check the API status: https://status.openai.com`),new O(t)}return JSON.parse(o)},ki=u=>u.trim().replace(/[\n\r]/g,"").replace(/(\w)\.$/,"$1"),Ri=u=>Array.from(new Set(u)),Rt=async(u,D,n,e,r,o,t,s,i)=>{try{const l=await _i(u,{model:D,messages:[{role:"system",content:Pi(n,o,t)},{role:"user",content:e}],temperature:.7,top_p:1,frequency_penalty:0,presence_penalty:0,max_tokens:200,stream:!1,n:r},s,i);return Ri(l.choices.filter(F=>F.message?.content).map(F=>ki(F.message.content)))}catch(l){const F=l;throw F.code==="ENOTFOUND"?new O(`Error connecting to ${F.hostname} (${F.syscall}). Are you connected to the internet?`):F}};var Mi=async(u,D,n,e,r)=>(async()=>{Et(Xe(Je(" aicommit2 "))),await dt();const o=AD();n&&await tu("git",["add","--update"]),o.start("Detecting staged files");const t=await ht(D);if(!t)throw o.stop("Detecting staged files"),new O("No staged changes found. Stage your changes manually, or automatically stage all changes with the `--all` flag.");o.stop(`${Js(t.files)}:
86
+ ${t.files.map(c=>` ${c}`).join(`
87
+ `)}`);const{env:s}=process,i=await xD({OPENAI_KEY:s.OPENAI_KEY||s.OPENAI_API_KEY,proxy:s.https_proxy||s.HTTPS_PROXY||s.http_proxy||s.HTTP_PROXY,generate:u?.toString(),type:e?.toString()}),l=AD();l.start("The AI is analyzing your changes");let F;try{F=await Rt(i.OPENAI_KEY,i.model,i.locale,t.diff,i.generate,i["max-length"],i.type,i.timeout,i.proxy)}finally{l.stop("Changes analyzed")}if(F.length===0)throw new O("No commit messages were generated. Try again.");let a;if(F.length===1){[a]=F;const c=await Vs({message:`Use this commit message?
88
+
89
+ ${a}
90
+ `});if(!c||ct(c)){Y("Commit cancelled");return}}else{const c=await Ys({message:`Pick a commit message to use: ${iD("(Ctrl+c to exit)")}`,options:F.map(C=>({label:C,value:C}))});if(ct(c)){Y("Commit cancelled");return}a=c}await tu("git",["commit","-m",a,...r]),Y(`${yu("\u2714")} Successfully committed!`)})().catch(o=>{Y(`${bu("\u2716")} ${o.message}`),vu(o),process.exit(1)});const[GD,ji]=process.argv.slice(2);var Ni=()=>(async()=>{if(!GD)throw new O('Commit message file path is missing. This file should be called from the "prepare-commit-msg" git hook');if(ji)return;const u=await ht();if(!u)return;Et(Xe(Je(" aicommit2 ")));const{env:D}=process,n=await xD({proxy:D.https_proxy||D.HTTPS_PROXY||D.http_proxy||D.HTTP_PROXY}),e=AD();e.start("The AI is analyzing your changes");let r;try{r=await Rt(n.OPENAI_KEY,n.model,n.locale,u.diff,n.generate,n["max-length"],n.type,n.timeout,n.proxy)}finally{e.stop("Changes analyzed")}const t=await T.readFile(GD,"utf8")!=="",s=r.length>1;let i="";t&&(i=`# \u{1F916} AI generated commit${s?"s":""}
91
+ `),s?(t&&(i+=`# Select one of the following messages by uncommeting:
92
+ `),i+=`
93
+ ${r.map(l=>`# ${l}`).join(`
94
+ `)}`):(t&&(i+=`# Edit the message below and commit:
95
+ `),i+=`
96
+ ${r[0]}
97
+ `),await T.appendFile(GD,i),Y(`${yu("\u2714")} Saved commit message!`)})().catch(u=>{Y(`${bu("\u2716")} ${u.message}`),vu(u),process.exit(1)}),Li=he({name:"config",parameters:["<mode>","<key=value...>"]},u=>{(async()=>{const{mode:D,keyValue:n}=u._;if(D==="get"){const e=await xD({},!0);for(const r of n)yt(e,r)&&console.log(`${r}=${e[r]}`);return}if(D==="set"){await ui(n.map(e=>e.split("=")));return}throw new O(`Invalid mode: ${D}`)})().catch(D=>{console.error(`${bu("\u2716")} ${D.message}`),vu(D),process.exit(1)})});const Mt="prepare-commit-msg",jt=`.git/hooks/${Mt}`,Pu=un(new URL("cli.mjs",import.meta.url)),Gi=process.argv[1].replace(/\\/g,"/").endsWith(`/${jt}`),Nt=process.platform==="win32",Lt=`
98
+ #!/usr/bin/env node
99
+ import(${JSON.stringify(Dn(Pu))})
100
+ `.trim();var Ui=he({name:"hook",parameters:["<install/uninstall>"]},u=>{(async()=>{const D=await dt(),{installUninstall:n}=u._,e=W.join(D,jt),r=await bt(e);if(n==="install"){if(r){if(await T.realpath(e).catch(()=>{})===Pu){console.warn("The hook is already installed");return}throw new O(`A different ${Mt} hook seems to be installed. Please remove it before installing aicommit2.`)}await T.mkdir(W.dirname(e),{recursive:!0}),Nt?await T.writeFile(e,Lt):(await T.symlink(Pu,e,"file"),await T.chmod(e,493)),console.log(`${yu("\u2714")} Hook installed`);return}if(n==="uninstall"){if(!r){console.warn("Hook is not installed");return}if(Nt){if(await T.readFile(e,"utf8")!==Lt){console.warn("Hook is not installed");return}}else if(await T.realpath(e)!==Pu){console.warn("Hook is not installed");return}await T.rm(e),console.log(`${yu("\u2714")} Hook uninstalled`);return}throw new O(`Invalid mode: ${n}`)})().catch(D=>{console.error(`${bu("\u2716")} ${D.message}`),vu(D),process.exit(1)})});const Gt=process.argv.slice(2);Br({name:"aicommit2",version:me,flags:{generate:{type:Number,description:"Number of messages to generate (Warning: generating multiple costs more) (default: 1)",alias:"g"},exclude:{type:[String],description:"Files to exclude from AI analysis",alias:"x"},all:{type:Boolean,description:"Automatically stage changes in tracked files for the commit",alias:"a",default:!1},type:{type:String,description:"Type of commit message to generate",alias:"t"}},commands:[Li,Ui],help:{description:Ar},ignoreArgv:u=>u==="unknown-flag"||u==="argument"},u=>{Gi?Ni():Mi(u.flags.generate,u.flags.exclude,u.flags.all,u.flags.type,Gt)},Gt);
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "aicommit2",
3
+ "version": "0.0.0-semantic-release",
4
+ "description": "Writes your git commit messages for you with AI",
5
+ "keywords": [
6
+ "ai",
7
+ "git",
8
+ "commit",
9
+ "aicommit",
10
+ "aicommits",
11
+ "aicommit2"
12
+ ],
13
+ "license": "MIT",
14
+ "repository": "tak-bro/aicommit2",
15
+ "author": "Hyungtak Jin(@tak-bro)",
16
+ "type": "module",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "bin": {
21
+ "aicommit2": "./dist/cli.mjs"
22
+ },
23
+ "dependencies": {
24
+ "@dqbd/tiktoken": "^1.0.2"
25
+ }
26
+ }