openuse 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- import e from"node:os";import t from"node:path";import n from"better-sqlite3";function r(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,c,`next`,e)}function c(e){r(o,i,a,s,c,`throw`,e)}s(void 0)})}}function a(e){"@babel/helpers - typeof";return a=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},a(e)}function o(e,t){if(a(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(a(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function s(e){var t=o(e,`string`);return a(t)==`symbol`?t:t+``}function c(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,``)}function f(e){return e.toLowerCase().replace(/([a-z])([0-9])/g,`$1 $2`).replace(/([0-9])([a-z])/g,`$1 $2`).replace(/[^a-z0-9]+/g,` `).trim().split(/\s+/).filter(Boolean)}function p(e){let t=new n(e,{readonly:!0}),r=t.prepare(`
1
+ #!/usr/bin/env node
2
+ import"node:module";import e from"node:os";import t from"node:path";import n from"better-sqlite3";import r from"node:process";import i from"node:tty";var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>()=>(e&&(t=e(e=0)),t),f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),p=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},m=(e,t,n)=>(n=e==null?{}:a(l(e)),p(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e));function h(e){let t=new n(e,{readonly:!0}),r=t.prepare(`
2
3
  SELECT
3
4
  date(datetime(json_extract(m.data, '$.time.created') / 1000, 'unixepoch', 'localtime')) AS day,
4
5
  COALESCE(json_extract(m.data, '$.modelID'), 'unknown') AS model,
@@ -15,5 +16,15 @@ import e from"node:os";import t from"node:path";import n from"better-sqlite3";fu
15
16
  AND json_extract(m.data, '$.time.created') IS NOT NULL
16
17
  GROUP BY day, model
17
18
  ORDER BY day DESC, total_tokens DESC
18
- `).all();return t.close(),r}function m(){return h.apply(this,arguments)}function h(){return h=i(function*(){var e;let t=yield fetch(`https://openrouter.ai/api/v1/models`);if(!t.ok)throw Error(`OpenRouter API failed with ${t.status}`);return(e=(yield t.json()).data)==null?[]:e}),h.apply(this,arguments)}function g(e){let t=new Map,n=new Map,r=[];for(let l of e){var i,a,o,s,c;t.set(l.id,l);let e=[l.id,(i=l.name)==null?``:i,(a=l.id.split(`/`).at(-1))==null?``:a,(o=(s=((c=l.name)==null?``:c).split(`:`).at(-1))==null?void 0:s.trim())==null?``:o],u=[],p=[];for(let t of e){if(!t)continue;let e=d(t);u.push(e),p.push(f(t)),n.has(e)||n.set(e,l)}r.push({model:l,normalizedKeys:u,tokenKeys:p})}return{byId:t,byNormalized:n,candidates:r}}function _(e,t){if(t.byId.has(e)){var n;return(n=t.byId.get(e))==null?null:n}let r=d(e);if(t.byNormalized.has(r)){var i;return(i=t.byNormalized.get(r))==null?null:i}let a=null,o=new Set(f(e));for(let e of t.candidates){let t=0;for(let n of e.normalizedKeys)if(n&&(n.includes(r)||r.includes(n))){let e=Math.min(n.length,r.length)/Math.max(n.length,r.length);e>t&&(t=e)}for(let n of e.tokenKeys){if(n.length===0||o.size===0)continue;let e=0;for(let t of n)o.has(t)&&(e+=1);let r=e/Math.max(n.length,o.size);r>t&&(t=r)}(!a||t>a.score)&&(a={model:e.model,score:t})}return a&&a.score>=.7?a.model:null}function v(e){if(!e)return 0;let t=Number(e);return Number.isFinite(t)?t:0}function y(e,t){let n=g(t);return e.map(e=>{var t;let r=_(e.model,n);if(!r)return u(u({},e),{},{matched_model_id:null,prompt_rate:0,completion_rate:0,cache_read_rate:0,cache_write_rate:0,cost_usd:null});let i=(t=r.pricing)==null?{}:t,a=v(i.prompt),o=v(i.completion),s=v(i.input_cache_read),c=v(i.input_cache_write||i.input_cache_creation||i.cache_write),l=e.input_tokens*a+e.output_tokens*o+e.cache_read_tokens*s+e.cache_write_tokens*c;return u(u({},e),{},{matched_model_id:r.id,prompt_rate:a,completion_rate:o,cache_read_rate:s,cache_write_rate:c,cost_usd:l})})}function b(e){return e===null?null:Number(e.toFixed(6))}function x(e,t){let n=e.map(e=>{var t;return{day:e.day,model:e.model,matched:(t=e.matched_model_id)==null?`unmatched`:t,input:e.input_tokens,output:e.output_tokens,cache_read:e.cache_read_tokens,cache_write:e.cache_write_tokens,total_tokens:e.total_tokens,cost_usd:b(e.cost_usd)}}),r=new Map;for(let t of e){var i;let e=(i=r.get(t.day))==null?{cost:0,totalTokens:0,unmatchedRows:0}:i;e.totalTokens+=t.total_tokens,t.cost_usd===null?e.unmatchedRows+=1:e.cost+=t.cost_usd,r.set(t.day,e)}let a=[...r.entries()].sort((e,t)=>t[0].localeCompare(e[0])).map(([e,t])=>({day:e,total_tokens:t.totalTokens,estimated_cost_usd:Number(t.cost.toFixed(6)),unmatched_models:t.unmatchedRows}));console.log(`Database: ${t}`),console.log(`
19
- Per day/model:`),console.table(n),console.log(`Daily totals:`),console.table(a)}var S,C;const w=(S=(C=process.argv[2])==null?process.env.OPENCODE_DB_PATH:C)==null?t.join(e.homedir(),`.local`,`share`,`opencode`,`opencode.db`):S;function T(){return E.apply(this,arguments)}function E(){return E=i(function*(){let e=p(w);if(e.length===0){console.log(`No usage rows found in ${w}`);return}x(y(e,yield m()),w)}),E.apply(this,arguments)}T().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`Failed: ${t}`),process.exit(1)});export{};
19
+ `).all();return t.close(),r}function g(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){g(a,r,i,o,s,`next`,e)}function s(e){g(a,r,i,o,s,`throw`,e)}o(void 0)})}}function v(){return y.apply(this,arguments)}function y(){return y=_(function*(){var e;let t=yield fetch(`https://openrouter.ai/api/v1/models`);if(!t.ok)throw Error(`OpenRouter API failed with ${t.status}`);return(e=(yield t.json()).data)==null?[]:e}),y.apply(this,arguments)}function b(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,``)}function ee(e){return e.toLowerCase().replace(/([a-z])([0-9])/g,`$1 $2`).replace(/([0-9])([a-z])/g,`$1 $2`).replace(/[^a-z0-9]+/g,` `).trim().split(/\s+/).filter(Boolean)}function te(e){let t=new Map,n=new Map,r=[];for(let l of e){var i,a,o,s,c;t.set(l.id,l);let e=[l.id,(i=l.name)==null?``:i,(a=l.id.split(`/`).at(-1))==null?``:a,(o=(s=((c=l.name)==null?``:c).split(`:`).at(-1))==null?void 0:s.trim())==null?``:o],u=[],d=[];for(let t of e){if(!t)continue;let e=b(t);u.push(e),d.push(ee(t)),n.has(e)||n.set(e,l)}r.push({model:l,normalizedKeys:u,tokenKeys:d})}return{byId:t,byNormalized:n,candidates:r}}function ne(e,t){if(t.byId.has(e)){var n;return(n=t.byId.get(e))==null?null:n}let r=b(e);if(t.byNormalized.has(r)){var i;return(i=t.byNormalized.get(r))==null?null:i}let a=null,o=new Set(ee(e));for(let e of t.candidates){let t=0;for(let n of e.normalizedKeys)if(n&&(n.includes(r)||r.includes(n))){let e=Math.min(n.length,r.length)/Math.max(n.length,r.length);e>t&&(t=e)}for(let n of e.tokenKeys){if(n.length===0||o.size===0)continue;let e=0;for(let t of n)o.has(t)&&(e+=1);let r=e/Math.max(n.length,o.size);r>t&&(t=r)}(!a||t>a.score)&&(a={model:e.model,score:t})}return a&&a.score>=.7?a.model:null}function x(e){"@babel/helpers - typeof";return x=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},x(e)}var S=d((()=>{}));function C(e,t){if(x(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(x(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var re=d((()=>{S()}));function ie(e){var t=C(e,`string`);return x(t)==`symbol`?t:t+``}var ae=d((()=>{S(),re()}));function oe(e,t,n){return(t=ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=d((()=>{ae()}));function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?se(Object(n),!0).forEach(function(t){oe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var E=d((()=>{w()}));E();function D(e){if(!e)return 0;let t=Number(e);return Number.isFinite(t)?t:0}function ce(e,t){let n=te(t);return e.map(e=>{var t;let r=ne(e.model,n);if(!r)return T(T({},e),{},{matched_model_id:null,prompt_rate:0,completion_rate:0,cache_read_rate:0,cache_write_rate:0,cost_usd:null});let i=(t=r.pricing)==null?{}:t,a=D(i.prompt),o=D(i.completion),s=D(i.input_cache_read),c=D(i.input_cache_write||i.input_cache_creation||i.cache_write),l=e.input_tokens*a+e.output_tokens*o+e.cache_read_tokens*s+e.cache_write_tokens*c;return T(T({},e),{},{matched_model_id:r.id,prompt_rate:a,completion_rate:o,cache_read_rate:s,cache_write_rate:c,cost_usd:l})})}const O=(e=0)=>t=>`\u001B[${t+e}m`,k=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,A=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,j={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(j.modifier);const le=Object.keys(j.color),ue=Object.keys(j.bgColor);[...le,...ue];function de(){let e=new Map;for(let[t,n]of Object.entries(j)){for(let[t,r]of Object.entries(n))j[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=j[t],e.set(r[0],r[1]);Object.defineProperty(j,t,{value:n,enumerable:!1})}return Object.defineProperty(j,`codes`,{value:e,enumerable:!1}),j.color.close=`\x1B[39m`,j.bgColor.close=`\x1B[49m`,j.color.ansi=O(),j.color.ansi256=k(),j.color.ansi16m=A(),j.bgColor.ansi=O(10),j.bgColor.ansi256=k(10),j.bgColor.ansi16m=A(10),Object.defineProperties(j,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>j.rgbToAnsi256(...j.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>j.ansi256ToAnsi(j.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>j.ansi256ToAnsi(j.hexToAnsi256(e)),enumerable:!1}}),j}var M=de();E();function N(e,t=globalThis.Deno?globalThis.Deno.args:r.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,i=t.indexOf(n+e),a=t.indexOf(`--`);return i!==-1&&(a===-1||i<a)}const{env:P}=r;let F;N(`no-color`)||N(`no-colors`)||N(`color=false`)||N(`color=never`)?F=0:(N(`color`)||N(`colors`)||N(`color=true`)||N(`color=always`))&&(F=1);function fe(){if(`FORCE_COLOR`in P)return P.FORCE_COLOR===`true`?1:P.FORCE_COLOR===`false`?0:P.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(P.FORCE_COLOR,10),3)}function pe(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function me(t,{streamIsTTY:n,sniffFlags:i=!0}={}){let a=fe();a!==void 0&&(F=a);let o=i?F:a;if(o===0)return 0;if(i){if(N(`color=16m`)||N(`color=full`)||N(`color=truecolor`))return 3;if(N(`color=256`))return 2}if(`TF_BUILD`in P&&`AGENT_NAME`in P)return 1;if(t&&!n&&o===void 0)return 0;let s=o||0;if(P.TERM===`dumb`)return s;if(r.platform===`win32`){let t=e.release().split(`.`);return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if(`CI`in P)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in P)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in P)||P.CI_NAME===`codeship`?1:s;if(`TEAMCITY_VERSION`in P)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(P.TEAMCITY_VERSION)?1:0;if(P.COLORTERM===`truecolor`||P.TERM===`xterm-kitty`||P.TERM===`xterm-ghostty`||P.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in P){let e=Number.parseInt((P.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(P.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(P.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(P.TERM)||`COLORTERM`in P?1:s}function I(e,t={}){return pe(me(e,T({streamIsTTY:e&&e.isTTY},t)))}var L={stdout:I({isTTY:i.isatty(1)}),stderr:I({isTTY:i.isatty(2)})};function R(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function z(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
20
+ `:`
21
+ `)+n,i=r+1,r=e.indexOf(`
22
+ `,i)}while(r!==-1);return a+=e.slice(i),a}E();const{stdout:B,stderr:he}=L,V=Symbol(`GENERATOR`),H=Symbol(`STYLER`),U=Symbol(`IS_EMPTY`),ge=[`ansi`,`ansi`,`ansi256`,`ansi16m`],W=Object.create(null),_e=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=B?B.level:0;e.level=t.level===void 0?n:t.level},ve=e=>{let t=(...e)=>e.join(` `);return _e(t,e),Object.setPrototypeOf(t,G.prototype),t};function G(e){return ve(e)}Object.setPrototypeOf(G.prototype,Function.prototype);for(let[e,t]of Object.entries(M))W[e]={get(){let n=J(this,q(t.open,t.close,this[H]),this[U]);return Object.defineProperty(this,e,{value:n}),n}};W.visible={get(){let e=J(this,this[H],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const K=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?M[n].ansi16m(...r):t===`ansi256`?M[n].ansi256(M.rgbToAnsi256(...r)):M[n].ansi(M.rgbToAnsi(...r)):e===`hex`?K(`rgb`,t,n,...M.hexToRgb(...r)):M[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){W[e]={get(){let{level:t}=this;return function(...n){let r=q(K(e,ge[t],`color`,...n),M.color.close,this[H]);return J(this,r,this[U])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);W[t]={get(){let{level:t}=this;return function(...n){let r=q(K(e,ge[t],`bgColor`,...n),M.bgColor.close,this[H]);return J(this,r,this[U])}}}}const ye=Object.defineProperties(()=>{},T(T({},W),{},{level:{enumerable:!0,get(){return this[V].level},set(e){this[V].level=e}}})),q=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},J=(e,t,n)=>{let r=(...e)=>be(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,ye),r[V]=e,r[H]=t,r[U]=n,r},be=(e,t)=>{if(e.level<=0||!t)return e[U]?``:t;let n=e[H];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=R(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
23
+ `);return a!==-1&&(t=z(t,i,r,a)),r+t+i};Object.defineProperties(G.prototype,W);const xe=G();G({level:he?he.level:0});var Y=xe,Se=f(((e,t)=>{t.exports=({onlyFirst:e=!1}={})=>{let t=[`[\\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(t,e?void 0:`g`)}})),Ce=f(((e,t)=>{let n=Se();t.exports=e=>typeof e==`string`?e.replace(n(),``):e})),we=f(((e,t)=>{let n=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);t.exports=n,t.exports.default=n})),Te=f(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),X=f(((e,t)=>{let n=Ce(),r=we(),i=Te(),a=e=>{if(typeof e!=`string`||e.length===0||(e=n(e),e.length===0))return 0;e=e.replace(i(),` `);let t=0;for(let n=0;n<e.length;n++){let i=e.codePointAt(n);i<=31||i>=127&&i<=159||i>=768&&i<=879||(i>65535&&n++,t+=r(i)?2:1)}return t};t.exports=a,t.exports.default=a})),Ee=f(((e,t)=>{let n=`[\ud800-\udbff][\udc00-\udfff]`;t.exports=e=>e&&e.exact?RegExp(`^${n}$`):new RegExp(n,`g`)})),De=f(((e,t)=>{t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}})),Oe=f(((e,t)=>{let n=De(),r={};for(let e of Object.keys(n))r[n[e]]=e;let i={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};t.exports=i;for(let e of Object.keys(i)){if(!(`channels`in i[e]))throw Error(`missing channels property: `+e);if(!(`labels`in i[e]))throw Error(`missing channel labels property: `+e);if(i[e].labels.length!==i[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],`channels`,{value:t}),Object.defineProperty(i[e],`labels`,{value:n})}i.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,c*100,l*100]},i.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+1/2};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[i*360,a*100,l*100]},i.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],a=i.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,o*100,r*100]},i.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),a=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[a*100,o*100,s*100,i*100]};function a(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}i.rgb.keyword=function(e){let t=r[e];if(t)return t;let i=1/0,o;for(let t of Object.keys(n)){let r=n[t],s=a(e,r);s<i&&(i=s,o=t)}return o},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;let i=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,a*100,o*100]},i.rgb.lab=function(e){let t=i.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return n/=95.047,r/=100,a/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*r-16,500*(n-r),200*(r-a)]},i.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=r*255,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+(i-s)*6*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=o*255;return c},i.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;let o=(r+n)/2;return[t,(r===0?2*i/(a+i):2*n/(r+n))*100,o*100]},i.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},i.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a=a||0,o/=2,[t,a*100,o*100]},i.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,o&1&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c;break}return[l*255,u*255,d*255]},i.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[a*255,o*255,s*255]},i.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]},i.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},i.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;a=(t+16)/116,i=n/500+a,o=a-r/200;let s=Math.pow(a,3),c=Math.pow(i,3),l=Math.pow(o,3);return a=s>.008856?s:(a-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]},i.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},i.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},i.rgb.ansi16=function(e,t=null){let[n,r,a]=e,o=t===null?i.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5;return[(t&1)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},i.ansi256.rgb=function(e){if(e>=232){let t=(e-232)*10+8;return[t,t,t]}e-=16;let t;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return`000000`.substring(t.length)+t},i.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},i.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[c*360,o*100,s*100]},i.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},i.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},i.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],r*100,n*100]},i.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],r*100,n*100]},i.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],(n-t)*100,(1-n)*100]},i.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}})),ke=f(((e,t)=>{let n=Oe();function r(){let e={},t=Object.keys(n);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function i(e){let t=r(),i=[e];for(t[e].distance=0;i.length;){let e=i.pop(),r=Object.keys(n[e]);for(let n=r.length,a=0;a<n;a++){let n=r[a],o=t[n];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,i.unshift(n))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let r=[t[e].parent,e],i=n[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),i=a(n[t[o].parent][o],i),o=t[o].parent;return i.conversion=r,i}t.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}})),Ae=f(((e,t)=>{let n=Oe(),r=ke(),i={},a=Object.keys(n);function o(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}function s(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}a.forEach(e=>{i[e]={},Object.defineProperty(i[e],`channels`,{value:n[e].channels}),Object.defineProperty(i[e],`labels`,{value:n[e].labels});let t=r(e);Object.keys(t).forEach(n=>{let r=t[n];i[e][n]=s(r),i[e][n].raw=o(r)})}),t.exports=i})),je=f(((e,t)=>{let n=(e,t)=>(...n)=>`\u001B[${e(...n)+t}m`,r=(e,t)=>(...n)=>{let r=e(...n);return`\u001B[${38+t};5;${r}m`},i=(e,t)=>(...n)=>{let r=e(...n);return`\u001B[${38+t};2;${r[0]};${r[1]};${r[2]}m`},a=e=>e,o=(e,t,n)=>[e,t,n],s=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},c,l=(e,t,n,r)=>{c===void 0&&(c=Ae());let i=r?10:0,a={};for(let[r,o]of Object.entries(c)){let s=r===`ansi16`?`ansi`:r;r===t?a[s]=e(n,i):typeof o==`object`&&(a[s]=e(o[t],i))}return a};function u(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[n,r]of Object.entries(t)){for(let[n,i]of Object.entries(r))t[n]={open:`\u001B[${i[0]}m`,close:`\u001B[${i[1]}m`},r[n]=t[n],e.set(i[0],i[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,`codes`,{value:e,enumerable:!1}),t.color.close=`\x1B[39m`,t.bgColor.close=`\x1B[49m`,s(t.color,`ansi`,()=>l(n,`ansi16`,a,!1)),s(t.color,`ansi256`,()=>l(r,`ansi256`,a,!1)),s(t.color,`ansi16m`,()=>l(i,`rgb`,o,!1)),s(t.bgColor,`ansi`,()=>l(n,`ansi16`,a,!0)),s(t.bgColor,`ansi256`,()=>l(r,`ansi256`,a,!0)),s(t.bgColor,`ansi16m`,()=>l(i,`rgb`,o,!0)),t}Object.defineProperty(t,`exports`,{enumerable:!0,get:u})})),Me=f(((e,t)=>{let n=we(),r=Ee(),i=je(),a=[`\x1B`,`›`],o=e=>`${a[0]}[${e}m`,s=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let a=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let s=i.codes.get(Number.parseInt(n,10));if(s){let n=e.indexOf(s.toString());n===-1?r.push(o(t?s:a)):e.splice(n,1)}else if(t){r.push(o(0));break}else r.push(o(a))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=o(i.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};t.exports=(e,t,i)=>{let o=[...e],c=[],l=typeof i==`number`?i:o.length,u=!1,d,f=0,p=``;for(let[m,h]of o.entries()){let o=!1;if(a.includes(h)){let t=/\d[^m]*/.exec(e.slice(m,m+18));d=t&&t.length>0?t[0]:void 0,f<l&&(u=!0,d!==void 0&&c.push(d))}else u&&h===`m`&&(u=!1,o=!0);if(!u&&!o&&f++,!r({exact:!0}).test(h)&&n(h.codePointAt())&&(f++,typeof i!=`number`&&l++),f>t&&f<=l)p+=h;else if(f===t&&!u&&d!==void 0)p=s(c);else if(f>=l){p+=s(c,!0,d);break}}return p}})),Ne=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getBorderCharacters=void 0,e.getBorderCharacters=e=>{if(e===`honeywell`)return{topBody:`═`,topJoin:`╤`,topLeft:`╔`,topRight:`╗`,bottomBody:`═`,bottomJoin:`╧`,bottomLeft:`╚`,bottomRight:`╝`,bodyLeft:`║`,bodyRight:`║`,bodyJoin:`│`,headerJoin:`┬`,joinBody:`─`,joinLeft:`╟`,joinRight:`╢`,joinJoin:`┼`,joinMiddleDown:`┬`,joinMiddleUp:`┴`,joinMiddleLeft:`┤`,joinMiddleRight:`├`};if(e===`norc`)return{topBody:`─`,topJoin:`┬`,topLeft:`┌`,topRight:`┐`,bottomBody:`─`,bottomJoin:`┴`,bottomLeft:`└`,bottomRight:`┘`,bodyLeft:`│`,bodyRight:`│`,bodyJoin:`│`,headerJoin:`┬`,joinBody:`─`,joinLeft:`├`,joinRight:`┤`,joinJoin:`┼`,joinMiddleDown:`┬`,joinMiddleUp:`┴`,joinMiddleLeft:`┤`,joinMiddleRight:`├`};if(e===`ramac`)return{topBody:`-`,topJoin:`+`,topLeft:`+`,topRight:`+`,bottomBody:`-`,bottomJoin:`+`,bottomLeft:`+`,bottomRight:`+`,bodyLeft:`|`,bodyRight:`|`,bodyJoin:`|`,headerJoin:`+`,joinBody:`-`,joinLeft:`|`,joinRight:`|`,joinJoin:`|`,joinMiddleDown:`+`,joinMiddleUp:`+`,joinMiddleLeft:`+`,joinMiddleRight:`+`};if(e===`void`)return{topBody:``,topJoin:``,topLeft:``,topRight:``,bottomBody:``,bottomJoin:``,bottomLeft:``,bottomRight:``,bodyLeft:``,bodyRight:``,bodyJoin:``,headerJoin:``,joinBody:``,joinLeft:``,joinRight:``,joinJoin:``,joinMiddleDown:``,joinMiddleUp:``,joinMiddleLeft:``,joinMiddleRight:``};throw Error(`Unknown border template "`+e+`".`)}})),Z=f((e=>{E();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.isCellInRange=e.areCellEqual=e.calculateRangeCoordinate=e.flatten=e.extractTruncates=e.sumArray=e.sequence=e.distributeUnevenly=e.countSpaceSequence=e.groupBySizes=e.makeBorderConfig=e.splitAnsi=e.normalizeString=void 0;let n=t(Me()),r=t(X()),i=t(Ce()),a=Ne();e.normalizeString=e=>e.replace(/\r\n/g,`
24
+ `),e.splitAnsi=e=>{let t=(0,i.default)(e).split(`
25
+ `).map(r.default),a=[],o=0;return t.forEach(t=>{a.push(t===0?``:(0,n.default)(e,o,o+t)),o+=t+1}),a},e.makeBorderConfig=e=>T(T({},(0,a.getBorderCharacters)(`honeywell`)),e),e.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{let r=e.slice(n,n+t);return n+=t,r})},e.countSpaceSequence=e=>{var t,n;return(n=(t=e.match(/\s+/g))==null?void 0:t.length)==null?0:n},e.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0)),e.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e),e.sumArray=e=>e.reduce((e,t)=>e+t,0),e.extractTruncates=e=>e.columns.map(({truncate:e})=>e),e.flatten=e=>[].concat(...e),e.calculateRangeCoordinate=e=>{let{row:t,col:n,colSpan:r=1,rowSpan:i=1}=e;return{bottomRight:{col:n+r-1,row:t+i-1},topLeft:{col:n,row:t}}},e.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col,e.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col})),Pe=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.alignString=void 0;let n=t(X()),r=Z(),i=(e,t)=>e+` `.repeat(t),a=(e,t)=>` `.repeat(t)+e,o=(e,t)=>` `.repeat(Math.floor(t/2))+e+` `.repeat(Math.ceil(t/2)),s=(e,t)=>{let n=(0,r.countSpaceSequence)(e);if(n===0)return i(e,t);let a=(0,r.distributeUnevenly)(t,n);if(Math.max(...a)>3)return i(e,t);let o=0;return e.replace(/\s+/g,e=>e+` `.repeat(a[o++]))};e.alignString=(e,t,r)=>{let c=(0,n.default)(e);if(c===t)return e;if(c>t)throw Error(`Subject parameter value width cannot be greater than the container width.`);if(c===0)return` `.repeat(t);let l=t-c;return r===`left`?i(e,l):r===`right`?a(e,l):r===`justify`?s(e,l):o(e,l)}})),Fe=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.alignTableData=void 0;let t=Pe();e.alignTableData=(e,n)=>e.map((e,r)=>e.map((e,i)=>{var a;let{width:o,alignment:s}=n.columns[i];return(a=n.spanningCellManager)!=null&&a.getContainingRange({col:i,row:r},{mapped:!0})?e:(0,t.alignString)(e,o,s)}))})),Ie=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.wrapString=void 0;let n=t(Me()),r=t(X());e.wrapString=(e,t)=>{let i=e,a=[];do a.push((0,n.default)(i,0,t)),i=(0,n.default)(i,t).trim();while((0,r.default)(i));return a}})),Le=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.wrapWord=void 0;let n=t(Me()),r=t(Ce()),i=(e,t)=>{let n=(0,r.default)(e),i=[],a=RegExp(`(^.{1,`+String(Math.max(t,1))+`}(\\s+|$))|(^.{1,`+String(Math.max(t-1,1))+`}(\\\\|/|_|\\.|,|;|-))`);do{let e,r=a.exec(n);if(r){e=r[0],n=n.slice(e.length);let t=e.trim().length,a=e.length-t;i.push([t,a])}else e=n.slice(0,t),n=n.slice(t),i.push([e.length,0])}while(n.length);return i};e.wrapWord=(e,t)=>{let r=[],a=0;return i(e,t).forEach(([t,i])=>{r.push((0,n.default)(e,a,a+t)),a+=t+i}),r}})),Re=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.wrapCell=void 0;let t=Z(),n=Ie(),r=Le();e.wrapCell=(e,i,a)=>{let o=(0,t.splitAnsi)(e);for(let e=0;e<o.length;){let t;t=a?(0,r.wrapWord)(o[e],i):(0,n.wrapString)(o[e],i),o.splice(e,1,...t),e+=t.length}return o}})),ze=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.calculateCellHeight=void 0;let t=Re();e.calculateCellHeight=(e,n,r=!1)=>(0,t.wrapCell)(e,n,r).length})),Be=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.calculateRowHeights=void 0;let t=ze(),n=Z();e.calculateRowHeights=(e,r)=>{let i=[];for(let[a,o]of e.entries()){let s=1;o.forEach((o,c)=>{var l;let u=(l=r.spanningCellManager)==null?void 0:l.getContainingRange({col:c,row:a});if(!u){let e=(0,t.calculateCellHeight)(o,r.columns[c].width,r.columns[c].wrapWord);s=Math.max(s,e);return}let{topLeft:d,bottomRight:f,height:p}=u;if(a===f.row){let t=(0,n.sumArray)(i.slice(d.row)),a=f.row-d.row,o=(0,n.sequence)(d.row+1,f.row).filter(t=>{var n;return!((n=r.drawHorizontalLine)!=null&&n.call(r,t,e.length))}).length,c=p-t-a+o;s=Math.max(s,c)}}),i.push(s)}return i}})),Ve=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.drawContent=void 0,e.drawContent=e=>{let{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:i,rowIndex:a,elementType:o}=e,s=t.length,c=[];return r(0,s)&&c.push(n(0,s)),t.forEach((e,t)=>{if((!o||o===`border`||o===`row`)&&c.push(e),o===`cell`&&a===void 0&&c.push(e),o===`cell`&&a!==void 0){let n=i==null?void 0:i.getContainingRange({col:t,row:a});(!n||t===n.topLeft.col)&&c.push(e)}if(t+1<s&&r(t+1,s)){let e=n(t+1,s);if(o===`cell`&&a!==void 0){let n={col:t+1,row:a},r=i==null?void 0:i.getContainingRange(n);(!r||r.topLeft.col===n.col)&&c.push(e)}else c.push(e)}}),r(s,s)&&c.push(n(s,s)),c.join(``)}})),He=f((e=>{E(),Object.defineProperty(e,`__esModule`,{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;let t=Ve();e.drawBorderSegments=(e,t)=>{let{separator:n,horizontalBorderIndex:r,spanningCellManager:i}=t;return e.map((e,t)=>{let a=n.body.repeat(e);if(r===void 0)return a;let o=i==null?void 0:i.getContainingRange({col:t,row:r});if(!o)return a;let{topLeft:s}=o;return r===s.row?a:t===s.col?o.extractBorderContent(r):``})},e.createSeparatorGetter=e=>{let{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:i}=e;return(e,a)=>{let o=n==null?void 0:n.inSameRange;if(r!==void 0&&o){let n={col:e,row:r-1},s={col:e-1,row:r},c={col:e-1,row:r-1},l={col:e,row:r},u=[[c,n],[n,l],[l,s],[s,c]];if(e===0)return o(l,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===a)return o(c,s)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(r===0)return o(l,s)?t.body:t.join;if(r===i)return o(n,c)?t.body:t.join;let d=u.map(e=>o(...e)).filter(Boolean).length;if(d===0)return t.join;if(d===4)return``;if(d===2)return o(...u[1])&&o(...u[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(d===1){if(!t.joinRight||!t.joinLeft||!t.joinUp||!t.joinDown)throw Error(`Can not get border separator for position [${r}, ${e}]`);return o(...u[0])?t.joinDown:o(...u[1])?t.joinLeft:o(...u[2])?t.joinUp:t.joinRight}throw Error(`Invalid case`)}return e===0?t.left:e===a?t.right:t.join}},e.drawBorder=(n,r)=>{let i=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:a,horizontalBorderIndex:o,spanningCellManager:s}=r;return(0,t.drawContent)({contents:i,drawSeparator:a,elementType:`border`,rowIndex:o,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:s})+`
26
+ `},e.drawBorderTop=(t,n)=>{let{border:r}=n,i=(0,e.drawBorder)(t,T(T({},n),{},{separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}}));return i===`
27
+ `?``:i},e.drawBorderJoin=(t,n)=>{let{border:r}=n;return(0,e.drawBorder)(t,T(T({},n),{},{separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}}))},e.drawBorderBottom=(t,n)=>{let{border:r}=n;return(0,e.drawBorder)(t,T(T({},n),{},{separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}}))},e.createTableBorderGetter=(t,n)=>(r,i)=>{let a=T(T({},n),{},{horizontalBorderIndex:r});return r===0?(0,e.drawBorderTop)(t,a):r===i?(0,e.drawBorderBottom)(t,a):(0,e.drawBorderJoin)(t,a)}})),Ue=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.drawRow=void 0;let t=Ve();e.drawRow=(e,n)=>{let{border:r,drawVerticalLine:i,rowIndex:a,spanningCellManager:o}=n;return(0,t.drawContent)({contents:e,drawSeparator:i,elementType:`cell`,rowIndex:a,separatorGetter:(e,t)=>e===0?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:o})+`
28
+ `}})),We=f(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Ge=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=We();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Ke=f((e=>{e[`config.json`]=g;let t={$id:`config.json`,$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{border:{$ref:`shared.json#/definitions/borders`},header:{type:`object`,properties:{content:{type:`string`},alignment:{$ref:`shared.json#/definitions/alignment`},wrapWord:{type:`boolean`},truncate:{type:`integer`},paddingLeft:{type:`integer`},paddingRight:{type:`integer`}},required:[`content`],additionalProperties:!1},columns:{$ref:`shared.json#/definitions/columns`},columnDefault:{$ref:`shared.json#/definitions/column`},drawVerticalLine:{typeof:`function`},drawHorizontalLine:{typeof:`function`},singleLine:{typeof:`boolean`},spanningCells:{type:`array`,items:{type:`object`,properties:{col:{type:`integer`,minimum:0},row:{type:`integer`,minimum:0},colSpan:{type:`integer`,minimum:1},rowSpan:{type:`integer`,minimum:1},alignment:{$ref:`shared.json#/definitions/alignment`},verticalAlignment:{$ref:`shared.json#/definitions/verticalAlignment`},wrapWord:{type:`boolean`},truncate:{type:`integer`},paddingLeft:{type:`integer`},paddingRight:{type:`integer`}},required:[`row`,`col`],additionalProperties:!1}}},additionalProperties:!1},n={type:`object`,properties:{topBody:{$ref:`#/definitions/border`},topJoin:{$ref:`#/definitions/border`},topLeft:{$ref:`#/definitions/border`},topRight:{$ref:`#/definitions/border`},bottomBody:{$ref:`#/definitions/border`},bottomJoin:{$ref:`#/definitions/border`},bottomLeft:{$ref:`#/definitions/border`},bottomRight:{$ref:`#/definitions/border`},bodyLeft:{$ref:`#/definitions/border`},bodyRight:{$ref:`#/definitions/border`},bodyJoin:{$ref:`#/definitions/border`},headerJoin:{$ref:`#/definitions/border`},joinBody:{$ref:`#/definitions/border`},joinLeft:{$ref:`#/definitions/border`},joinRight:{$ref:`#/definitions/border`},joinJoin:{$ref:`#/definitions/border`},joinMiddleUp:{$ref:`#/definitions/border`},joinMiddleDown:{$ref:`#/definitions/border`},joinMiddleLeft:{$ref:`#/definitions/border`},joinMiddleRight:{$ref:`#/definitions/border`}},additionalProperties:!1},r=Object.prototype.hasOwnProperty;function i(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:a=e}={}){let o=null,s=0;if(typeof e!=`string`){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}return i.errors=o,s===0}function a(e,{instancePath:t=``,parentData:o,parentDataProperty:s,rootData:c=e}={}){let l=null,u=0;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let i in e)if(!r.call(n.properties,i)){let e={instancePath:t,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:i},message:`must NOT have additional properties`};l===null?l=[e]:l.push(e),u++}e.topBody!==void 0&&(i(e.topBody,{instancePath:t+`/topBody`,parentData:e,parentDataProperty:`topBody`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.topJoin!==void 0&&(i(e.topJoin,{instancePath:t+`/topJoin`,parentData:e,parentDataProperty:`topJoin`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.topLeft!==void 0&&(i(e.topLeft,{instancePath:t+`/topLeft`,parentData:e,parentDataProperty:`topLeft`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.topRight!==void 0&&(i(e.topRight,{instancePath:t+`/topRight`,parentData:e,parentDataProperty:`topRight`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bottomBody!==void 0&&(i(e.bottomBody,{instancePath:t+`/bottomBody`,parentData:e,parentDataProperty:`bottomBody`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bottomJoin!==void 0&&(i(e.bottomJoin,{instancePath:t+`/bottomJoin`,parentData:e,parentDataProperty:`bottomJoin`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bottomLeft!==void 0&&(i(e.bottomLeft,{instancePath:t+`/bottomLeft`,parentData:e,parentDataProperty:`bottomLeft`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bottomRight!==void 0&&(i(e.bottomRight,{instancePath:t+`/bottomRight`,parentData:e,parentDataProperty:`bottomRight`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bodyLeft!==void 0&&(i(e.bodyLeft,{instancePath:t+`/bodyLeft`,parentData:e,parentDataProperty:`bodyLeft`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bodyRight!==void 0&&(i(e.bodyRight,{instancePath:t+`/bodyRight`,parentData:e,parentDataProperty:`bodyRight`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.bodyJoin!==void 0&&(i(e.bodyJoin,{instancePath:t+`/bodyJoin`,parentData:e,parentDataProperty:`bodyJoin`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.headerJoin!==void 0&&(i(e.headerJoin,{instancePath:t+`/headerJoin`,parentData:e,parentDataProperty:`headerJoin`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinBody!==void 0&&(i(e.joinBody,{instancePath:t+`/joinBody`,parentData:e,parentDataProperty:`joinBody`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinLeft!==void 0&&(i(e.joinLeft,{instancePath:t+`/joinLeft`,parentData:e,parentDataProperty:`joinLeft`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinRight!==void 0&&(i(e.joinRight,{instancePath:t+`/joinRight`,parentData:e,parentDataProperty:`joinRight`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinJoin!==void 0&&(i(e.joinJoin,{instancePath:t+`/joinJoin`,parentData:e,parentDataProperty:`joinJoin`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinMiddleUp!==void 0&&(i(e.joinMiddleUp,{instancePath:t+`/joinMiddleUp`,parentData:e,parentDataProperty:`joinMiddleUp`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinMiddleDown!==void 0&&(i(e.joinMiddleDown,{instancePath:t+`/joinMiddleDown`,parentData:e,parentDataProperty:`joinMiddleDown`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinMiddleLeft!==void 0&&(i(e.joinMiddleLeft,{instancePath:t+`/joinMiddleLeft`,parentData:e,parentDataProperty:`joinMiddleLeft`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length)),e.joinMiddleRight!==void 0&&(i(e.joinMiddleRight,{instancePath:t+`/joinMiddleRight`,parentData:e,parentDataProperty:`joinMiddleRight`,rootData:c})||(l=l===null?i.errors:l.concat(i.errors),u=l.length))}else{let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};l===null?l=[e]:l.push(e),u++}return a.errors=l,u===0}let o={type:`string`,enum:[`left`,`right`,`center`,`justify`]};Ge().default;function s(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,c=0;if(typeof e!=`string`){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`string`},message:`must be string`};a===null?a=[e]:a.push(e),c++}if(!(e===`left`||e===`right`||e===`center`||e===`justify`)){let e={instancePath:t,schemaPath:`#/enum`,keyword:`enum`,params:{allowedValues:o.enum},message:`must be equal to one of the allowed values`};a===null?a=[e]:a.push(e),c++}return s.errors=a,c===0}let c=RegExp(`^[0-9]+$`,`u`);function l(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,s=0;if(typeof e!=`string`){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`string`},message:`must be string`};a===null?a=[e]:a.push(e),s++}if(!(e===`left`||e===`right`||e===`center`||e===`justify`)){let e={instancePath:t,schemaPath:`#/enum`,keyword:`enum`,params:{allowedValues:o.enum},message:`must be equal to one of the allowed values`};a===null?a=[e]:a.push(e),s++}return l.errors=a,s===0}let u={type:`string`,enum:[`top`,`middle`,`bottom`]};function d(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(typeof e!=`string`){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`string`},message:`must be string`};a===null?a=[e]:a.push(e),o++}if(!(e===`top`||e===`middle`||e===`bottom`)){let e={instancePath:t,schemaPath:`#/enum`,keyword:`enum`,params:{allowedValues:u.enum},message:`must be equal to one of the allowed values`};a===null?a=[e]:a.push(e),o++}return d.errors=a,o===0}function f(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let n in e)if(!(n===`alignment`||n===`verticalAlignment`||n===`width`||n===`wrapWord`||n===`truncate`||n===`paddingLeft`||n===`paddingRight`)){let e={instancePath:t,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:n},message:`must NOT have additional properties`};a===null?a=[e]:a.push(e),o++}if(e.alignment!==void 0&&(l(e.alignment,{instancePath:t+`/alignment`,parentData:e,parentDataProperty:`alignment`,rootData:i})||(a=a===null?l.errors:a.concat(l.errors),o=a.length)),e.verticalAlignment!==void 0&&(d(e.verticalAlignment,{instancePath:t+`/verticalAlignment`,parentData:e,parentDataProperty:`verticalAlignment`,rootData:i})||(a=a===null?d.errors:a.concat(d.errors),o=a.length)),e.width!==void 0){let n=e.width;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/width`,schemaPath:`#/properties/width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}if(typeof n==`number`&&isFinite(n)&&(n<1||isNaN(n))){let e={instancePath:t+`/width`,schemaPath:`#/properties/width/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};a===null?a=[e]:a.push(e),o++}}if(e.wrapWord!==void 0&&typeof e.wrapWord!=`boolean`){let e={instancePath:t+`/wrapWord`,schemaPath:`#/properties/wrapWord/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};a===null?a=[e]:a.push(e),o++}if(e.truncate!==void 0){let n=e.truncate;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/truncate`,schemaPath:`#/properties/truncate/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}if(e.paddingLeft!==void 0){let n=e.paddingLeft;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/paddingLeft`,schemaPath:`#/properties/paddingLeft/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}if(e.paddingRight!==void 0){let n=e.paddingRight;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/paddingRight`,schemaPath:`#/properties/paddingRight/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}}else{let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};a===null?a=[e]:a.push(e),o++}return f.errors=a,o===0}function p(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0,s=o,l=!1,u=null,d=o;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let n in e)if(!c.test(n)){let e={instancePath:t,schemaPath:`#/oneOf/0/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:n},message:`must NOT have additional properties`};a===null?a=[e]:a.push(e),o++}for(let n in e)c.test(n)&&(f(e[n],{instancePath:t+`/`+n.replace(/~/g,`~0`).replace(/\//g,`~1`),parentData:e,parentDataProperty:n,rootData:i})||(a=a===null?f.errors:a.concat(f.errors),o=a.length))}else{let e={instancePath:t,schemaPath:`#/oneOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};a===null?a=[e]:a.push(e),o++}var m=d===o;m&&(l=!0,u=0);let h=o;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++)f(e[r],{instancePath:t+`/`+r,parentData:e,parentDataProperty:r,rootData:i})||(a=a===null?f.errors:a.concat(f.errors),o=a.length)}else{let e={instancePath:t,schemaPath:`#/oneOf/1/type`,keyword:`type`,params:{type:`array`},message:`must be array`};a===null?a=[e]:a.push(e),o++}var m=h===o;if(m&&l?(l=!1,u=[u,1]):m&&(l=!0,u=1),l)o=s,a!==null&&(s?a.length=s:a=null);else{let e={instancePath:t,schemaPath:`#/oneOf`,keyword:`oneOf`,params:{passingSchemas:u},message:`must match exactly one schema in oneOf`};a===null?a=[e]:a.push(e),o++}return p.errors=a,o===0}function m(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let n in e)if(!(n===`alignment`||n===`verticalAlignment`||n===`width`||n===`wrapWord`||n===`truncate`||n===`paddingLeft`||n===`paddingRight`)){let e={instancePath:t,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:n},message:`must NOT have additional properties`};a===null?a=[e]:a.push(e),o++}if(e.alignment!==void 0&&(l(e.alignment,{instancePath:t+`/alignment`,parentData:e,parentDataProperty:`alignment`,rootData:i})||(a=a===null?l.errors:a.concat(l.errors),o=a.length)),e.verticalAlignment!==void 0&&(d(e.verticalAlignment,{instancePath:t+`/verticalAlignment`,parentData:e,parentDataProperty:`verticalAlignment`,rootData:i})||(a=a===null?d.errors:a.concat(d.errors),o=a.length)),e.width!==void 0){let n=e.width;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/width`,schemaPath:`#/properties/width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}if(typeof n==`number`&&isFinite(n)&&(n<1||isNaN(n))){let e={instancePath:t+`/width`,schemaPath:`#/properties/width/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};a===null?a=[e]:a.push(e),o++}}if(e.wrapWord!==void 0&&typeof e.wrapWord!=`boolean`){let e={instancePath:t+`/wrapWord`,schemaPath:`#/properties/wrapWord/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};a===null?a=[e]:a.push(e),o++}if(e.truncate!==void 0){let n=e.truncate;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/truncate`,schemaPath:`#/properties/truncate/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}if(e.paddingLeft!==void 0){let n=e.paddingLeft;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/paddingLeft`,schemaPath:`#/properties/paddingLeft/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}if(e.paddingRight!==void 0){let n=e.paddingRight;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/paddingRight`,schemaPath:`#/properties/paddingRight/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}}else{let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};a===null?a=[e]:a.push(e),o++}return m.errors=a,o===0}function h(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(typeof e!=`string`){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`string`},message:`must be string`};a===null?a=[e]:a.push(e),o++}if(!(e===`top`||e===`middle`||e===`bottom`)){let e={instancePath:t,schemaPath:`#/enum`,keyword:`enum`,params:{allowedValues:u.enum},message:`must be equal to one of the allowed values`};a===null?a=[e]:a.push(e),o++}return h.errors=a,o===0}function g(e,{instancePath:n=``,parentData:i,parentDataProperty:o,rootData:c=e}={}){let l=null,u=0;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let t in e)if(!(t===`border`||t===`header`||t===`columns`||t===`columnDefault`||t===`drawVerticalLine`||t===`drawHorizontalLine`||t===`singleLine`||t===`spanningCells`)){let e={instancePath:n,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:t},message:`must NOT have additional properties`};l===null?l=[e]:l.push(e),u++}if(e.border!==void 0&&(a(e.border,{instancePath:n+`/border`,parentData:e,parentDataProperty:`border`,rootData:c})||(l=l===null?a.errors:l.concat(a.errors),u=l.length)),e.header!==void 0){let t=e.header;if(t&&typeof t==`object`&&!Array.isArray(t)){if(t.content===void 0){let e={instancePath:n+`/header`,schemaPath:`#/properties/header/required`,keyword:`required`,params:{missingProperty:`content`},message:`must have required property 'content'`};l===null?l=[e]:l.push(e),u++}for(let e in t)if(!(e===`content`||e===`alignment`||e===`wrapWord`||e===`truncate`||e===`paddingLeft`||e===`paddingRight`)){let t={instancePath:n+`/header`,schemaPath:`#/properties/header/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:e},message:`must NOT have additional properties`};l===null?l=[t]:l.push(t),u++}if(t.content!==void 0&&typeof t.content!=`string`){let e={instancePath:n+`/header/content`,schemaPath:`#/properties/header/properties/content/type`,keyword:`type`,params:{type:`string`},message:`must be string`};l===null?l=[e]:l.push(e),u++}if(t.alignment!==void 0&&(s(t.alignment,{instancePath:n+`/header/alignment`,parentData:t,parentDataProperty:`alignment`,rootData:c})||(l=l===null?s.errors:l.concat(s.errors),u=l.length)),t.wrapWord!==void 0&&typeof t.wrapWord!=`boolean`){let e={instancePath:n+`/header/wrapWord`,schemaPath:`#/properties/header/properties/wrapWord/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};l===null?l=[e]:l.push(e),u++}if(t.truncate!==void 0){let e=t.truncate;if(!(typeof e==`number`&&!(e%1)&&!isNaN(e)&&isFinite(e))){let e={instancePath:n+`/header/truncate`,schemaPath:`#/properties/header/properties/truncate/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}}if(t.paddingLeft!==void 0){let e=t.paddingLeft;if(!(typeof e==`number`&&!(e%1)&&!isNaN(e)&&isFinite(e))){let e={instancePath:n+`/header/paddingLeft`,schemaPath:`#/properties/header/properties/paddingLeft/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}}if(t.paddingRight!==void 0){let e=t.paddingRight;if(!(typeof e==`number`&&!(e%1)&&!isNaN(e)&&isFinite(e))){let e={instancePath:n+`/header/paddingRight`,schemaPath:`#/properties/header/properties/paddingRight/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}}}else{let e={instancePath:n+`/header`,schemaPath:`#/properties/header/type`,keyword:`type`,params:{type:`object`},message:`must be object`};l===null?l=[e]:l.push(e),u++}}if(e.columns!==void 0&&(p(e.columns,{instancePath:n+`/columns`,parentData:e,parentDataProperty:`columns`,rootData:c})||(l=l===null?p.errors:l.concat(p.errors),u=l.length)),e.columnDefault!==void 0&&(m(e.columnDefault,{instancePath:n+`/columnDefault`,parentData:e,parentDataProperty:`columnDefault`,rootData:c})||(l=l===null?m.errors:l.concat(m.errors),u=l.length)),e.drawVerticalLine!==void 0&&typeof e.drawVerticalLine!=`function`){let e={instancePath:n+`/drawVerticalLine`,schemaPath:`#/properties/drawVerticalLine/typeof`,keyword:`typeof`,params:{},message:`must pass "typeof" keyword validation`};l===null?l=[e]:l.push(e),u++}if(e.drawHorizontalLine!==void 0&&typeof e.drawHorizontalLine!=`function`){let e={instancePath:n+`/drawHorizontalLine`,schemaPath:`#/properties/drawHorizontalLine/typeof`,keyword:`typeof`,params:{},message:`must pass "typeof" keyword validation`};l===null?l=[e]:l.push(e),u++}if(e.singleLine!==void 0&&typeof e.singleLine!=`boolean`){let e={instancePath:n+`/singleLine`,schemaPath:`#/properties/singleLine/typeof`,keyword:`typeof`,params:{},message:`must pass "typeof" keyword validation`};l===null?l=[e]:l.push(e),u++}if(e.spanningCells!==void 0){let i=e.spanningCells;if(Array.isArray(i)){let e=i.length;for(let a=0;a<e;a++){let e=i[a];if(e&&typeof e==`object`&&!Array.isArray(e)){if(e.row===void 0){let e={instancePath:n+`/spanningCells/`+a,schemaPath:`#/properties/spanningCells/items/required`,keyword:`required`,params:{missingProperty:`row`},message:`must have required property 'row'`};l===null?l=[e]:l.push(e),u++}if(e.col===void 0){let e={instancePath:n+`/spanningCells/`+a,schemaPath:`#/properties/spanningCells/items/required`,keyword:`required`,params:{missingProperty:`col`},message:`must have required property 'col'`};l===null?l=[e]:l.push(e),u++}for(let i in e)if(!r.call(t.properties.spanningCells.items.properties,i)){let e={instancePath:n+`/spanningCells/`+a,schemaPath:`#/properties/spanningCells/items/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:i},message:`must NOT have additional properties`};l===null?l=[e]:l.push(e),u++}if(e.col!==void 0){let t=e.col;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/col`,schemaPath:`#/properties/spanningCells/items/properties/col/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}if(typeof t==`number`&&isFinite(t)&&(t<0||isNaN(t))){let e={instancePath:n+`/spanningCells/`+a+`/col`,schemaPath:`#/properties/spanningCells/items/properties/col/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};l===null?l=[e]:l.push(e),u++}}if(e.row!==void 0){let t=e.row;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/row`,schemaPath:`#/properties/spanningCells/items/properties/row/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}if(typeof t==`number`&&isFinite(t)&&(t<0||isNaN(t))){let e={instancePath:n+`/spanningCells/`+a+`/row`,schemaPath:`#/properties/spanningCells/items/properties/row/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};l===null?l=[e]:l.push(e),u++}}if(e.colSpan!==void 0){let t=e.colSpan;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/colSpan`,schemaPath:`#/properties/spanningCells/items/properties/colSpan/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}if(typeof t==`number`&&isFinite(t)&&(t<1||isNaN(t))){let e={instancePath:n+`/spanningCells/`+a+`/colSpan`,schemaPath:`#/properties/spanningCells/items/properties/colSpan/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};l===null?l=[e]:l.push(e),u++}}if(e.rowSpan!==void 0){let t=e.rowSpan;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/rowSpan`,schemaPath:`#/properties/spanningCells/items/properties/rowSpan/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}if(typeof t==`number`&&isFinite(t)&&(t<1||isNaN(t))){let e={instancePath:n+`/spanningCells/`+a+`/rowSpan`,schemaPath:`#/properties/spanningCells/items/properties/rowSpan/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};l===null?l=[e]:l.push(e),u++}}if(e.alignment!==void 0&&(s(e.alignment,{instancePath:n+`/spanningCells/`+a+`/alignment`,parentData:e,parentDataProperty:`alignment`,rootData:c})||(l=l===null?s.errors:l.concat(s.errors),u=l.length)),e.verticalAlignment!==void 0&&(h(e.verticalAlignment,{instancePath:n+`/spanningCells/`+a+`/verticalAlignment`,parentData:e,parentDataProperty:`verticalAlignment`,rootData:c})||(l=l===null?h.errors:l.concat(h.errors),u=l.length)),e.wrapWord!==void 0&&typeof e.wrapWord!=`boolean`){let e={instancePath:n+`/spanningCells/`+a+`/wrapWord`,schemaPath:`#/properties/spanningCells/items/properties/wrapWord/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};l===null?l=[e]:l.push(e),u++}if(e.truncate!==void 0){let t=e.truncate;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/truncate`,schemaPath:`#/properties/spanningCells/items/properties/truncate/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}}if(e.paddingLeft!==void 0){let t=e.paddingLeft;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/paddingLeft`,schemaPath:`#/properties/spanningCells/items/properties/paddingLeft/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}}if(e.paddingRight!==void 0){let t=e.paddingRight;if(!(typeof t==`number`&&!(t%1)&&!isNaN(t)&&isFinite(t))){let e={instancePath:n+`/spanningCells/`+a+`/paddingRight`,schemaPath:`#/properties/spanningCells/items/properties/paddingRight/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};l===null?l=[e]:l.push(e),u++}}}else{let e={instancePath:n+`/spanningCells/`+a,schemaPath:`#/properties/spanningCells/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};l===null?l=[e]:l.push(e),u++}}}else{let e={instancePath:n+`/spanningCells`,schemaPath:`#/properties/spanningCells/type`,keyword:`type`,params:{type:`array`},message:`must be array`};l===null?l=[e]:l.push(e),u++}}}else{let e={instancePath:n,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};l===null?l=[e]:l.push(e),u++}return g.errors=l,u===0}e[`streamConfig.json`]=b;function _(e,{instancePath:t=``,parentData:a,parentDataProperty:o,rootData:s=e}={}){let c=null,l=0;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let i in e)if(!r.call(n.properties,i)){let e={instancePath:t,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:i},message:`must NOT have additional properties`};c===null?c=[e]:c.push(e),l++}e.topBody!==void 0&&(i(e.topBody,{instancePath:t+`/topBody`,parentData:e,parentDataProperty:`topBody`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.topJoin!==void 0&&(i(e.topJoin,{instancePath:t+`/topJoin`,parentData:e,parentDataProperty:`topJoin`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.topLeft!==void 0&&(i(e.topLeft,{instancePath:t+`/topLeft`,parentData:e,parentDataProperty:`topLeft`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.topRight!==void 0&&(i(e.topRight,{instancePath:t+`/topRight`,parentData:e,parentDataProperty:`topRight`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bottomBody!==void 0&&(i(e.bottomBody,{instancePath:t+`/bottomBody`,parentData:e,parentDataProperty:`bottomBody`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bottomJoin!==void 0&&(i(e.bottomJoin,{instancePath:t+`/bottomJoin`,parentData:e,parentDataProperty:`bottomJoin`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bottomLeft!==void 0&&(i(e.bottomLeft,{instancePath:t+`/bottomLeft`,parentData:e,parentDataProperty:`bottomLeft`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bottomRight!==void 0&&(i(e.bottomRight,{instancePath:t+`/bottomRight`,parentData:e,parentDataProperty:`bottomRight`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bodyLeft!==void 0&&(i(e.bodyLeft,{instancePath:t+`/bodyLeft`,parentData:e,parentDataProperty:`bodyLeft`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bodyRight!==void 0&&(i(e.bodyRight,{instancePath:t+`/bodyRight`,parentData:e,parentDataProperty:`bodyRight`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.bodyJoin!==void 0&&(i(e.bodyJoin,{instancePath:t+`/bodyJoin`,parentData:e,parentDataProperty:`bodyJoin`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.headerJoin!==void 0&&(i(e.headerJoin,{instancePath:t+`/headerJoin`,parentData:e,parentDataProperty:`headerJoin`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinBody!==void 0&&(i(e.joinBody,{instancePath:t+`/joinBody`,parentData:e,parentDataProperty:`joinBody`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinLeft!==void 0&&(i(e.joinLeft,{instancePath:t+`/joinLeft`,parentData:e,parentDataProperty:`joinLeft`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinRight!==void 0&&(i(e.joinRight,{instancePath:t+`/joinRight`,parentData:e,parentDataProperty:`joinRight`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinJoin!==void 0&&(i(e.joinJoin,{instancePath:t+`/joinJoin`,parentData:e,parentDataProperty:`joinJoin`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinMiddleUp!==void 0&&(i(e.joinMiddleUp,{instancePath:t+`/joinMiddleUp`,parentData:e,parentDataProperty:`joinMiddleUp`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinMiddleDown!==void 0&&(i(e.joinMiddleDown,{instancePath:t+`/joinMiddleDown`,parentData:e,parentDataProperty:`joinMiddleDown`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinMiddleLeft!==void 0&&(i(e.joinMiddleLeft,{instancePath:t+`/joinMiddleLeft`,parentData:e,parentDataProperty:`joinMiddleLeft`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length)),e.joinMiddleRight!==void 0&&(i(e.joinMiddleRight,{instancePath:t+`/joinMiddleRight`,parentData:e,parentDataProperty:`joinMiddleRight`,rootData:s})||(c=c===null?i.errors:c.concat(i.errors),l=c.length))}else{let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};c===null?c=[e]:c.push(e),l++}return _.errors=c,l===0}function v(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0,s=o,l=!1,u=null,d=o;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let n in e)if(!c.test(n)){let e={instancePath:t,schemaPath:`#/oneOf/0/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:n},message:`must NOT have additional properties`};a===null?a=[e]:a.push(e),o++}for(let n in e)c.test(n)&&(f(e[n],{instancePath:t+`/`+n.replace(/~/g,`~0`).replace(/\//g,`~1`),parentData:e,parentDataProperty:n,rootData:i})||(a=a===null?f.errors:a.concat(f.errors),o=a.length))}else{let e={instancePath:t,schemaPath:`#/oneOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};a===null?a=[e]:a.push(e),o++}var p=d===o;p&&(l=!0,u=0);let m=o;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++)f(e[r],{instancePath:t+`/`+r,parentData:e,parentDataProperty:r,rootData:i})||(a=a===null?f.errors:a.concat(f.errors),o=a.length)}else{let e={instancePath:t,schemaPath:`#/oneOf/1/type`,keyword:`type`,params:{type:`array`},message:`must be array`};a===null?a=[e]:a.push(e),o++}var p=m===o;if(p&&l?(l=!1,u=[u,1]):p&&(l=!0,u=1),l)o=s,a!==null&&(s?a.length=s:a=null);else{let e={instancePath:t,schemaPath:`#/oneOf`,keyword:`oneOf`,params:{passingSchemas:u},message:`must match exactly one schema in oneOf`};a===null?a=[e]:a.push(e),o++}return v.errors=a,o===0}function y(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let n in e)if(!(n===`alignment`||n===`verticalAlignment`||n===`width`||n===`wrapWord`||n===`truncate`||n===`paddingLeft`||n===`paddingRight`)){let e={instancePath:t,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:n},message:`must NOT have additional properties`};a===null?a=[e]:a.push(e),o++}if(e.alignment!==void 0&&(l(e.alignment,{instancePath:t+`/alignment`,parentData:e,parentDataProperty:`alignment`,rootData:i})||(a=a===null?l.errors:a.concat(l.errors),o=a.length)),e.verticalAlignment!==void 0&&(d(e.verticalAlignment,{instancePath:t+`/verticalAlignment`,parentData:e,parentDataProperty:`verticalAlignment`,rootData:i})||(a=a===null?d.errors:a.concat(d.errors),o=a.length)),e.width!==void 0){let n=e.width;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/width`,schemaPath:`#/properties/width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}if(typeof n==`number`&&isFinite(n)&&(n<1||isNaN(n))){let e={instancePath:t+`/width`,schemaPath:`#/properties/width/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};a===null?a=[e]:a.push(e),o++}}if(e.wrapWord!==void 0&&typeof e.wrapWord!=`boolean`){let e={instancePath:t+`/wrapWord`,schemaPath:`#/properties/wrapWord/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};a===null?a=[e]:a.push(e),o++}if(e.truncate!==void 0){let n=e.truncate;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/truncate`,schemaPath:`#/properties/truncate/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}if(e.paddingLeft!==void 0){let n=e.paddingLeft;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/paddingLeft`,schemaPath:`#/properties/paddingLeft/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}if(e.paddingRight!==void 0){let n=e.paddingRight;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/paddingRight`,schemaPath:`#/properties/paddingRight/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}}}else{let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};a===null?a=[e]:a.push(e),o++}return y.errors=a,o===0}function b(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(e&&typeof e==`object`&&!Array.isArray(e)){if(e.columnDefault===void 0){let e={instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:`columnDefault`},message:`must have required property 'columnDefault'`};a===null?a=[e]:a.push(e),o++}if(e.columnCount===void 0){let e={instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:`columnCount`},message:`must have required property 'columnCount'`};a===null?a=[e]:a.push(e),o++}for(let n in e)if(!(n===`border`||n===`columns`||n===`columnDefault`||n===`columnCount`||n===`drawVerticalLine`)){let e={instancePath:t,schemaPath:`#/additionalProperties`,keyword:`additionalProperties`,params:{additionalProperty:n},message:`must NOT have additional properties`};a===null?a=[e]:a.push(e),o++}if(e.border!==void 0&&(_(e.border,{instancePath:t+`/border`,parentData:e,parentDataProperty:`border`,rootData:i})||(a=a===null?_.errors:a.concat(_.errors),o=a.length)),e.columns!==void 0&&(v(e.columns,{instancePath:t+`/columns`,parentData:e,parentDataProperty:`columns`,rootData:i})||(a=a===null?v.errors:a.concat(v.errors),o=a.length)),e.columnDefault!==void 0&&(y(e.columnDefault,{instancePath:t+`/columnDefault`,parentData:e,parentDataProperty:`columnDefault`,rootData:i})||(a=a===null?y.errors:a.concat(y.errors),o=a.length)),e.columnCount!==void 0){let n=e.columnCount;if(!(typeof n==`number`&&!(n%1)&&!isNaN(n)&&isFinite(n))){let e={instancePath:t+`/columnCount`,schemaPath:`#/properties/columnCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};a===null?a=[e]:a.push(e),o++}if(typeof n==`number`&&isFinite(n)&&(n<1||isNaN(n))){let e={instancePath:t+`/columnCount`,schemaPath:`#/properties/columnCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};a===null?a=[e]:a.push(e),o++}}if(e.drawVerticalLine!==void 0&&typeof e.drawVerticalLine!=`function`){let e={instancePath:t+`/drawVerticalLine`,schemaPath:`#/properties/drawVerticalLine/typeof`,keyword:`typeof`,params:{},message:`must pass "typeof" keyword validation`};a===null?a=[e]:a.push(e),o++}}else{let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`};a===null?a=[e]:a.push(e),o++}return b.errors=a,o===0}})),qe=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.validateConfig=void 0;let n=t(Ke());e.validateConfig=(e,t)=>{let r=n.default[e];if(!r(t)&&r.errors){let e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log(`config`,t),console.log(`errors`,e),Error(`Invalid config.`)}}})),Je=f((e=>{E(),Object.defineProperty(e,`__esModule`,{value:!0}),e.makeStreamConfig=void 0;let t=Z(),n=qe(),r=(e,t={},n)=>Array.from({length:e}).map((e,r)=>T(T({alignment:`left`,paddingLeft:1,paddingRight:1,truncate:1/0,verticalAlignment:`top`,wrapWord:!1},n),t[r]));e.makeStreamConfig=e=>{if((0,n.validateConfig)(`streamConfig.json`,e),e.columnDefault.width===void 0)throw Error(`Must provide config.columnDefault.width when creating a stream.`);return T(T({drawVerticalLine:()=>!0},e),{},{border:(0,t.makeBorderConfig)(e.border),columns:r(e.columnCount,e.columns,e.columnDefault)})}})),Q=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;let t=Z(),n=Re(),r=e=>Array(e).fill(``);e.padCellVertically=(e,t,n)=>{let i=t-e.length;return n===`top`?[...e,...r(i)]:n===`bottom`?[...r(i),...e]:[...r(Math.floor(i/2)),...e,...r(Math.ceil(i/2))]},e.mapDataUsingRowHeights=(r,i,a)=>{let o=r[0].length,s=r.map((t,r)=>{let s=i[r],c=Array.from({length:s},()=>Array(o).fill(``));return t.forEach((t,i)=>{var o;let l=(o=a.spanningCellManager)==null?void 0:o.getContainingRange({col:i,row:r});if(l){l.extractCellContent(r).forEach((e,t)=>{c[t][i]=e});return}let u=(0,n.wrapCell)(t,a.columns[i].width,a.columns[i].wrapWord);(0,e.padCellVertically)(u,s,a.columns[i].verticalAlignment).forEach((e,t)=>{c[t][i]=e})}),c});return(0,t.flatten)(s)}})),Ye=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.padTableData=e.padString=void 0,e.padString=(e,t,n)=>` `.repeat(t)+e+` `.repeat(n),e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,i)=>{var a;if((a=n.spanningCellManager)!=null&&a.getContainingRange({col:i,row:r},{mapped:!0}))return t;let{paddingLeft:o,paddingRight:s}=n.columns[i];return(0,e.padString)(t,o,s)}))})),Xe=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.stringifyTableData=void 0;let t=Z();e.stringifyTableData=e=>e.map(e=>e.map(e=>(0,t.normalizeString)(String(e))))})),Ze=f(((e,t)=>{var n=30,r=`...`,i=1/0,a=17976931348623157e292,o=NaN,s=`[object RegExp]`,c=`[object Symbol]`,l=/^\s+|\s+$/g,u=/\w*$/,d=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,p=/^0o[0-7]+$/i,m=`\\ud800-\\udfff`,h=`\\u0300-\\u036f\\ufe20-\\ufe23`,g=`\\u20d0-\\u20f0`,_=`\\ufe0e\\ufe0f`,v=`[`+m+`]`,y=`[`+h+g+`]`,b=`\\ud83c[\\udffb-\\udfff]`,ee=`(?:`+y+`|`+b+`)`,te=`[^`+m+`]`,ne=`(?:\\ud83c[\\udde6-\\uddff]){2}`,x=`[\\ud800-\\udbff][\\udc00-\\udfff]`,S=`\\u200d`,C=ee+`?`,re=`[`+_+`]?`,ie=`(?:`+S+`(?:`+[te,ne,x].join(`|`)+`)`+re+C+`)*`,ae=re+C+ie,oe=`(?:`+[te+y+`?`,y,ne,x,v].join(`|`)+`)`,w=RegExp(b+`(?=`+b+`)|`+oe+ae,`g`),se=RegExp(`[`+S+m+h+g+_+`]`),T=parseInt,E=typeof global==`object`&&global&&global.Object===Object&&global,D=typeof self==`object`&&self&&self.Object===Object&&self,ce=E||D||Function(`return this`)(),O=typeof e==`object`&&e&&!e.nodeType&&e,k=O&&typeof t==`object`&&t&&!t.nodeType&&t,A=k&&k.exports===O&&E.process,j=function(){try{return A&&A.binding(`util`)}catch(e){}}(),le=j&&j.isRegExp,ue=M(`length`);function de(e){return e.split(``)}function M(e){return function(t){return t==null?void 0:t[e]}}function N(e){return function(t){return e(t)}}function P(e){return se.test(e)}function F(e){return P(e)?pe(e):ue(e)}function fe(e){return P(e)?me(e):de(e)}function pe(e){for(var t=w.lastIndex=0;w.test(e);)t++;return t}function me(e){return e.match(w)||[]}var I=Object.prototype.toString,L=ce.Symbol,R=L?L.prototype:void 0,z=R?R.toString:void 0;function B(e){return U(e)&&I.call(e)==s}function he(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function V(e){if(typeof e==`string`)return e;if(_e(e))return z?z.call(e):``;var t=e+``;return t==`0`&&1/e==-i?`-0`:t}function H(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:he(e,t,n)}function U(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function ge(e){return!!e&&typeof e==`object`}var W=le?N(le):B;function _e(e){return typeof e==`symbol`||ge(e)&&I.call(e)==c}function ve(e){return e?(e=K(e),e===i||e===-i?(e<0?-1:1)*a:e===e?e:0):e===0?e:0}function G(e){var t=ve(e),n=t%1;return t===t?n?t-n:t:0}function K(e){if(typeof e==`number`)return e;if(_e(e))return o;if(U(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=U(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(l,``);var n=f.test(e);return n||p.test(e)?T(e.slice(2),n?2:8):d.test(e)?o:+e}function ye(e){return e==null?``:V(e)}function q(e,t){var i=n,a=r;if(U(t)){var o=`separator`in t?t.separator:o;i=`length`in t?G(t.length):i,a=`omission`in t?V(t.omission):a}e=ye(e);var s=e.length;if(P(e)){var c=fe(e);s=c.length}if(i>=s)return e;var l=i-F(a);if(l<1)return a;var d=c?H(c,0,l).join(``):e.slice(0,l);if(o===void 0)return d+a;if(c&&(l+=d.length-l),W(o)){if(e.slice(l).search(o)){var f,p=d;for(o.global||(o=RegExp(o.source,ye(u.exec(o))+`g`)),o.lastIndex=0;f=o.exec(p);)var m=f.index;d=d.slice(0,m===void 0?l:m)}}else if(e.indexOf(V(o),l)!=l){var h=d.lastIndexOf(o);h>-1&&(d=d.slice(0,h))}return d+a}t.exports=q})),Qe=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.truncateTableData=e.truncateString=void 0;let n=t(Ze());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:`…`}),e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))})),$e=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createStream=void 0;let t=Fe(),n=Be(),r=He(),i=Ue(),a=Je(),o=Q(),s=Ye(),c=Xe(),l=Qe(),u=Z(),d=(e,r)=>{let i=(0,c.stringifyTableData)(e);i=(0,l.truncateTableData)(i,(0,u.extractTruncates)(r));let a=(0,n.calculateRowHeights)(i,r);return i=(0,o.mapDataUsingRowHeights)(i,a,r),i=(0,t.alignTableData)(i,r),i=(0,s.padTableData)(i,r),i},f=(e,t,n)=>{let a=d([e],n).map(e=>(0,i.drawRow)(e,n)).join(``),o=``;o+=(0,r.drawBorderTop)(t,n),o+=a,o+=(0,r.drawBorderBottom)(t,n),o=o.trimEnd(),process.stdout.write(o)},p=(e,t,n)=>{let a=d([e],n).map(e=>(0,i.drawRow)(e,n)).join(``),o=``,s=(0,r.drawBorderBottom)(t,n);s!==`
29
+ `&&(o=`\r\x1B[K`),o+=(0,r.drawBorderJoin)(t,n),o+=a,o+=s,o=o.trimEnd(),process.stdout.write(o)};e.createStream=e=>{let t=(0,a.makeStreamConfig)(e),n=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight),r=!0;return{write:e=>{if(e.length!==t.columnCount)throw Error(`Row cell count does not match the config.columnCount.`);r?(r=!1,f(e,n,t)):p(e,n,t)}}}})),et=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.calculateOutputColumnWidths=void 0,e.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight)})),tt=f((e=>{E(),Object.defineProperty(e,`__esModule`,{value:!0}),e.drawTable=void 0;let t=He(),n=Ve(),r=Ue(),i=Z();e.drawTable=(e,a,o,s)=>{let{drawHorizontalLine:c,singleLine:l}=s,u=(0,i.groupBySizes)(e,o).map((e,t)=>e.map(e=>(0,r.drawRow)(e,T(T({},s),{},{rowIndex:t}))).join(``));return(0,n.drawContent)({contents:u,drawSeparator:(e,t)=>(e===0||e===t||!l)&&c(e,t),elementType:`row`,rowIndex:-1,separatorGetter:(0,t.createTableBorderGetter)(a,T(T({},s),{},{rowCount:u.length})),spanningCellManager:s.spanningCellManager})}}));function nt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var rt=d((()=>{}));function it(e,t){if(e==null)return{};var n,r,i=nt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var at=d((()=>{rt()})),ot=f((e=>{at(),E();let t=[`row`],n=[`content`];Object.defineProperty(e,`__esModule`,{value:!0}),e.injectHeaderConfig=void 0,e.injectHeaderConfig=(e,r)=>{var i;let a=(i=r.spanningCells)==null?[]:i,o=r.header,s=[...e];if(o){a=a.map(e=>{let{row:n}=e;return T(T({},it(e,t)),{},{row:n+1})});let{content:r}=o,i=it(o,n);a.unshift(T({alignment:`center`,col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1},i)),s.unshift([r,...Array.from({length:e[0].length-1}).fill(``)])}return[s,a]}})),st=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;let n=t(X()),r=Z();e.calculateMaximumCellWidth=e=>Math.max(...e.split(`
30
+ `).map(n.default)),e.calculateMaximumColumnWidths=(t,n=[])=>{let i=Array(t[0].length).fill(0),a=n.map(r.calculateRangeCoordinate),o=(e,t)=>a.some(n=>(0,r.isCellInRange)({col:t,row:e},n));return t.forEach((t,n)=>{t.forEach((t,r)=>{o(n,r)||(i[r]=Math.max(i[r],(0,e.calculateMaximumCellWidth)(t)))})}),i}})),ct=f((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.alignVerticalRangeContent=e.wrapRangeContent=void 0;let n=t(X()),r=Pe(),i=Q(),a=Ye(),o=Qe(),s=Z(),c=Re();e.wrapRangeContent=(e,t,n)=>{let{topLeft:i,paddingRight:s,paddingLeft:l,truncate:u,wrapWord:d,alignment:f}=e,p=n.rows[i.row][i.col],m=t-l-s;return(0,c.wrapCell)((0,o.truncateString)(p,u),m,d).map(e=>{let t=(0,r.alignString)(e,m,f);return(0,a.padString)(t,l,s)})},e.alignVerticalRangeContent=(e,t,r)=>{let{rows:a,drawHorizontalLine:o,rowHeights:c}=r,{topLeft:l,bottomRight:u,verticalAlignment:d}=e;if(c.length===0)return[];let f=(0,s.sumArray)(c.slice(l.row,u.row+1)),p=u.row-l.row,m=(0,s.sequence)(l.row+1,u.row).filter(e=>!o(e,a.length)).length,h=f+p-m;return(0,i.padCellVertically)(t,h,d).map(e=>e.length===0?` `.repeat((0,n.default)(t[0])):e)}})),lt=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.calculateSpanningCellWidth=void 0;let t=Z();e.calculateSpanningCellWidth=(e,n)=>{let{columnsConfig:r,drawVerticalLine:i}=n,{topLeft:a,bottomRight:o}=e,s=(0,t.sumArray)(r.slice(a.col,o.col+1).map(({width:e})=>e)),c=a.col===o.col?r[a.col].paddingRight+r[o.col].paddingLeft:(0,t.sumArray)(r.slice(a.col,o.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)),l=o.col-a.col,u=(0,t.sequence)(a.col+1,o.col).filter(e=>!i(e,r.length)).length;return s+c+l-u}})),ut=f((e=>{E(),Object.defineProperty(e,`__esModule`,{value:!0}),e.makeRangeConfig=void 0;let t=Z();e.makeRangeConfig=(e,n)=>{var r;let{topLeft:i,bottomRight:a}=(0,t.calculateRangeCoordinate)(e);return T(T({},T(T(T({},n[i.col]),e),{},{paddingRight:(r=e.paddingRight)==null?n[a.col].paddingRight:r})),{},{bottomRight:a,topLeft:i})}})),dt=f((e=>{E(),Object.defineProperty(e,`__esModule`,{value:!0}),e.createSpanningCellManager=void 0;let t=ct(),n=lt(),r=ut(),i=Z(),a=(e,t)=>t.find(t=>(0,i.isCellInRange)(e,t)),o=(e,r)=>{let a=(0,n.calculateSpanningCellWidth)(e,r),o=(0,t.wrapRangeContent)(e,a,r),s=(0,t.alignVerticalRangeContent)(e,o,r);return T(T({},e),{},{extractBorderContent:t=>{let{topLeft:n}=e;return s[(0,i.sumArray)(r.rowHeights.slice(n.row,t))+(t-n.row-1)]},extractCellContent:t=>{let{topLeft:n}=e,{drawHorizontalLine:a,rowHeights:o}=r,c=t-n.row,l=(0,i.sequence)(n.row+1,t).filter(e=>!(a!=null&&a(e,o.length))).length,u=(0,i.sumArray)(o.slice(n.row,t))+c-l;return s.slice(u,u+o[t])},height:o.length,width:a})},s=(e,t,n)=>{let r=a(e,n),o=a(t,n);return r&&o?(0,i.areCellEqual)(r.topLeft,o.topLeft):!1},c=e=>{let{row:t,col:n}=e.topLeft;return`${t}/${n}`};e.createSpanningCellManager=e=>{let{spanningCellConfigs:t,columnsConfig:n}=e,l=t.map(e=>(0,r.makeRangeConfig)(e,n)),u={},d=[],f=[];return{getContainingRange:(t,n)=>{let r=n!=null&&n.mapped?f[t.row]:t.row,i=a(T(T({},t),{},{row:r}),l);if(!i)return;if(d.length===0)return o(i,T(T({},e),{},{rowHeights:d}));let s=c(i);return u[s]!=null||(u[s]=o(i,T(T({},e),{},{rowHeights:d}))),u[s]},inSameRange:(e,t)=>s(e,t,l),rowHeights:d,rowIndexMapping:f,setRowHeights:e=>{d=e},setRowIndexMapping:e=>{f=(0,i.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}}})),ft=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSpanningCellConfig=void 0;let t=Z(),n=(e,t,n)=>e<=n&&n<=t;e.validateSpanningCellConfig=(e,r)=>{let[i,a]=[e.length,e[0].length];r.forEach((e,t)=>{let{colSpan:n,rowSpan:r}=e;if(n===void 0&&r===void 0)throw Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(n!==void 0&&n<1)throw Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(r!==void 0&&r<1)throw Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});let o=r.map(t.calculateRangeCoordinate);o.forEach(({topLeft:e,bottomRight:t},r)=>{if(!n(0,a-1,e.col)||!n(0,i-1,e.row)||!n(0,a-1,t.col)||!n(0,i-1,t.row))throw Error(`Some cells in config.spanningCells[${r}] are out of the table`)});let s=Array.from({length:i},()=>Array.from({length:a}));o.forEach(({topLeft:e,bottomRight:n},r)=>{(0,t.sequence)(e.row,n.row).forEach(i=>{(0,t.sequence)(e.col,n.col).forEach(e=>{if(s[i][e]!==void 0)throw Error(`Spanning cells in config.spanningCells[${s[i][e]}] and config.spanningCells[${r}] are overlap each other`);s[i][e]=r})})})}})),pt=f((e=>{E(),Object.defineProperty(e,`__esModule`,{value:!0}),e.makeTableConfig=void 0;let t=st(),n=dt(),r=Z(),i=qe(),a=ft(),o=(e,n,r,i)=>{let a=(0,t.calculateMaximumColumnWidths)(e,i);return e[0].map((e,t)=>T(T({alignment:`left`,paddingLeft:1,paddingRight:1,truncate:1/0,verticalAlignment:`top`,width:a[t],wrapWord:!1},r),n==null?void 0:n[t]))};e.makeTableConfig=(e,t={},s)=>{var c,l,u,d,f;(0,i.validateConfig)(`config.json`,t),(0,a.validateSpanningCellConfig)(e,(c=t.spanningCells)==null?[]:c);let p=(l=s==null?t.spanningCells:s)==null?[]:l,m=o(e,t.columns,t.columnDefault,p),h=(u=t.drawVerticalLine)==null?(()=>!0):u,g=(d=t.drawHorizontalLine)==null?(()=>!0):d;return T(T({},t),{},{border:(0,r.makeBorderConfig)(t.border),columns:m,drawHorizontalLine:g,drawVerticalLine:h,singleLine:(f=t.singleLine)==null?!1:f,spanningCellManager:(0,n.createSpanningCellManager)({columnsConfig:m,drawHorizontalLine:g,drawVerticalLine:h,rows:e,spanningCellConfigs:p})})}})),mt=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTableData=void 0;let t=Z();e.validateTableData=e=>{if(!Array.isArray(e))throw TypeError(`Table data must be an array.`);if(e.length===0)throw Error(`Table must define at least one row.`);if(e[0].length===0)throw Error(`Table must define at least one column.`);let n=e[0].length;for(let r of e){if(!Array.isArray(r))throw TypeError(`Table row data must be an array.`);if(r.length!==n)throw Error(`Table must have a consistent number of cells.`);for(let e of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,t.normalizeString)(String(e))))throw Error(`Table data must not contain control characters.`)}}})),ht=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.table=void 0;let t=Fe(),n=et(),r=Be(),i=tt(),a=ot(),o=pt(),s=Q(),c=Ye(),l=Xe(),u=Qe(),d=Z(),f=mt();e.table=(e,p={})=>{(0,f.validateTableData)(e);let m=(0,l.stringifyTableData)(e),[h,g]=(0,a.injectHeaderConfig)(m,p),_=(0,o.makeTableConfig)(h,p,g);m=(0,u.truncateTableData)(h,(0,d.extractTruncates)(_));let v=(0,r.calculateRowHeights)(m,_);_.spanningCellManager.setRowHeights(v),_.spanningCellManager.setRowIndexMapping(v),m=(0,s.mapDataUsingRowHeights)(m,v,_),m=(0,t.alignTableData)(m,_),m=(0,c.padTableData)(m,_);let y=(0,n.calculateOutputColumnWidths)(_);return(0,i.drawTable)(m,y,v,_)}})),gt=f((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),_t=m(f((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;let r=$e();Object.defineProperty(e,`createStream`,{enumerable:!0,get:function(){return r.createStream}});let i=Ne();Object.defineProperty(e,`getBorderCharacters`,{enumerable:!0,get:function(){return i.getBorderCharacters}});let a=ht();Object.defineProperty(e,`table`,{enumerable:!0,get:function(){return a.table}}),n(gt(),e)}))(),1);function $(e){let t=Math.abs(e);if(t<1e3)return String(e);let n=[`K`,`M`,`B`,`T`],r=t,i=-1;for(;r>=1e3&&i<n.length-1;)r/=1e3,i+=1;let a=r>=100?0:r>=10?1:2,o=Number(r.toFixed(a)).toString();return`${e<0?`-`:``}${o}${n[i]}`}function vt(e){return Number(e.toFixed(4)).toString()}const yt={border:{topBody:`─`,topJoin:`┬`,topLeft:`┌`,topRight:`┐`,bottomBody:`─`,bottomJoin:`┴`,bottomLeft:`└`,bottomRight:`┘`,bodyLeft:`│`,bodyRight:`│`,bodyJoin:`│`,joinBody:`─`,joinLeft:`├`,joinRight:`┤`,joinJoin:`┼`}};function bt(e,t){let n=[[`Day`,`Model`,`Input`,`Output`,`Cache Read`,`Cache Write`,`Total Tokens`,`Cost USD`],...e.map(e=>[e.day,e.model,$(e.input_tokens),$(e.output_tokens),$(e.cache_read_tokens),$(e.cache_write_tokens),$(e.total_tokens),e.cost_usd===null?`unmatched`:vt(e.cost_usd)])],r=new Map;for(let t of e){var i;let e=(i=r.get(t.day))==null?{cost:0,totalTokens:0,unmatchedRows:0}:i;e.totalTokens+=t.total_tokens,t.cost_usd===null?e.unmatchedRows+=1:e.cost+=t.cost_usd,r.set(t.day,e)}let a=[[`Day`,`Total Tokens`,`Cost USD`,`Unknown Models`],...[...r.entries()].sort((e,t)=>t[0].localeCompare(e[0])).map(([e,t])=>[e,$(t.totalTokens),vt(t.cost),t.unmatchedRows.toString()])];console.log(`${Y.bold.cyan(`Database:`)} ${Y.dim(t)}`),console.log(`\n${Y.bold.blue(`Per day/model:`)}`),console.log((0,_t.table)(n,yt)),console.log(Y.bold.blue(`Daily totals:`)),console.log((0,_t.table)(a,yt))}var xt,St;const Ct=(xt=(St=process.argv[2])==null?process.env.OPENCODE_DB_PATH:St)==null?t.join(e.homedir(),`.local`,`share`,`opencode`,`opencode.db`):xt;function wt(){return Tt.apply(this,arguments)}function Tt(){return Tt=_(function*(){let e=h(Ct);if(e.length===0){console.log(`No usage rows found in ${Ct}`);return}bt(ce(e,yield v()),Ct)}),Tt.apply(this,arguments)}wt().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`Failed: ${t}`),process.exit(1)});export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openuse",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "bun test",
@@ -24,6 +24,7 @@
24
24
  "@types/node": "^24.9.1",
25
25
  "@typescript-eslint/eslint-plugin": "^8.46.1",
26
26
  "@typescript-eslint/parser": "^8.46.1",
27
+ "chalk": "^5.6.2",
27
28
  "concurrently": "^9.2.1",
28
29
  "eslint": "^9.38.0",
29
30
  "eslint-config-prettier": "^10.1.8",
@@ -34,6 +35,7 @@
34
35
  "prettier": "^3.6.2",
35
36
  "prettier-plugin-organize-imports": "^4.3.0",
36
37
  "rolldown": "1.0.0-rc.13",
38
+ "table": "^6.9.0",
37
39
  "tsdown": "^0.15.9",
38
40
  "tslib": "^2.8.1",
39
41
  "tsx": "^4.20.6",