benavides@arochilindner.com"} [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:51) - Tokens generados: 1000.6d9854034fbc4fc888d0662b720543f3.2d0046418f3dde0897154205faa12c57 [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:51) - Intento 0 el registro no contiene foto asociada [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:51) - ERROR al obtener imagen, intento: 1 , respuesta: null [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:53) - Intento 1 el registro no contiene foto asociada [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:53) - ERROR al obtener imagen, intento: 2 , respuesta: null [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:56) - Intento 2 el registro no contiene foto asociada [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:56) - ERROR al obtener imagen, intento: 3 , respuesta: null [9a2fc8fe-8f8b-47f4-8d4a-30bf68b16577](2026-01-30 11:36:58) - No se pudo encontrar una imagen asociada a registro de CRM \n [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:38:58) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-134266","MarcaId":"4597192000321398936","user":"igrimaldo@arochilindner.com"} [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:05) - Tokens generados: 1000.d7453e8874a2fe0b121810ad63805a81.dd70a49c383f1d95dcc95bf9b31c7f0d [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:06) - Intento 0 el registro no contiene foto asociada [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:06) - ERROR al obtener imagen, intento: 1 , respuesta: null [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:08) - Intento 1 el registro no contiene foto asociada [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:08) - ERROR al obtener imagen, intento: 2 , respuesta: null [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:10) - Intento 2 el registro no contiene foto asociada [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:10) - ERROR al obtener imagen, intento: 3 , respuesta: null [3b2bc78b-e5da-47a4-a3c1-867c46bbd347](2026-01-30 13:39:12) - No se pudo encontrar una imagen asociada a registro de CRM \n [7cd8e04e-88d2-41fa-80ae-0b274dc90fa9](2026-01-30 13:39:28) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-134266","MarcaId":"4597192000321398936","user":"igrimaldo@arochilindner.com"} [7cd8e04e-88d2-41fa-80ae-0b274dc90fa9](2026-01-30 13:39:35) - Tokens generados: 1000.d7453e8874a2fe0b121810ad63805a81.dd70a49c383f1d95dcc95bf9b31c7f0d [7cd8e04e-88d2-41fa-80ae-0b274dc90fa9](2026-01-30 13:39:35) - Intento 0 para obtener imagen de marca de CRM, respuesta: 200 [7cd8e04e-88d2-41fa-80ae-0b274dc90fa9](2026-01-30 13:39:35) - Imagen guardada localmente de manera exitosa [7cd8e04e-88d2-41fa-80ae-0b274dc90fa9](2026-01-30 13:39:36) - Intento 0 para actualizar CRM con datos de url de marca: { "data": [ { "code": "SUCCESS", "details": { "Modified_Time": "2026-01-30T14:39:36-05:00", "Modified_By": { "name": "Aptus Legal Administrator", "id": "4597192000000287001" }, "Created_Time": "2026-01-30T14:38:57-05:00", "id": "4597192000321398936", "Created_By": { "name": "Irving Grimaldo Galan", "id": "4597192000093922734" } }, "message": "record updated", "status": "success" } ] } [7cd8e04e-88d2-41fa-80ae-0b274dc90fa9](2026-01-30 13:39:36) - Proceso finalizado exitosamente, URL: https://aptuslegal.app/imagenesAptusLegal/arochi/LogosArochi/MAR-134266.png [c1b8aec4-9aa4-4d19-bc7a-96a97d2e4fba](2026-01-30 13:42:07) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-134230","MarcaId":"4597192000320558499","user":"bmeza@arochilindner.com"} [c1b8aec4-9aa4-4d19-bc7a-96a97d2e4fba](2026-01-30 13:42:14) - Tokens generados: 1000.d7453e8874a2fe0b121810ad63805a81.dd70a49c383f1d95dcc95bf9b31c7f0d [c1b8aec4-9aa4-4d19uest '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=P.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||S){const s=e.id??String(Date.now()),l=b.is(J.receiver)?J.receiver.createCancellationTokenSource(s):J.receiver.createCancellationTokenSource(e);null!==e.id&&j.has(e.id)&&l.cancel(),null!==e.id&&H.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void n(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byName)return void n(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byPosition)return void n(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else S&&(d=S(e.method,e.params,l.token));const f=d;d?f.then?f.then((r=>{H.delete(s),t(r,e.method,u)}),(t=>{H.delete(s),t instanceof i.ResponseError?n(t,e.method,u):t&&o.string(t.message)?n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(H.delete(s),t(d,e.method,u)):(H.delete(s),function(t,n,o){void 0===t&&(t=null);const i={jsonrpc:_,id:e.id,result:t};se(i,n,o),r.write(i).catch((()=>k.error("Sending response failed.")))}(d,e.method,u))}catch(r){H.delete(s),r instanceof i.ResponseError?t(r,e.method,u):r&&o.string(r.message)?n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${r.message}`),e.method,u):n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else n(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):i.Message.isNotification(e)?function(e){if(ee())return;let t,r;if(e.method===u.type.method){const t=e.params.id;return j.delete(t),void ae(e)}{const n=F.get(e.method);n&&(r=n.handler,t=n.type)}if(r||L)try{if(ae(e),r)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&k.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),r();else if(Array.isArray(e.params)){const n=e.params;e.method===d.type.method&&2===n.length&&l.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===i.ParameterStructures.byName&&k.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&k.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),r(...n))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&k.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params);else L&&L(e.method,e.params)}catch(t){t.message?k.error(`Notification handler '${e.method}' failed with message: ${t.message}`):k.error(`Notification handler '${e.method}' failed unexpectedly.`)}else K.fire(e)}(e):i.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?k.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):k.error("Received response message without id. No further error information provided.");else{const t=e.id,r=I.get(t);if(function(e,t){if(B!==p.Off&&M)if(U===h.Text){let r;if(B!==p.Verbose&&B!==p.Compact||(e.error&&e.error.data?r=`Error data: ${ie(e.error.data)}\n\n`:e.result?r=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else M.log(`Received response ${e.id} without active response promise.`,r)}else ce("receive-response",e)}(e,r),void 0!==r){I.delete(t);try{if(e.error){const t=e.error;r.reject(new i.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?k.error(`Response handler '${r.method}' failed with message: ${e.message}`):k.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void k.error("Received empty message.");k.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,r=I.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError((function(e){V.fire([e,void 0,void 0])})),r.onClose(te),r.onError((function(e){V.fire(e)}));const oe=e=>{try{if(i.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,n=X(t),o=N.get(n);if(i.Message.isRequest(o)){const i=D?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(o,Z):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return N.delete(n),H.delete(t),s.id=o.id,se(s,e.method,Date.now()),void r.write(s).catch((()=>k.error("Sending response for canceled message failed.")))}const s=H.get(t);if(void 0!==s)return s.cancel(),void ae(e);j.add(t)}!function(e,t){var r;i.Message.isRequest(t)?e.set(X(t.id),t):i.Message.isResponse(t)?e.set(null===(r=t.id)?"res-unknown-"+(++A).toString():"res-"+r.toString(),t):e.set("not-"+(++T).toString(),t)}(N,e)}finally{re()}};function ie(e){if(null!=e)switch(B){case p.Verbose:return JSON.stringify(e,null,4);case p.Compact:return JSON.stringify(e);default:return}}function se(e,t,r){if(B!==p.Off&&M)if(U===h.Text){let n;B!==p.Verbose&&B!==p.Compact||(e.error&&e.error.data?n=`Error data: ${ie(e.error.data)}\n\n`:e.result?n=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else ce("send-response",e)}function ae(e){if(B!==p.Off&&M&&e.method!==m.type.method)if(U===h.Text){let t;B!==p.Verbose&&B!==p.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!M||B===p.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(r)}function ue(){if(Q())throw new x(v.Closed,"Connection is closed.");if(ee())throw new x(v.Disposed,"Connection is disposed.")}function le(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function fe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pe(e,t){switch(e){case i.ParameterStructures.auto:return fe(t)?de(t):[le(t)];case i.ParameterStructures.byName:if(!fe(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case i.ParameterStructures.byPosition:return[le(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function he(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=pe(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{let n,s;if(ue(),o.string(e)){n=e;const r=t[0];let o=0,a=i.ParameterStructures.auto;i.ParameterStructures.is(r)&&(o=1,a=r);let c=t.length;const u=c-o;switch(u){case 0:s=void 0;break;case 1:s=pe(a,t[o]);break;default:if(a===i.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map((e=>le(e)))}}else{const r=t;n=e.method,s=he(e,r)}const a={jsonrpc:_,method:n,params:s};return function(e){if(B!==p.Off&&M)if(U===h.Text){let t;B!==p.Verbose&&B!==p.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),r.write(a).catch((e=>{throw k.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let r;return ue(),o.func(e)?L=e:t&&(o.string(e)?(r=e,F.set(e,{type:void 0,handler:t})):(r=e.method,F.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==r?F.delete(r):L=void 0}}},onProgress:(e,t,r)=>{if(q.has(t))throw new Error(`Progress handler for token ${t} already registered`);return q.set(t,r),{dispose:()=>{q.delete(t)}}},sendProgress:(e,t,r)=>ge.sendNotification(d.type,{token:t,value:r}),onUnhandledProgress:z.event,sendRequest:(e,...t)=>{let n,s,a;if(ue(),function(){if(!Y())throw new Error("Call listen() first.")}(),o.string(e)){n=e;const r=t[0],o=t[t.length-1];let u=0,l=i.ParameterStructures.auto;i.ParameterStructures.is(r)&&(u=1,l=r);let d=t.length;c.CancellationToken.is(o)&&(d-=1,a=o);const f=d-u;switch(f){case 0:s=void 0;break;case 1:s=pe(l,t[u]);break;default:if(l===i.ParameterStructures.byName)throw new Error(`Received ${f} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>le(e)))}}else{const r=t;n=e.method,s=he(e,r);const o=e.numberOfParams;a=c.CancellationToken.is(r[o])?r[o]:void 0}const u=w++;let l;a&&(l=a.onCancellationRequested((()=>{const e=J.sender.sendCancellation(ge,u);return void 0===e?(k.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{k.log(`Sending cancellation messages for id ${u} failed`)}))})));const d={jsonrpc:_,id:u,method:n,params:s};return function(e){if(B!==p.Off&&M)if(U===h.Text){let t;B!==p.Verbose&&B!==p.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof J.sender.enableCancellation&&J.sender.enableCancellation(d),new Promise((async(e,t)=>{const o={method:n,timerStart:Date.now(),resolve:t=>{e(t),J.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),J.sender.cleanup(u),l?.dispose()}};try{await r.write(d),I.set(u,o)}catch(e){throw k.error("Sending request failed."),o.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{ue();let r=null;return f.is(e)?(r=void 0,S=e):o.string(e)?(r=null,void 0!==t&&(r=e,P.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,P.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==r&&(void 0!==r?P.delete(r):S=void 0)}}},hasPendingResponse:()=>I.size>0,trace:async(e,t,r)=>{let n=!1,i=h.Text;void 0!==r&&(o.boolean(r)?n=r:(n=r.sendNotification||!1,i=r.traceFormat||h.Text)),B=e,U=i,M=B===p.Off?void 0:t,!n||Q()||ee()||await ge.sendNotification(g.type,{value:p.toString(e)})},onError:V.event,onClose:$.event,onUnhandledNotification:K.event,onDispose:G.event,end:()=>{r.end()},dispose:()=>{if(ee())return;W=E.Disposed,G.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of I.values())e.reject(t);I=new Map,H=new Map,j=new Set,N=new s.LinkedMap,o.func(r.dispose)&&r.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(Y())throw new x(v.AlreadyListening,"Connection is already listening")}(),W=E.Listening,e.listen(oe)},inspect:()=>{(0,n.default)().console.log("inspect")}};return ge.onNotification(m.type,(e=>{if(B===p.Off||!M)return;const t=B===p.Verbose||B===p.Compact;M.log(e.message,t?e.verbose:void 0)})),ge.onNotification(d.type,(e=>{const t=q.get(e.token);t?t(e.value):z.fire(e)})),ge}},4019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},2676:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=r(9590);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class o{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,o=this._callbacks.length;n{this._callbacks||(this._callbacks=new o),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=i,i._noop=function(){}},8585:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))}},3352:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n=t.Touch||(t.Touch={}));class o{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let o=this._map.get(e);if(o)o.value=t,r!==n.None&&this.touch(o,r);else{switch(o={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,r)=>{e.push([r,t])})),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=o,t.LRUCache=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,r=0,n=0,o=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){c