@willbooster/shared-lib-node 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/spawn.cjs +1 -1
- package/dist/cjs/spawn.cjs.map +1 -1
- package/dist/cjs/spawn.d.cts +1 -1
- package/dist/esm/spawn.d.ts +1 -1
- package/dist/esm/spawn.js +1 -1
- package/dist/esm/spawn.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/spawn.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("node:child_process");function t(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var r=t(require("node:os"));exports.spawnAsync=async function(t,n,o){return new Promise(((
|
|
1
|
+
"use strict";var e=require("node:child_process");function t(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var r=t(require("node:os"));exports.spawnAsync=async function(t,n,o,s,c){return new Promise(((i,a)=>{try{const p=e.spawn(t,n??[],o??{});let d="",l="";p.stdout?.on("data",(e=>{d+=e})),p.stderr?.on("data",(e=>{l+=e}));const u=()=>{try{let t,n;"darwin"===r.platform()?(t=e.execSync(`pstree ${p.pid}`).toString(),n=/\d+/):(t=e.execSync(`pstree -p ${p.pid}`).toString(),n=/\d+/g);const o=t.split("\n").flatMap((e=>(e.match(n)??[]).map(Number))),s=[];for(const e of o)e>0&&(e===p.pid||s.length>0)&&s.push(e);const i=`kill ${s.join(" ")}`;c&&(console.info(t),console.info(`$ ${i}`)),e.execSync(i)}catch{}};s&&process.on("exit",u),p.on("error",(e=>{process.removeListener("exit",u),p.removeAllListeners("close"),a(e)})),p.on("close",((e,t)=>{process.removeListener("exit",u),void 0===p.pid?a(new Error("Process has no pid.")):i({pid:p.pid,stdout:d,stderr:l,status:e,signal:t})}))}catch(e){a(e)}}))};
|
|
2
2
|
//# sourceMappingURL=spawn.cjs.map
|
package/dist/cjs/spawn.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.cjs","sources":["../../src/spawn.ts"],"sourcesContent":["import {\n spawn,\n SpawnOptions,\n SpawnOptionsWithoutStdio,\n SpawnOptionsWithStdioTuple,\n SpawnSyncReturns,\n StdioNull,\n StdioPipe,\n execSync,\n} from 'node:child_process';\nimport * as os from 'node:os';\n\nexport type SpawnAsyncReturns = Omit<SpawnSyncReturns<string>, 'output' | 'error'>;\n\nexport async function spawnAsync(\n command: string,\n args?: ReadonlyArray<string>,\n options?:\n | SpawnOptionsWithoutStdio\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n | SpawnOptions\n): Promise<SpawnAsyncReturns> {\n return new Promise((resolve, reject) => {\n try {\n const proc = spawn(command, args ?? [], options ?? {});\n let stdout = '';\n let stderr = '';\n\n proc.stdout?.on('data', (data) => {\n stdout += data;\n });\n proc.stderr?.on('data', (data) => {\n stderr += data;\n });\n\n const stopProcess = (): void => {\n try {\n let pstreeOutput: string;\n let regex: RegExp;\n if (os.platform() === 'darwin') {\n pstreeOutput = execSync(`pstree ${proc.pid}`).toString();\n regex = /\\d+/;\n } else {\n pstreeOutput = execSync(`pstree -p ${proc.pid}`).toString();\n regex = /\\d+/g;\n }\n const procIds = pstreeOutput.split('\\n').flatMap((line) => (line.match(regex) ?? []).map(Number));\n const descendantProcIds: number[] = [];\n for (const pid of procIds) {\n if (pid > 0 && (pid === proc.pid || descendantProcIds.length > 0)) {\n descendantProcIds.push(pid);\n }\n }\n
|
|
1
|
+
{"version":3,"file":"spawn.cjs","sources":["../../src/spawn.ts"],"sourcesContent":["import {\n spawn,\n SpawnOptions,\n SpawnOptionsWithoutStdio,\n SpawnOptionsWithStdioTuple,\n SpawnSyncReturns,\n StdioNull,\n StdioPipe,\n execSync,\n} from 'node:child_process';\nimport * as os from 'node:os';\n\nexport type SpawnAsyncReturns = Omit<SpawnSyncReturns<string>, 'output' | 'error'>;\n\nexport async function spawnAsync(\n command: string,\n args?: ReadonlyArray<string>,\n options?:\n | SpawnOptionsWithoutStdio\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n | SpawnOptions,\n stopProcessOnExit?: boolean,\n verbose?: boolean\n): Promise<SpawnAsyncReturns> {\n return new Promise((resolve, reject) => {\n try {\n const proc = spawn(command, args ?? [], options ?? {});\n let stdout = '';\n let stderr = '';\n\n proc.stdout?.on('data', (data) => {\n stdout += data;\n });\n proc.stderr?.on('data', (data) => {\n stderr += data;\n });\n\n const stopProcess = (): void => {\n try {\n let pstreeOutput: string;\n let regex: RegExp;\n if (os.platform() === 'darwin') {\n pstreeOutput = execSync(`pstree ${proc.pid}`).toString();\n regex = /\\d+/;\n } else {\n pstreeOutput = execSync(`pstree -p ${proc.pid}`).toString();\n regex = /\\d+/g;\n }\n const procIds = pstreeOutput.split('\\n').flatMap((line) => (line.match(regex) ?? []).map(Number));\n const descendantProcIds: number[] = [];\n for (const pid of procIds) {\n if (pid > 0 && (pid === proc.pid || descendantProcIds.length > 0)) {\n descendantProcIds.push(pid);\n }\n }\n\n const killScript = `kill ${descendantProcIds.join(' ')}`;\n if (verbose) {\n console.info(pstreeOutput);\n console.info(`$ ${killScript}`);\n }\n execSync(killScript);\n } catch {\n // do nothing.\n }\n };\n if (stopProcessOnExit) {\n process.on('exit', stopProcess);\n }\n\n proc.on('error', (error) => {\n process.removeListener('exit', stopProcess);\n proc.removeAllListeners('close');\n reject(error);\n });\n proc.on('close', (code: number | null, signal: NodeJS.Signals | null) => {\n process.removeListener('exit', stopProcess);\n if (proc.pid === undefined) {\n reject(new Error('Process has no pid.'));\n } else {\n resolve({\n pid: proc.pid,\n stdout,\n stderr,\n status: code,\n signal,\n });\n }\n });\n } catch (error) {\n reject(error);\n }\n });\n}\n"],"names":["async","command","args","options","stopProcessOnExit","verbose","Promise","resolve","reject","proc","spawn","stdout","stderr","on","data","stopProcess","pstreeOutput","regex","os","platform","execSync","pid","toString","procIds","split","flatMap","line","match","map","Number","descendantProcIds","length","push","killScript","join","console","info","process","error","removeListener","removeAllListeners","code","signal","undefined","Error","status"],"mappings":"mWAcOA,eACLC,EACAC,EACAC,EAWAC,EACAC,GAEA,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,IACE,MAAMC,EAAOC,EAAAA,MAAMT,EAASC,GAAQ,GAAIC,GAAW,CAAA,GACnD,IAAIQ,EAAS,GACTC,EAAS,GAEbH,EAAKE,QAAQE,GAAG,QAASC,IACvBH,GAAUG,CAAI,IAEhBL,EAAKG,QAAQC,GAAG,QAASC,IACvBF,GAAUE,CAAI,IAGhB,MAAMC,EAAc,KAClB,IACE,IAAIC,EACAC,EACkB,WAAlBC,EAAGC,YACLH,EAAeI,EAAAA,SAAU,UAASX,EAAKY,OAAOC,WAC9CL,EAAQ,QAERD,EAAeI,EAAAA,SAAU,aAAYX,EAAKY,OAAOC,WACjDL,EAAQ,QAEV,MAAMM,EAAUP,EAAaQ,MAAM,MAAMC,SAASC,IAAUA,EAAKC,MAAMV,IAAU,IAAIW,IAAIC,UACnFC,EAA8B,GACpC,IAAK,MAAMT,KAAOE,EACZF,EAAM,IAAMA,IAAQZ,EAAKY,KAAOS,EAAkBC,OAAS,IAC7DD,EAAkBE,KAAKX,GAI3B,MAAMY,EAAc,QAAOH,EAAkBI,KAAK,OAC9C7B,IACF8B,QAAQC,KAAKpB,GACbmB,QAAQC,KAAM,KAAIH,MAEpBb,EAAQA,SAACa,EAET,CADA,MACA,GAGA7B,GACFiC,QAAQxB,GAAG,OAAQE,GAGrBN,EAAKI,GAAG,SAAUyB,IAChBD,QAAQE,eAAe,OAAQxB,GAC/BN,EAAK+B,mBAAmB,SACxBhC,EAAO8B,EAAM,IAEf7B,EAAKI,GAAG,SAAS,CAAC4B,EAAqBC,KACrCL,QAAQE,eAAe,OAAQxB,QACd4B,IAAblC,EAAKY,IACPb,EAAO,IAAIoC,MAAM,wBAEjBrC,EAAQ,CACNc,IAAKZ,EAAKY,IACVV,SACAC,SACAiC,OAAQJ,EACRC,UAEJ,GAIJ,CAFE,MAAOJ,GACP9B,EAAO8B,EACT,IAEJ"}
|
package/dist/cjs/spawn.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { SpawnOptions, SpawnOptionsWithoutStdio, SpawnOptionsWithStdioTuple, SpawnSyncReturns, StdioNull, StdioPipe } from 'node:child_process';
|
|
3
3
|
type SpawnAsyncReturns = Omit<SpawnSyncReturns<string>, 'output' | 'error'>;
|
|
4
|
-
declare function spawnAsync(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull> | SpawnOptions): Promise<SpawnAsyncReturns>;
|
|
4
|
+
declare function spawnAsync(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull> | SpawnOptions, stopProcessOnExit?: boolean, verbose?: boolean): Promise<SpawnAsyncReturns>;
|
|
5
5
|
export { SpawnAsyncReturns, spawnAsync };
|
package/dist/esm/spawn.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { SpawnOptions, SpawnOptionsWithoutStdio, SpawnOptionsWithStdioTuple, SpawnSyncReturns, StdioNull, StdioPipe } from 'node:child_process';
|
|
3
3
|
type SpawnAsyncReturns = Omit<SpawnSyncReturns<string>, 'output' | 'error'>;
|
|
4
|
-
declare function spawnAsync(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull> | SpawnOptions): Promise<SpawnAsyncReturns>;
|
|
4
|
+
declare function spawnAsync(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe> | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe> | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull> | SpawnOptions, stopProcessOnExit?: boolean, verbose?: boolean): Promise<SpawnAsyncReturns>;
|
|
5
5
|
export { SpawnAsyncReturns, spawnAsync };
|
package/dist/esm/spawn.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{spawn as
|
|
1
|
+
import{spawn as o,execSync as t}from"node:child_process";import*as e from"node:os";async function r(r,s,n,i,c){return new Promise(((p,d)=>{try{const a=o(r,s??[],n??{});let l="",m="";a.stdout?.on("data",(o=>{l+=o})),a.stderr?.on("data",(o=>{m+=o}));const f=()=>{try{let o,r;"darwin"===e.platform()?(o=t(`pstree ${a.pid}`).toString(),r=/\d+/):(o=t(`pstree -p ${a.pid}`).toString(),r=/\d+/g);const s=o.split("\n").flatMap((o=>(o.match(r)??[]).map(Number))),n=[];for(const o of s)o>0&&(o===a.pid||n.length>0)&&n.push(o);const i=`kill ${n.join(" ")}`;c&&(console.info(o),console.info(`$ ${i}`)),t(i)}catch{}};i&&process.on("exit",f),a.on("error",(o=>{process.removeListener("exit",f),a.removeAllListeners("close"),d(o)})),a.on("close",((o,t)=>{process.removeListener("exit",f),void 0===a.pid?d(new Error("Process has no pid.")):p({pid:a.pid,stdout:l,stderr:m,status:o,signal:t})}))}catch(o){d(o)}}))}export{r as spawnAsync};
|
|
2
2
|
//# sourceMappingURL=spawn.js.map
|
package/dist/esm/spawn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.js","sources":["../../src/spawn.ts"],"sourcesContent":["import {\n spawn,\n SpawnOptions,\n SpawnOptionsWithoutStdio,\n SpawnOptionsWithStdioTuple,\n SpawnSyncReturns,\n StdioNull,\n StdioPipe,\n execSync,\n} from 'node:child_process';\nimport * as os from 'node:os';\n\nexport type SpawnAsyncReturns = Omit<SpawnSyncReturns<string>, 'output' | 'error'>;\n\nexport async function spawnAsync(\n command: string,\n args?: ReadonlyArray<string>,\n options?:\n | SpawnOptionsWithoutStdio\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n | SpawnOptions\n): Promise<SpawnAsyncReturns> {\n return new Promise((resolve, reject) => {\n try {\n const proc = spawn(command, args ?? [], options ?? {});\n let stdout = '';\n let stderr = '';\n\n proc.stdout?.on('data', (data) => {\n stdout += data;\n });\n proc.stderr?.on('data', (data) => {\n stderr += data;\n });\n\n const stopProcess = (): void => {\n try {\n let pstreeOutput: string;\n let regex: RegExp;\n if (os.platform() === 'darwin') {\n pstreeOutput = execSync(`pstree ${proc.pid}`).toString();\n regex = /\\d+/;\n } else {\n pstreeOutput = execSync(`pstree -p ${proc.pid}`).toString();\n regex = /\\d+/g;\n }\n const procIds = pstreeOutput.split('\\n').flatMap((line) => (line.match(regex) ?? []).map(Number));\n const descendantProcIds: number[] = [];\n for (const pid of procIds) {\n if (pid > 0 && (pid === proc.pid || descendantProcIds.length > 0)) {\n descendantProcIds.push(pid);\n }\n }\n
|
|
1
|
+
{"version":3,"file":"spawn.js","sources":["../../src/spawn.ts"],"sourcesContent":["import {\n spawn,\n SpawnOptions,\n SpawnOptionsWithoutStdio,\n SpawnOptionsWithStdioTuple,\n SpawnSyncReturns,\n StdioNull,\n StdioPipe,\n execSync,\n} from 'node:child_process';\nimport * as os from 'node:os';\n\nexport type SpawnAsyncReturns = Omit<SpawnSyncReturns<string>, 'output' | 'error'>;\n\nexport async function spawnAsync(\n command: string,\n args?: ReadonlyArray<string>,\n options?:\n | SpawnOptionsWithoutStdio\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n | SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n | SpawnOptions,\n stopProcessOnExit?: boolean,\n verbose?: boolean\n): Promise<SpawnAsyncReturns> {\n return new Promise((resolve, reject) => {\n try {\n const proc = spawn(command, args ?? [], options ?? {});\n let stdout = '';\n let stderr = '';\n\n proc.stdout?.on('data', (data) => {\n stdout += data;\n });\n proc.stderr?.on('data', (data) => {\n stderr += data;\n });\n\n const stopProcess = (): void => {\n try {\n let pstreeOutput: string;\n let regex: RegExp;\n if (os.platform() === 'darwin') {\n pstreeOutput = execSync(`pstree ${proc.pid}`).toString();\n regex = /\\d+/;\n } else {\n pstreeOutput = execSync(`pstree -p ${proc.pid}`).toString();\n regex = /\\d+/g;\n }\n const procIds = pstreeOutput.split('\\n').flatMap((line) => (line.match(regex) ?? []).map(Number));\n const descendantProcIds: number[] = [];\n for (const pid of procIds) {\n if (pid > 0 && (pid === proc.pid || descendantProcIds.length > 0)) {\n descendantProcIds.push(pid);\n }\n }\n\n const killScript = `kill ${descendantProcIds.join(' ')}`;\n if (verbose) {\n console.info(pstreeOutput);\n console.info(`$ ${killScript}`);\n }\n execSync(killScript);\n } catch {\n // do nothing.\n }\n };\n if (stopProcessOnExit) {\n process.on('exit', stopProcess);\n }\n\n proc.on('error', (error) => {\n process.removeListener('exit', stopProcess);\n proc.removeAllListeners('close');\n reject(error);\n });\n proc.on('close', (code: number | null, signal: NodeJS.Signals | null) => {\n process.removeListener('exit', stopProcess);\n if (proc.pid === undefined) {\n reject(new Error('Process has no pid.'));\n } else {\n resolve({\n pid: proc.pid,\n stdout,\n stderr,\n status: code,\n signal,\n });\n }\n });\n } catch (error) {\n reject(error);\n }\n });\n}\n"],"names":["async","spawnAsync","command","args","options","stopProcessOnExit","verbose","Promise","resolve","reject","proc","spawn","stdout","stderr","on","data","stopProcess","pstreeOutput","regex","os","platform","execSync","pid","toString","procIds","split","flatMap","line","match","map","Number","descendantProcIds","length","push","killScript","join","console","info","process","error","removeListener","removeAllListeners","code","signal","undefined","Error","status"],"mappings":"mFAcOA,eAAeC,EACpBC,EACAC,EACAC,EAWAC,EACAC,GAEA,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,IACE,MAAMC,EAAOC,EAAMT,EAASC,GAAQ,GAAIC,GAAW,CAAA,GACnD,IAAIQ,EAAS,GACTC,EAAS,GAEbH,EAAKE,QAAQE,GAAG,QAASC,IACvBH,GAAUG,CAAI,IAEhBL,EAAKG,QAAQC,GAAG,QAASC,IACvBF,GAAUE,CAAI,IAGhB,MAAMC,EAAc,KAClB,IACE,IAAIC,EACAC,EACkB,WAAlBC,EAAGC,YACLH,EAAeI,EAAU,UAASX,EAAKY,OAAOC,WAC9CL,EAAQ,QAERD,EAAeI,EAAU,aAAYX,EAAKY,OAAOC,WACjDL,EAAQ,QAEV,MAAMM,EAAUP,EAAaQ,MAAM,MAAMC,SAASC,IAAUA,EAAKC,MAAMV,IAAU,IAAIW,IAAIC,UACnFC,EAA8B,GACpC,IAAK,MAAMT,KAAOE,EACZF,EAAM,IAAMA,IAAQZ,EAAKY,KAAOS,EAAkBC,OAAS,IAC7DD,EAAkBE,KAAKX,GAI3B,MAAMY,EAAc,QAAOH,EAAkBI,KAAK,OAC9C7B,IACF8B,QAAQC,KAAKpB,GACbmB,QAAQC,KAAM,KAAIH,MAEpBb,EAASa,EAET,CADA,MACA,GAGA7B,GACFiC,QAAQxB,GAAG,OAAQE,GAGrBN,EAAKI,GAAG,SAAUyB,IAChBD,QAAQE,eAAe,OAAQxB,GAC/BN,EAAK+B,mBAAmB,SACxBhC,EAAO8B,EAAM,IAEf7B,EAAKI,GAAG,SAAS,CAAC4B,EAAqBC,KACrCL,QAAQE,eAAe,OAAQxB,QACd4B,IAAblC,EAAKY,IACPb,EAAO,IAAIoC,MAAM,wBAEjBrC,EAAQ,CACNc,IAAKZ,EAAKY,IACVV,SACAC,SACAiC,OAAQJ,EACRC,UAEJ,GAIJ,CAFE,MAAOJ,GACP9B,EAAO8B,EACT,IAEJ"}
|