"use strict";(self.webpackChunksage_agent_internal=self.webpackChunksage_agent_internal||[]).push([[220],{4474:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Allow=r.ALL=r.COLLECTION=r.ATOM=r.SPECIAL=r.INF=r._INFINITY=r.INFINITY=r.NAN=r.BOOL=r.NULL=r.OBJ=r.ARR=r.NUM=r.STR=void 0,r.STR=1,r.NUM=2,r.ARR=4,r.OBJ=8,r.NULL=16,r.BOOL=32,r.NAN=64,r.INFINITY=128,r._INFINITY=256,r.INF=r.INFINITY|r._INFINITY,r.SPECIAL=r.NULL|r.BOOL|r.INF|r.NAN,r.ATOM=r.STR|r.NUM|r.SPECIAL,r.COLLECTION=r.ARR|r.OBJ,r.ALL=r.ATOM|r.COLLECTION,r.Allow={STR:r.STR,NUM:r.NUM,ARR:r.ARR,OBJ:r.OBJ,NULL:r.NULL,BOOL:r.BOOL,NAN:r.NAN,INFINITY:r.INFINITY,_INFINITY:r._INFINITY,INF:r.INF,SPECIAL:r.SPECIAL,ATOM:r.ATOM,COLLECTION:r.COLLECTION,ALL:r.ALL},r.default=r.Allow},9220:function(t,r,e){var n=this&&this.__createBinding||(Object.create?function(t,r,e,n){void 0===n&&(n=e);var s=Object.getOwnPropertyDescriptor(r,e);s&&!("get"in s?!r.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return r[e]}}),Object.defineProperty(t,n,s)}:function(t,r,e,n){void 0===n&&(n=e),t[n]=r[e]}),s=this&&this.__exportStar||function(t,r){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(r,e)||n(r,t,e)};Object.defineProperty(r,"__esModule",{value:!0}),r.Allow=r.MalformedJSON=r.PartialJSON=r.parseJSON=r.parse=void 0;const i=e(4474);Object.defineProperty(r,"Allow",{enumerable:!0,get:function(){return i.Allow}}),s(e(4474),r);class o extends Error{}r.PartialJSON=o;class l extends Error{}function N(t,r=i.Allow.ALL){if("string"!=typeof t)throw new TypeError("expecting str, got "+typeof t);if(!t.trim())throw new Error(`${t} is empty`);return a(t.trim(),r)}r.MalformedJSON=l,r.parseJSON=N;const a=(t,r)=>{const e=t.length;let n=0;const s=t=>{throw new o(`${t} at position ${n}`)},N=t=>{throw new l(`${t} at position ${n}`)},a=()=>(f(),n>=e&&s("Unexpected end of input"),'"'===t[n]?u():"{"===t[n]?O():"["===t[n]?c():"null"===t.substring(n,n+4)||i.Allow.NULL&r&&e-n<4&&"null".startsWith(t.substring(n))?(n+=4,null):"true"===t.substring(n,n+4)||i.Allow.BOOL&r&&e-n<4&&"true".startsWith(t.substring(n))?(n+=4,!0):"false"===t.substring(n,n+5)||i.Allow.BOOL&r&&e-n<5&&"false".startsWith(t.substring(n))?(n+=5,!1):"Infinity"===t.substring(n,n+8)||i.Allow.INFINITY&r&&e-n<8&&"Infinity".startsWith(t.substring(n))?(n+=8,1/0):"-Infinity"===t.substring(n,n+9)||i.Allow._INFINITY&r&&1<e-n&&e-n<9&&"-Infinity".startsWith(t.substring(n))?(n+=9,-1/0):"NaN"===t.substring(n,n+3)||i.Allow.NAN&r&&e-n<3&&"NaN".startsWith(t.substring(n))?(n+=3,NaN):I()),u=()=>{const o=n;let l=!1;for(n++;n<e&&('"'!==t[n]||l&&"\\"===t[n-1]);)l="\\"===t[n]&&!l,n++;if('"'==t.charAt(n))try{return JSON.parse(t.substring(o,++n-Number(l)))}catch(t){N(String(t))}else if(i.Allow.STR&r)try{return JSON.parse(t.substring(o,n-Number(l))+'"')}catch(r){return JSON.parse(t.substring(o,t.lastIndexOf("\\"))+'"')}s("Unterminated string literal")},O=()=>{n++,f();const o={};try{for(;"}"!==t[n];){if(f(),n>=e&&i.Allow.OBJ&r)return o;const s=u();f(),n++;try{const t=a();o[s]=t}catch(t){if(i.Allow.OBJ&r)return o;throw t}f(),","===t[n]&&n++}}catch(t){if(i.Allow.OBJ&r)return o;s("Expected '}' at end of object")}return n++,o},c=()=>{n++;const e=[];try{for(;"]"!==t[n];)e.push(a()),f(),","===t[n]&&n++}catch(t){if(i.Allow.ARR&r)return e;s("Expected ']' at end of array")}return n++,e},I=()=>{if(0===n){"-"===t&&N("Not sure what '-' is");try{return JSON.parse(t)}catch(e){if(i.Allow.NUM&r)try{return JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch(t){}N(String(e))}}const o=n;for("-"===t[n]&&n++;t[n]&&-1===",]}".indexOf(t[n]);)n++;n!=e||i.Allow.NUM&r||s("Unterminated number literal");try{return JSON.parse(t.substring(o,n))}catch(r){"-"===t.substring(o,n)&&s("Not sure what '-' is");try{return JSON.parse(t.substring(o,t.lastIndexOf("e")))}catch(t){N(String(t))}}},f=()=>{for(;n<e&&" \n\r\t".includes(t[n]);)n++};return a()},u=N;r.parse=u}}]);