@remotex-labs/xjet 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var Xe=Object.defineProperty;var a=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var Ze="xJet.mock()",K=class extends Function{static{a(this,"MockState")}static mocks=new Set;name;xJetMock=!0;state;queuedImplementations=[];implementation;originalImplementation;restore;constructor(t,i,r){return super(),this.name=r??Ze,this.state=this.initState(),this.implementation=t||void 0,this.restore=i,this.originalImplementation=t||(()=>{}),new Proxy(this,{get:this.invokeGet,apply:this.invokeFunction,construct:this.invokeClass})}get mock(){return Object.freeze({...this.state})}get original(){return this.originalImplementation}mockClear(){return this.state=this.initState(),this}mockReset(){return this.mockClear(),this.queuedImplementations=[],this}mockRestore(){this.mockReset();let t=this.restore?.();return typeof t=="function"?this.implementation=t:this.implementation=this.originalImplementation,this}getMockImplementation(){return this.implementation}getNextImplementation(){return this.queuedImplementations.length?this.queuedImplementations.shift():this.implementation}mockImplementation(t){return this.implementation=t,this}mockImplementationOnce(t){return this.queuedImplementations.push(t),this}mockReturnValue(t){return this.mockImplementation(()=>t),this}mockReturnValueOnce(t){return this.mockImplementationOnce(()=>t),this}mockResolvedValue(t){return this.mockImplementation(()=>Promise.resolve(t)),this}mockResolvedValueOnce(t){return this.mockImplementationOnce(()=>Promise.resolve(t)),this}mockRejectedValue(t){return this.mockImplementation(()=>Promise.reject(t)),this}mockRejectedValueOnce(t){return this.mockImplementationOnce(()=>Promise.reject(t)),this}[Symbol.for("nodejs.util.inspect.custom")](){return`<Mock Constructor ${this.name}>`}initState(){return{calls:[],results:[],lastCall:void 0,contexts:[],instances:[],invocationCallOrder:[]}}invoke(t,i){let r=t,n=this.getNextImplementation(),s=i;typeof n=="function"&&(n.__boundArgs&&s.unshift(...n.__boundArgs),n.__boundThis&&(r=n.__boundThis)),this.state.calls.push(s),this.state.contexts.push(r),this.state.invocationCallOrder.push(this.state.invocationCallOrder.length+1);let o,c=this.state.results.push({value:void 0,type:"incomplete"})-1;if(n)try{o={type:"return",value:n.call(t,...i)}}catch(l){o={value:l,type:"throw"}}else o={type:"return",value:void 0};return this.state.lastCall=i,this.state.results[c]=o,o.value}invokeGet(t,i){return Reflect.has(t,i)?Reflect.get(t,i):Reflect.get(t.originalImplementation,i)}invokeClass(t,i,r){let n=t.invoke.call(t,r,i),s=typeof n=="object"&&n!==null&&"constructor"in n;return t.state.instances.push(s?n:r),typeof n=="object"?n:r}invokeFunction(t,i,r){return t.state.instances.push(i),t.invoke.call(t,i,r)}};var Qe={dim:[2,22],bold:[1,22],reset:[0,0],hidden:[8,28],inverse:[7,27]},et={red:[31,39],gray:[90,39],blue:[34,39],cyan:[36,39],black:[30,39],white:[37,39],green:[32,39],yellow:[33,39],magenta:[35,39],redBright:[91,39],blueBright:[94,39],cyanBright:[96,39],whiteBright:[97,39],greenBright:[92,39],blackBright:[90,39],yellowBright:[93,39],magentaBright:[95,39],darkGray:["38;5;238",39],lightGray:["38;5;252",39],lightCyan:["38;5;81",39],lightCoral:["38;5;203",39],oliveGreen:["38;5;149",39],deepOrange:["38;5;166",39],brightPink:["38;5;197",39],lightOrange:["38;5;215",39],burntOrange:["38;5;208",39],lightYellow:["38;5;230",39],canaryYellow:["38;5;227",39],lightGoldenrodYellow:["38;5;221",39]},tt={bgRed:[41,49],bgBlue:[44,49],bgCyan:[46,49],bgGray:[100,49],bgBlack:[40,49],bgGreen:[42,49],bgWhite:[47,49],bgYellow:[43,49],bgMagenta:[45,49],bgRedBright:[101,49],bgBlueBright:[104,49],bgCyanBright:[106,49],bgBlackBright:[100,49],bgWhiteBright:[107,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgMagentaBright:[105,49]},ae={...Qe,...et,...tt},N="\x1B[",U="m";function ce(e,t){if(globalThis.NO_COLOR)return t;let i=e.length;if(i===0)return t;if(i===1)return`${N}${e[0][0]}${U}${t}${N}${e[0][1]}${U}`;let r=new Array(i),n=new Array(i);for(let s=0;s<i;s++)n[s]=`${N}${e[s][0]}${U}`,r[i-s-1]=`${N}${e[s][1]}${U}`;return n.concat(t,r).join("")}a(ce,"I");function D(e,t,i,r){if(typeof t!="number"||typeof i!="number"||typeof r!="number")throw new Error(`RGB values must be numbers, received: r=${typeof t}, g=${typeof i}, b=${typeof r}`);let n=e==="fg"?38:48,s=e==="fg"?39:49;return[`${n};2;${t};${i};${r}`,s]}a(D,"d");function le(e){let t=e.replace(/^#/,"").toLowerCase();if(!/^([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t))throw new Error(`Invalid hex color format: "${e}". Expected 3 or 6 hex digits.`);if(t.length===3){let s=parseInt(t[0]+t[0],16),o=parseInt(t[1]+t[1],16),c=parseInt(t[2]+t[2],16);return[s,o,c]}let i=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16);return[i,r,n]}a(le,"_");function P(e=[]){let t=a((...r)=>{if(Array.isArray(r[0])&&"raw"in r[0]){let[n,...s]=r,o=n.reduce((c,l,u)=>c+l+(u<s.length?String(s[u]??""):""),"");return ce(e,o)}return ce(e,r.join(" "))},"e"),i={rgb:a((r,n,s)=>P([...e,D("fg",r,n,s)]),"rgb"),bgRgb:a((r,n,s)=>P([...e,D("bg",r,n,s)]),"bgRgb"),hex:a(r=>P([...e,D("fg",...le(r))]),"hex"),bgHex:a(r=>P([...e,D("bg",...le(r))]),"bgHex")};return new Proxy(t,{get(r,n){if(typeof n!="string")throw new Error(`Invalid property: ${String(n)}`);return n in ae?P([...e,ae[n]]):n in i?i[n]:Reflect.get(r,n)}})}a(P,"g");var R=P();function it(e,t){return t!=null&&(t.constructor===e||typeof t=="function")}a(it,"isA");function X(e,t){return e==null||typeof e!="object"&&typeof e!="function"?!1:t in e||Object.prototype.hasOwnProperty.call(e,t)}a(X,"hasKey");function x(e){return!!e&&X(e,"expectedLabel")&&it(Function,e.matches)}a(x,"isAsymmetric");function be(e,t){let i=x(e),r=x(t);if(!(i&&r)){if(i)return e.matches(t);if(r)return t.matches(e)}}a(be,"asymmetricMatch");function rt(e,t,i=!0){if(Array.isArray(e)&&Array.isArray(t))return i&&e.length!==t.length?!1:e.every((s,o)=>v(s,t[o],i));let r=Object.keys(e),n=Object.keys(t);if(i&&r.length!==n.length)return!1;for(let s of r)if(!X(t,s)||!v(e[s],t[s],i))return!1;return!0}a(rt,"deepEquals");function v(e,t,i=!0){if(e===t||Object.is(e,t))return!0;if(e===null||t===null)return!1;let r=be(e,t);return r!==void 0?r:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e instanceof RegExp&&t instanceof RegExp?e.source===t.source&&e.flags===t.flags:globalThis.URL&&e instanceof globalThis.URL&&t instanceof globalThis.URL?e.href===t.href:typeof e=="object"&&typeof t=="object"?rt(e,t,i):!1}a(v,"equals");function nt(e){let t={};for(let i of Object.keys(e)){let r=e[i];r&&(t[i]=r)}return t.name=e.name,t.stack=e.stack,t.message=e.message,t}a(nt,"serializesError");function st(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}a(st,"isPromise");var Ee=" ";function ot(e){return typeof e=="string"?e.includes(`
1
+ var Xe=Object.defineProperty;var a=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var Ze="xJet.mock()",K=class extends Function{static{a(this,"MockState")}static mocks=new Set;name;xJetMock=!0;state;queuedImplementations=[];implementation;originalImplementation;restore;constructor(t,i,r){return super(),this.name=r??Ze,this.state=this.initState(),this.implementation=t||void 0,this.restore=i,this.originalImplementation=t||(()=>{}),new Proxy(this,{get:this.invokeGet,apply:this.invokeFunction,construct:this.invokeClass})}get mock(){return Object.freeze({...this.state})}get original(){return this.originalImplementation}mockClear(){return this.state=this.initState(),this}mockReset(){return this.mockClear(),this.queuedImplementations=[],this}mockRestore(){this.mockReset();let t=this.restore?.();return typeof t=="function"?this.implementation=t:this.implementation=this.originalImplementation,this}getMockImplementation(){return this.implementation}getNextImplementation(){return this.queuedImplementations.length?this.queuedImplementations.shift():this.implementation}mockImplementation(t){return this.implementation=t,this}mockImplementationOnce(t){return this.queuedImplementations.push(t),this}mockReturnValue(t){return this.mockImplementation(()=>t),this}mockReturnValueOnce(t){return this.mockImplementationOnce(()=>t),this}mockResolvedValue(t){return this.mockImplementation(()=>Promise.resolve(t)),this}mockResolvedValueOnce(t){return this.mockImplementationOnce(()=>Promise.resolve(t)),this}mockRejectedValue(t){return this.mockImplementation(()=>Promise.reject(t)),this}mockRejectedValueOnce(t){return this.mockImplementationOnce(()=>Promise.reject(t)),this}[Symbol.for("nodejs.util.inspect.custom")](){return`<Mock Constructor ${this.name}>`}initState(){return{calls:[],results:[],lastCall:void 0,contexts:[],instances:[],invocationCallOrder:[]}}invoke(t,i){let r=t,n=this.getNextImplementation(),s=i;typeof n=="function"&&(n.__boundArgs&&s.unshift(...n.__boundArgs),n.__boundThis&&(r=n.__boundThis)),this.state.calls.push(s),this.state.contexts.push(r),this.state.invocationCallOrder.push(this.state.invocationCallOrder.length+1);let o,c=this.state.results.push({value:void 0,type:"incomplete"})-1;if(n)try{o={type:"return",value:n.call(t,...i)}}catch(l){throw this.state.results[c]={type:"throw",value:l},this.state.lastCall=i,l}else o={type:"return",value:void 0};return this.state.lastCall=i,this.state.results[c]=o,o.value}invokeGet(t,i){return Reflect.has(t,i)?Reflect.get(t,i):Reflect.get(t.originalImplementation,i)}invokeClass(t,i,r){let n=t.invoke.call(t,r,i),s=typeof n=="object"&&n!==null&&"constructor"in n;return t.state.instances.push(s?n:r),typeof n=="object"?n:r}invokeFunction(t,i,r){return t.state.instances.push(i),t.invoke.call(t,i,r)}};var Qe={dim:[2,22],bold:[1,22],reset:[0,0],hidden:[8,28],inverse:[7,27]},et={red:[31,39],gray:[90,39],blue:[34,39],cyan:[36,39],black:[30,39],white:[37,39],green:[32,39],yellow:[33,39],magenta:[35,39],redBright:[91,39],blueBright:[94,39],cyanBright:[96,39],whiteBright:[97,39],greenBright:[92,39],blackBright:[90,39],yellowBright:[93,39],magentaBright:[95,39],darkGray:["38;5;238",39],lightGray:["38;5;252",39],lightCyan:["38;5;81",39],lightCoral:["38;5;203",39],oliveGreen:["38;5;149",39],deepOrange:["38;5;166",39],brightPink:["38;5;197",39],lightOrange:["38;5;215",39],burntOrange:["38;5;208",39],lightYellow:["38;5;230",39],canaryYellow:["38;5;227",39],lightGoldenrodYellow:["38;5;221",39]},tt={bgRed:[41,49],bgBlue:[44,49],bgCyan:[46,49],bgGray:[100,49],bgBlack:[40,49],bgGreen:[42,49],bgWhite:[47,49],bgYellow:[43,49],bgMagenta:[45,49],bgRedBright:[101,49],bgBlueBright:[104,49],bgCyanBright:[106,49],bgBlackBright:[100,49],bgWhiteBright:[107,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgMagentaBright:[105,49]},ae={...Qe,...et,...tt},N="\x1B[",U="m";function ce(e,t){if(globalThis.NO_COLOR)return t;let i=e.length;if(i===0)return t;if(i===1)return`${N}${e[0][0]}${U}${t}${N}${e[0][1]}${U}`;let r=new Array(i),n=new Array(i);for(let s=0;s<i;s++)n[s]=`${N}${e[s][0]}${U}`,r[i-s-1]=`${N}${e[s][1]}${U}`;return n.concat(t,r).join("")}a(ce,"I");function D(e,t,i,r){if(typeof t!="number"||typeof i!="number"||typeof r!="number")throw new Error(`RGB values must be numbers, received: r=${typeof t}, g=${typeof i}, b=${typeof r}`);let n=e==="fg"?38:48,s=e==="fg"?39:49;return[`${n};2;${t};${i};${r}`,s]}a(D,"d");function le(e){let t=e.replace(/^#/,"").toLowerCase();if(!/^([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t))throw new Error(`Invalid hex color format: "${e}". Expected 3 or 6 hex digits.`);if(t.length===3){let s=parseInt(t[0]+t[0],16),o=parseInt(t[1]+t[1],16),c=parseInt(t[2]+t[2],16);return[s,o,c]}let i=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16);return[i,r,n]}a(le,"_");function P(e=[]){let t=a((...r)=>{if(Array.isArray(r[0])&&"raw"in r[0]){let[n,...s]=r,o=n.reduce((c,l,u)=>c+l+(u<s.length?String(s[u]??""):""),"");return ce(e,o)}return ce(e,r.join(" "))},"e"),i={rgb:a((r,n,s)=>P([...e,D("fg",r,n,s)]),"rgb"),bgRgb:a((r,n,s)=>P([...e,D("bg",r,n,s)]),"bgRgb"),hex:a(r=>P([...e,D("fg",...le(r))]),"hex"),bgHex:a(r=>P([...e,D("bg",...le(r))]),"bgHex")};return new Proxy(t,{get(r,n){if(typeof n!="string")throw new Error(`Invalid property: ${String(n)}`);return n in ae?P([...e,ae[n]]):n in i?i[n]:Reflect.get(r,n)}})}a(P,"g");var R=P();function it(e,t){return t!=null&&(t.constructor===e||typeof t=="function")}a(it,"isA");function X(e,t){return e==null||typeof e!="object"&&typeof e!="function"?!1:t in e||Object.prototype.hasOwnProperty.call(e,t)}a(X,"hasKey");function x(e){return!!e&&X(e,"expectedLabel")&&it(Function,e.matches)}a(x,"isAsymmetric");function be(e,t){let i=x(e),r=x(t);if(!(i&&r)){if(i)return e.matches(t);if(r)return t.matches(e)}}a(be,"asymmetricMatch");function rt(e,t,i=!0){if(Array.isArray(e)&&Array.isArray(t))return i&&e.length!==t.length?!1:e.every((s,o)=>v(s,t[o],i));let r=Object.keys(e),n=Object.keys(t);if(i&&r.length!==n.length)return!1;for(let s of r)if(!X(t,s)||!v(e[s],t[s],i))return!1;return!0}a(rt,"deepEquals");function v(e,t,i=!0){if(e===t||Object.is(e,t))return!0;if(e===null||t===null)return!1;let r=be(e,t);return r!==void 0?r:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e instanceof RegExp&&t instanceof RegExp?e.source===t.source&&e.flags===t.flags:globalThis.URL&&e instanceof globalThis.URL&&t instanceof globalThis.URL?e.href===t.href:typeof e=="object"&&typeof t=="object"?rt(e,t,i):!1}a(v,"equals");function nt(e){let t={};for(let i of Object.keys(e)){let r=e[i];r&&(t[i]=r)}return t.name=e.name,t.stack=e.stack,t.message=e.message,t}a(nt,"serializesError");function st(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}a(st,"isPromise");var Ee=" ";function ot(e){return typeof e=="string"?e.includes(`
2
2
  `)?null:`"${e}"`:typeof e=="number"?`${Number.isFinite(e)?e:e.toString()}`:typeof e=="boolean"?`${e}`:typeof e=="symbol"?`${e.toString()}`:typeof e=="bigint"?`${e}n`:typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e===null?"null":e===void 0?"undefined":x(e)?e.expectedLabel??e.constructor.name:e instanceof Date?`[Date: ${e.toISOString()}]`:e instanceof RegExp?e.toString():e instanceof Error?`[${e.name}: ${e.message}]`:e instanceof Promise?"[Promise <pending>]":e instanceof ArrayBuffer?`ArrayBuffer { byteLength: ${e.byteLength} }`:e instanceof DataView?`DataView { byteLength: ${e.byteLength}, byteOffset: ${e.byteOffset} }`:null}a(ot,"serializePrimitive");function at(e){return e===null?"null":e===void 0?"undefined":typeof e=="object"?Object.prototype.toString.call(e):JSON.stringify(e)}a(at,"serializeMapKey");function H(e,t,i,r,n=""){if(e.length===0)return;if(e.length<2){let o=`${n}${i}${e[e.length-1]}`;t.push(r?o:`${o},`);return}t.push(`${n}${i}${e[0]}`);for(let o=1;o<e.length-1;o++)t.push(n+e[o]);let s=`${n}${e[e.length-1]}`;t.push(r?s:`${s},`)}a(H,"appendLines");function ct(e,t,i,r){if(e.size===0){t.push("Map {}");return}t.push("Map {");let n=Array.from(e.entries());n.forEach(([s,o],c)=>{let l=at(s),u=[];M(o,u,i,r),H(u,t,`${l} => `,c===n.length-1,i)}),t.push("}")}a(ct,"serializeMap");function lt(e,t,i,r){if(e.length===0){t.push("[]");return}t.push("["),e.forEach((n,s)=>{let o=[];M(n,o,i,r),H(o,t,"",s===e.length-1,i)}),t.push("]")}a(lt,"serializeArray");function ht(e,t,i,r){if(e.size===0){t.push("Set {}");return}t.push("Set {");let n=Array.from(e);n.forEach((s,o)=>{let c=[];M(s,c,i,r),H(c,t,"",o===n.length-1,i)}),t.push("}")}a(ht,"serializeSet");function ut(e,t,i){let r=Array.from(e);if(r.length===0){t.push("Buffer {}");return}t.push("Buffer {");for(let n=0;n<r.length;n++){let s=r[n],o=n===r.length-1?"":",";t.push(`${i}${s}${o}`)}t.push("}")}a(ut,"serializeBuffer");function pt(e,t,i){let r=Object.prototype.toString.call(e).slice(8,-1),n=Array.from(e);if(n.length===0){t.push(`${r} []`);return}t.push(`${r} [`);for(let s=0;s<n.length;s++){let o=n[s],c=s===n.length-1?"":",";t.push(`${i}${o}${c}`)}t.push("]")}a(pt,"serializeTypedArray");function he(e,t,i,r){let n=e.constructor&&e.constructor!==Object?e.constructor.name:"Object",s=Object.entries(e);if(s.length===0){t.push(`${n} {}`);return}t.push(`${n} {`),s.forEach(([o,c],l)=>{let u=[];M(c,u,i,r),H(u,t,`${String(o)}: `,l===s.length-1,i)}),t.push("}")}a(he,"serializeObject");function M(e,t,i=Ee,r){let n=ot(e);if(n!==null){t.push(n);return}if(typeof e=="string"){let s=e.split(`
3
3
  `);t.push('String "');for(let o of s)t.push(`${i}${o}`);t.push('"');return}if(typeof e=="object"&&e!==null){if(r.has(e)){t.push("[Circular]");return}r.add(e),e instanceof Map?ct(e,t,i,r):Array.isArray(e)?lt(e,t,i,r):e instanceof Set?ht(e,t,i,r):e instanceof Buffer?ut(e,t,i):ArrayBuffer.isView(e)&&!(e instanceof DataView)?pt(e,t,i):he(e,t,i,r);return}he(e,t,i,r)}a(M,"serializeValue");function q(e){if(e&&typeof e=="object"){if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();let t={};for(let[i,r]of Object.entries(e))r!==void 0&&(t[i]=r);return t.name=e?.name??t.name,t.message=e?.message??t.message,t.stack=e?.stack??t.stack,t}return e}a(q,"serializeError");function $(e,t=Ee){let i=[];return M(e,i,t,new WeakSet),i}a($,"serialize");var ft=(e=>(e[e.DELETE=-1]="DELETE",e[e.EQUAL=0]="EQUAL",e[e.INSERT=1]="INSERT",e))(ft||{});function dt(){let e=0;for(;this.aStart+e<this.aEnd&&this.bStart+e<this.bEnd&&this.isMatch(this.aStart+e,this.bStart+e);)e++;return e}a(dt,"countCommonForward");function gt(){let e=0;for(;this.aEnd-1-e>=this.aStart&&this.bEnd-1-e>=this.bStart&&this.isMatch(this.aEnd-1-e,this.bEnd-1-e);)e++;return e}a(gt,"countCommonBackward");function mt(e,t,i){let r=this.aEnd-this.aStart,n=this.bEnd-this.bStart,s=[];for(let o=i;o>0;o--){let c=e[o-1],l=r-n,u,d=c[l-1+t],g=c[l+1+t];l===-o||l!==o&&d<g?u=l+1:u=l-1;let S=u+t,y=c[S],E=y-u;for(;r>y&&n>E;)--r,--n,s.push([1,this.aStart+r,this.bStart+n]);r===y?s.push([0,this.aStart+y,this.bStart+E]):s.push([0,this.aStart+y,this.bStart+E]),r=y,n=E}for(let o of s.reverse())this.foundSubsequence(...o)}a(mt,"backtrackFlat");function yt(){let e=this.aEnd-this.aStart,t=this.bEnd-this.bStart,i=e+t,r=0,n=new Array(2*i+1).fill(0),s=[];for(let o=0;o<=i;o++){let c=new Array(2*i+1);s[o]=c;for(let l=-o;l<=o;l+=2){let u=l+i,d;l===-o||l!==o&&n[l-1+i]<n[l+1+i]?d=n[l+1+i]:d=n[l-1+i]+1;let g=d-l;for(;d<e&&g<t&&this.isMatch(this.aStart+d,this.bStart+g);)d++,g++;if(n[u]=d,c[u]=d,d>=e&&g>=t)return r=o,mt.call(this,s,i,r)}}}a(yt,"findMiddleSnake");function vt(){let e=dt.call(this),t=this.aStart+e>=this.aEnd&&this.bStart+e>=this.bEnd;if(e>0&&(this.foundSubsequence(e,this.aStart,this.bStart),t))return;this.aStart+=e,this.bStart+=e;let i=gt.call(this);this.aEnd-=i,this.bEnd-=i,(this.aStart<this.aEnd||this.bStart<this.bEnd)&&yt.call(this),i>0&&this.foundSubsequence(i,this.aEnd,this.bEnd)}a(vt,"diffSequence");function $e(e,t,i,r){let n={aStart:0,bStart:0,aEnd:e,bEnd:t,isMatch:i,foundSubsequence:r};vt.call(n)}a($e,"createDiff");function Se(e,t){let i=0,r=0,n="",s="",o=[];function c(l,u){let d=o[o.length-1];d&&d[0]===l?d[1]+=u:o.push([l,u])}return a(c,"pushDiff"),$e(e.length,t.length,(l,u)=>e[l]===t[u],(l,u,d)=>{i!==u&&(s+=e.slice(i,u)),r!==d&&(n+=t.slice(r,d)),l>0&&(s&&(c(-1,s),s=""),n&&(c(1,n),n=""),c(0,t.slice(d,d+l))),i=u+l,r=d+l}),i!==e.length&&(s+=e.slice(i)),r!==t.length&&(n+=t.slice(r)),s&&o.push([-1,s]),n&&o.push([1,n]),o}a(Se,"diffStringsRaw");function xe(e,t){let i=0,r=0,n=[];for($e(e.length,t.length,(s,o)=>{let c=e[s].trimEnd().endsWith(","),l=t[o].trimEnd().endsWith(",");return c&&!l?t[o]+=",":!c&&l&&(e[s]+=","),e[s]===t[o]},(s,o,c)=>{for(;i!==o;i+=1)n.push([-1,e[i]]);for(;r!==c;r+=1)n.push([1,t[r]]);for(;s!==0;s-=1,i+=1,r+=1)n.push([0,t[r]])});i!==e.length;i+=1)n.push([-1,e[i]]);for(;r!==t.length;r+=1)n.push([1,t[r]]);return n}a(xe,"diffLinesRaw");function Ie(e){let t=[],i=[],r=[],n=a(()=>{t.length&&(r.push([-1,t.join("")]),t=[]),i.length&&(r.push([1,i.join("")]),i=[])},"flushBuffers");for(let s=0;s<e.length;s++){let[o,c]=e[s];if(o===0){if(c.length<=1){let l=s>0?e[s-1][0]:null,u=s+1<e.length?e[s+1][0]:null,d=a(g=>g===-1||g===1,"isEdit");if(d(l)&&d(u)){for(let g of c)t.push(g),i.push(g);continue}}n(),r.push([0,c])}else if(o===-1)for(let l of c)t.push(l);else if(o===1)for(let l of c)i.push(l);else n(),r.push([o,c])}return n(),r}a(Ie,"cleanupSemantic");var I=R.dim,bt=R.lightOrange,h=R.lightCoral,f=R.oliveGreen,we=R.cyan,k=R.inverse,Wi=R.whiteBright;function w(e){return e===null?"null":e===!0?"true":e===!1?"false":e&&typeof e=="object"?e.constructor?.name??"Object":typeof e}a(w,"getType");function Et(e,t,i=!0){let r="",n="",s=Se(e||" ",t||" ");i&&(s=Ie(s));for(let[o,c]of s)o===0?(r+=c,n+=c):o===-1?r+=k(c):o===1&&(n+=k(c));return[r,n]}a(Et,"normalizeStrings");function $t(e,t){let i=[...e],r=[...t],n=Math.max(e.length,t.length);for(let s=0;s<n;s++)[i[s],r[s]]=J(e[s],t[s]);return[i,r]}a($t,"normalizeArrays");function St(e,t){let i={...e},r={...t},n=new Set([...Object.keys(e),...Object.keys(t)]);for(let s of n)s in e&&s in t&&([i[s],r[s]]=J(e[s],t[s]));return[i,r]}a(St,"normalizeObjects");function J(e,t,i=!0){if(e===t)return[e,t];let r=typeof e,n=typeof t;return be(e,t)===!0?(x(e)&&(e=t),x(t)&&(t=e),[e,t]):r==="string"&&n==="string"?Et(e,t,i):!e||!t||r!=="object"||n!=="object"?[e,t]:Array.isArray(e)&&Array.isArray(t)?$t(e,t):St(e,t)}a(J,"normalizeAsymmetric");function xt(e,t,i,r=!0){let n=e.split(`
4
4
  `),s=t.split(`