itk-wasm
Version:
High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.
5 lines • 118 kB
JavaScript
var dr=Object.defineProperty;var ur=(A,e)=>{for(var t in e)dr(A,t,{get:e[t],enumerable:!0})};var pr="1.0.0-b.197",yr=pr;var mr={Int8:"int8",UInt8:"uint8",Int16:"int16",UInt16:"uint16",Int32:"int32",UInt32:"uint32",Int64:"int64",UInt64:"uint64",SizeValueType:"uint64",IdentifierType:"uint64",IndexValueType:"int64",OffsetValueType:"int64"},u=mr;var hr={Float32:"float32",Float64:"float64",SpacePrecisionType:"float64"},m=hr;function wr(A,e){let t=null;switch(A){case u.UInt8:{t=new Uint8Array(e);break}case u.Int8:{t=new Int8Array(e);break}case u.UInt16:{t=new Uint16Array(e);break}case u.Int16:{t=new Int16Array(e);break}case u.UInt32:{t=new Uint32Array(e);break}case u.Int32:{t=new Int32Array(e);break}case u.UInt64:{typeof globalThis.BigUint64Array=="function"?t=new BigUint64Array(e):t=new Uint8Array(e);break}case u.Int64:{typeof globalThis.BigInt64Array=="function"?t=new BigInt64Array(e):t=new Uint8Array(e);break}case m.Float32:{t=new Float32Array(e);break}case m.Float64:{t=new Float64Array(e);break}case"null":{t=null;break}case null:{t=null;break}default:throw new Error("Type is not supported as a TypedArray")}return t}var H=wr;var Dr={Unknown:"Unknown",Scalar:"Scalar",RGB:"RGB",RGBA:"RGBA",Offset:"Offset",Vector:"Vector",Point:"Point",CovariantVector:"CovariantVector",SymmetricSecondRankTensor:"SymmetricSecondRankTensor",DiffusionTensor3D:"DiffusionTensor3D",Complex:"Complex",FixedArray:"FixedArray",Array:"Array",Matrix:"Matrix",VariableLengthVector:"VariableLengthVector",VariableSizeMatrix:"VariableSizeMatrix"},L=Dr;var ZA=class{dimension;componentType;pixelType;components;constructor(e=2,t=u.UInt8,r=L.Scalar,o=1){this.dimension=e,this.componentType=t,this.pixelType=r,this.components=o}},_A=ZA;function Sr(A,e,t,r,o){A[r+t*e]=o}var XA=Sr;var vA=class{imageType;name="Image";origin;spacing;direction;size;metadata;data;constructor(e=new _A){this.imageType=e;let t=e.dimension;this.origin=new Array(t),this.origin.fill(0),this.spacing=new Array(t),this.spacing.fill(1),this.direction=new Float64Array(t*t),this.direction.fill(0);for(let r=0;r<t;r++)XA(this.direction,t,r,r,1);this.size=new Array(t),this.size.fill(0),this.metadata=new Map,this.data=null}},Z=vA;function Fr(A){let e=new Z(A.imageType);if(e.name=A.name,e.origin=Array.from(A.origin),e.spacing=Array.from(A.spacing),e.direction=A.direction.slice(),e.size=Array.from(A.size),A.data!==null){let t=A.data.constructor;e.data=new t(A.data.length),e.data!=null&&e.data.set(A.data,0)}return e}var $A=Fr;var Rr=typeof globalThis.SharedArrayBuffer=="function";function kr(A){if(A.data===null)return A;if(Rr){if(A.data.buffer instanceof SharedArrayBuffer)return A;let e=new SharedArrayBuffer(A.data.buffer.byteLength),t=A.data.constructor,r=new t(e);return r!==null&&r.set(A.data,0),A.data=r,A}else return $A(A)}var Ur=kr;function Nr(A){if(A.length<1)throw Error("At least one images is required.");let e=A[0];if(e.data===null)throw Error("Image data is null.");let t=new Z(e.imageType);t.origin=Array.from(e.origin),t.spacing=Array.from(e.spacing);let r=t.imageType.dimension;t.direction=e.direction.slice();let o=r-1;t.size=Array.from(e.size);let i=A.reduce((a,g)=>a+g.size[o],0);t.size[o]=i;let n=t.size.reduce((a,g)=>a*g,1)*t.imageType.components,I=e.data.constructor;t.data=new I(n);let E=t.imageType.components;for(let a=0;a<t.size.length-1;a++)E*=t.size[a];let C=0;if(t.data!=null)for(let a=0;a<A.length;a++)t.data.set(A[a].data,E*C),C+=A[a].size[o];else throw Error("Could not create result image data.");return t}var br=Nr;function Gr(A){let e=A.slice((A.lastIndexOf(".")-1>>>0)+2);if(e.toLowerCase()==="gz"){let t=A.slice(0,-3).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}else if(e.toLowerCase()==="cbor"){let t=A.slice(0,-5).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}else if(e.toLowerCase()==="zst"){let t=A.slice(0,-10).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}else if(e.toLowerCase()==="zip"){let t=A.slice(0,-4).lastIndexOf(".");e=A.slice((t-1>>>0)+2)}return e}var Lr=Gr;function xr(A,e,t,r){return A[r+t*e]}var Tr=xr;function Jr(A,e){let t={...A.imageType};if(typeof e<"u"&&typeof e.pixelType<"u"&&(t.pixelType=e.pixelType,e.pixelType===L.Scalar&&t.components!==1))throw new Error("Cannot cast multi-component image to a scalar image");typeof e<"u"&&typeof e.componentType<"u"&&e.componentType!==A.imageType.componentType&&(t.componentType=e.componentType);let r=new Z(t);if(r.name=A.name,r.origin=Array.from(A.origin),r.spacing=Array.from(A.spacing),r.direction=A.direction.slice(),r.size=Array.from(A.size),r.metadata=new Map(JSON.parse(JSON.stringify(Array.from(A.metadata)))),A.data!==null)if(typeof e<"u"&&typeof e.componentType<"u"&&e.componentType!==A.imageType.componentType)switch(A.imageType.componentType){case u.UInt8:case u.Int8:case u.UInt16:case u.Int16:case u.UInt32:case u.Int32:case m.Float32:case m.Float64:switch(r.imageType.componentType){case u.UInt8:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Uint8Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Uint8Array(A.data);break;case u.Int8:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Int8Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Int8Array(A.data);break;case u.UInt16:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Uint16Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Uint16Array(A.data);break;case u.Int16:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Int16Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Int16Array(A.data);break;case u.UInt32:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Uint32Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Uint32Array(A.data);break;case u.Int32:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Int32Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Int32Array(A.data);break;case m.Float32:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Float32Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Float32Array(A.data);break;case m.Float64:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array){r.data=new Float64Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o])}else r.data=new Float64Array(A.data);break;case u.UInt64:r.data=new BigUint64Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=BigInt.asIntN(64,BigInt(A.data[o]));break;case u.Int64:r.data=new BigInt64Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=BigInt.asUintN(64,BigInt(A.data[o]));break}break;case u.UInt64:case u.Int64:switch(r.imageType.componentType){case u.UInt8:r.data=new Uint8Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case u.Int8:r.data=new Int8Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case u.UInt16:r.data=new Uint16Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case u.Int16:r.data=new Int16Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case u.UInt32:r.data=new Uint32Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case u.Int32:r.data=new Int32Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case m.Float32:r.data=new Float32Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case m.Float64:r.data=new Float64Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=Number(A.data[o]);break;case u.UInt64:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array)r.data=new BigUint64Array(A.data);else{r.data=new BigUint64Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=BigInt.asUintN(64,BigInt(A.data[o]))}break;case u.Int64:if(A.data instanceof BigInt64Array||A.data instanceof BigUint64Array)r.data=new BigInt64Array(A.data);else{r.data=new BigInt64Array(A.data.length);for(let o=0;o<r.data.length;o++)r.data[o]=BigInt.asIntN(64,BigInt(A.data[o]))}break}break}else{let o=A.data.constructor;r.data=new o(A.data.length),r.data!=null&&r.data.set(A.data,0)}return r}var Hr=Jr;var Ae=class{fcn;workerQueue;runInfo;constructor(e,t){this.fcn=t,this.workerQueue=new Array(e),this.workerQueue.fill(null),this.runInfo=[]}runTasks(e,t=null){let r={taskQueue:[],results:[],addingTasks:!1,postponed:!1,runningWorkers:0,index:0,completedTasks:0,progressCallback:t,canceled:!1};return this.runInfo.push(r),r.index=this.runInfo.length-1,{promise:new Promise((o,i)=>{r.resolve=o,r.reject=i,r.results=new Array(e.length),r.completedTasks=0,r.addingTasks=!0,e.forEach((n,I)=>{this.addTask(r.index,I,n)}),r.addingTasks=!1}),runId:r.index}}terminateWorkers(){for(let e=0;e<this.workerQueue.length;e++){let t=this.workerQueue[e];t?.terminate(),this.workerQueue[e]=null}}cancel(e){let t=this.runInfo[e];t!=null&&(t.canceled=!0)}addTask(e,t,r){let o=this.runInfo[e];if(o?.canceled===!0){o.reject("Remaining tasks canceled"),this.clearTask(o.index);return}if(this.workerQueue.length>0){let i=this.workerQueue.pop();o.runningWorkers++,r[r.length-1].webWorker=i,this.fcn(...r).then(({webWorker:n,...I})=>{if(this.workerQueue.push(n),this.runInfo[e]!==null){if(o.runningWorkers--,o.results[t]=I,o.completedTasks++,o.progressCallback!=null&&o.progressCallback(o.completedTasks,o.results.length),o.taskQueue.length>0){let E=o.taskQueue.shift();this.addTask(e,E[0],E[1])}else if(!o.addingTasks&&o.runningWorkers===0){let E=o.results;o.resolve(E),this.clearTask(o.index)}}}).catch(n=>{o.reject(n),this.clearTask(o.index)})}else o.runningWorkers!==0||o.postponed?o.taskQueue.push([t,r]):(o.postponed=!0,setTimeout(()=>{o.postponed=!1,this.addTask(o.index,t,r)},50))}clearTask(e){this.runInfo[e].results=[],this.runInfo[e].taskQueue=[],this.runInfo[e].progressCallback=null,this.runInfo[e].canceled=null,this.runInfo[e].reject=()=>{},this.runInfo[e].resolve=()=>{}}},Mr=Ae;var ee=class{dimension;pointComponentType;pointPixelComponentType;pointPixelType;pointPixelComponents;constructor(e=3,t=m.Float32,r=m.Float32,o=L.Scalar,i=1){this.dimension=e,this.pointComponentType=t,this.pointPixelComponentType=r,this.pointPixelType=o,this.pointPixelComponents=i}},te=ee;var re=class{pointSetType;name="PointSet";numberOfPoints;points;numberOfPointPixels;pointData;constructor(e=new te){this.pointSetType=e,this.name="PointSet",this.numberOfPoints=0,this.points=null,this.numberOfPointPixels=0,this.pointData=null}},Or=re;var oe=class{dimension;pointComponentType;pointPixelComponentType;pointPixelType;pointPixelComponents;cellComponentType;cellPixelComponentType;cellPixelType;cellPixelComponents;constructor(e=2,t=m.Float32,r=m.Float32,o=L.Scalar,i=1,n=u.Int32,I=m.Float32,E=L.Scalar,C=1){this.dimension=e,this.pointComponentType=t,this.pointPixelComponentType=r,this.pointPixelType=o,this.pointPixelComponents=i,this.cellComponentType=n,this.cellPixelComponentType=I,this.cellPixelType=E,this.cellPixelComponents=C}},ie=oe;var ne=class{meshType;name="Mesh";numberOfPoints;points;numberOfPointPixels;pointData;numberOfCells;cells;cellBufferSize;numberOfCellPixels;cellData;constructor(e=new ie){this.meshType=e,this.name="Mesh",this.numberOfPoints=0,this.points=null,this.numberOfPointPixels=0,this.pointData=null,this.numberOfCells=0,this.cellBufferSize=0,this.cells=null,this.numberOfCellPixels=0,this.cellData=null}},Pr=ne;var ae=class{pointPixelComponentType;pointPixelType;pointPixelComponents;cellPixelComponentType;cellPixelType;cellPixelComponents;constructor(e=m.Float32,t=L.Scalar,r=1,o=m.Float32,i=L.Scalar,n=1){this.pointPixelComponentType=e,this.pointPixelType=t,this.pointPixelComponents=r,this.cellPixelComponentType=o,this.cellPixelType=i,this.cellPixelComponents=n}},se=ae;var Ie=class{polyDataType;name="PolyData";numberOfPoints;points;verticesBufferSize;vertices;linesBufferSize;lines;polygonsBufferSize;polygons;triangleStripsBufferSize;triangleStrips;numberOfPointPixels;pointData;numberOfCellPixels;cellData;metadata;constructor(e=new se){this.polyDataType=e,this.polyDataType=e,this.name="PolyData",this.numberOfPoints=0,this.points=new Float32Array,this.verticesBufferSize=0,this.vertices=null,this.linesBufferSize=0,this.lines=null,this.polygonsBufferSize=0,this.polygons=null,this.triangleStripsBufferSize=0,this.triangleStrips=null,this.numberOfPointPixels=0,this.pointData=null,this.numberOfCellPixels=0,this.cellData=null,this.metadata=new Map}},Yr=Ie;var qr={Composite:"Composite",Identity:"Identity",Translation:"Translation",Euler2D:"Euler2D",Euler3D:"Euler3D",Rigid2D:"Rigid2D",Rigid3D:"Rigid3D",Rigid3DPerspective:"Rigid3DPerspective",Versor:"Versor",VersorRigid3D:"VersorRigid3D",Scale:"Scale",ScaleLogarithmic:"ScaleLogarithmic",ScaleSkewVersor3D:"ScaleSkewVersor3D",Similarity2D:"Similarity2D",Similarity3D:"Similarity3D",QuaternionRigid:"QuaternionRigid",Affine:"Affine",ScalableAffine:"ScalableAffine",AzimuthElevationToCartesian:"AzimuthElevationToCartesian",BSpline:"BSpline",BSplineSmoothingOnUpdateDisplacementField:"BSplineSmoothingOnUpdateDisplacementField",ConstantVelocityField:"ConstantVelocityField",DisplacementField:"DisplacementField",GaussianSmoothingOnUpdateDisplacementField:"GaussianSmoothingOnUpdateDisplacementField",GaussianExponentialDiffeomorphic:"GaussianExponentialDiffeomorphic",VelocityField:"VelocityField",TimeVaringVelocityField:"TimeVaringVelocityField",GaussianSmoothingOnUpdateTimeVaringVelocityField:"GaussianSmoothingOnUpdateTimeVaringVelocityField"},ge=qr;var Ce=class{transformParameterization;parametersValueType;inputDimension;outputDimension;constructor(e=ge.Identity,t=m.Float64,r=3,o=3){this.transformParameterization=e,this.parametersValueType=t,this.inputDimension=r,this.outputDimension=o}},Be=Ce;var Qe=class{transformType;numberOfFixedParameters;numberOfParameters;name="Transform";inputSpaceName;outputSpaceName;parameters;fixedParameters;constructor(e=new Be){this.transformType=e,this.numberOfFixedParameters=0,this.numberOfParameters=0,this.inputSpaceName="",this.outputSpaceName="",this.parameters=new Uint8Array(0),this.fixedParameters=new Uint8Array(0)}},Kr=Qe;var Wr={TextFile:"TextFile",BinaryFile:"BinaryFile",TextStream:"TextStream",BinaryStream:"BinaryStream",Image:"Image",PointSet:"PointSet",Mesh:"Mesh",PolyData:"PolyData",TransformList:"TransformList",JsonCompatible:"JsonCompatible"},y=Wr;function jr(){let A=typeof globalThis.SharedArrayBuffer=="function",e=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!=="renderer",t=typeof crossOriginIsolated<"u"?crossOriginIsolated:globalThis.crossOriginIsolated||!1;return e?A:A&&t}var Vr=jr;var tt=Symbol("Comlink.proxy"),zr=Symbol("Comlink.endpoint"),le=Symbol("Comlink.releaseProxy"),Ee=Symbol("Comlink.finalizer"),FA=Symbol("Comlink.thrown"),rt=A=>typeof A=="object"&&A!==null||typeof A=="function",Zr={canHandle:A=>rt(A)&&A[tt],serialize(A){let{port1:e,port2:t}=new MessageChannel;return it(A,e),[t,[t]]},deserialize(A){return A.start(),fe(A)}},_r={canHandle:A=>rt(A)&&FA in A,serialize({value:A}){let e;return A instanceof Error?e={isError:!0,value:{message:A.message,name:A.name,stack:A.stack}}:e={isError:!1,value:A},[e,[]]},deserialize(A){throw A.isError?Object.assign(new Error(A.value.message),A.value):A.value}},ot=new Map([["proxy",Zr],["throw",_r]]);function Xr(A,e){for(let t of A)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function it(A,e=globalThis,t=["*"]){e.addEventListener("message",function r(o){if(!o||!o.data)return;if(!Xr(t,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}let{id:i,type:n,path:I}=Object.assign({path:[]},o.data),E=(o.data.argumentList||[]).map(_),C;try{let a=I.slice(0,-1).reduce((f,B)=>f[B],A),g=I.reduce((f,B)=>f[B],A);switch(n){case"GET":C=g;break;case"SET":a[I.slice(-1)[0]]=_(o.data.value),C=!0;break;case"APPLY":C=g.apply(a,E);break;case"CONSTRUCT":{let f=new g(...E);C=to(f)}break;case"ENDPOINT":{let{port1:f,port2:B}=new MessageChannel;it(A,B),C=de(f,[f])}break;case"RELEASE":C=void 0;break;default:return}}catch(a){C={value:a,[FA]:0}}Promise.resolve(C).catch(a=>({value:a,[FA]:0})).then(a=>{let[g,f]=UA(a);e.postMessage(Object.assign(Object.assign({},g),{id:i}),f),n==="RELEASE"&&(e.removeEventListener("message",r),nt(e),Ee in A&&typeof A[Ee]=="function"&&A[Ee]())}).catch(a=>{let[g,f]=UA({value:new TypeError("Unserializable return value"),[FA]:0});e.postMessage(Object.assign(Object.assign({},g),{id:i}),f)})}),e.start&&e.start()}function vr(A){return A.constructor.name==="MessagePort"}function nt(A){vr(A)&&A.close()}function fe(A,e){return ce(A,[],e)}function SA(A){if(A)throw new Error("Proxy has been released and is not useable")}function at(A){return $(A,{type:"RELEASE"}).then(()=>{nt(A)})}var RA=new WeakMap,kA="FinalizationRegistry"in globalThis&&new FinalizationRegistry(A=>{let e=(RA.get(A)||0)-1;RA.set(A,e),e===0&&at(A)});function $r(A,e){let t=(RA.get(e)||0)+1;RA.set(e,t),kA&&kA.register(A,e,A)}function Ao(A){kA&&kA.unregister(A)}function ce(A,e=[],t=function(){}){let r=!1,o=new Proxy(t,{get(i,n){if(SA(r),n===le)return()=>{Ao(o),at(A),r=!0};if(n==="then"){if(e.length===0)return{then:()=>o};let I=$(A,{type:"GET",path:e.map(E=>E.toString())}).then(_);return I.then.bind(I)}return ce(A,[...e,n])},set(i,n,I){SA(r);let[E,C]=UA(I);return $(A,{type:"SET",path:[...e,n].map(a=>a.toString()),value:E},C).then(_)},apply(i,n,I){SA(r);let E=e[e.length-1];if(E===zr)return $(A,{type:"ENDPOINT"}).then(_);if(E==="bind")return ce(A,e.slice(0,-1));let[C,a]=et(I);return $(A,{type:"APPLY",path:e.map(g=>g.toString()),argumentList:C},a).then(_)},construct(i,n){SA(r);let[I,E]=et(n);return $(A,{type:"CONSTRUCT",path:e.map(C=>C.toString()),argumentList:I},E).then(_)}});return $r(o,A),o}function eo(A){return Array.prototype.concat.apply([],A)}function et(A){let e=A.map(UA);return[e.map(t=>t[0]),eo(e.map(t=>t[1]))]}var st=new WeakMap;function de(A,e){return st.set(A,e),A}function to(A){return Object.assign(A,{[tt]:!0})}function UA(A){for(let[e,t]of ot)if(t.canHandle(A)){let[r,o]=t.serialize(A);return[{type:"HANDLER",name:e,value:r},o]}return[{type:"RAW",value:A},st.get(A)||[]]}function _(A){switch(A.type){case"HANDLER":return ot.get(A.name).deserialize(A.value);case"RAW":return A.value}}function $(A,e,t){return new Promise(r=>{let o=ro();A.addEventListener("message",function i(n){!n.data||!n.data.id||n.data.id!==o||(A.removeEventListener("message",i),r(n.data))}),A.start&&A.start(),A.postMessage(Object.assign({id:o},e),t)})}function ro(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function IA(A,e){return function(){return A.apply(e,arguments)}}var{toString:oo}=Object.prototype,{getPrototypeOf:pe}=Object,{iterator:bA,toStringTag:Qt}=Symbol,GA=(A=>e=>{let t=oo.call(e);return A[t]||(A[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),M=A=>(A=A.toLowerCase(),e=>GA(e)===A),LA=A=>e=>typeof e===A,{isArray:eA}=Array,AA=LA("undefined");function gA(A){return A!==null&&!AA(A)&&A.constructor!==null&&!AA(A.constructor)&&G(A.constructor.isBuffer)&&A.constructor.isBuffer(A)}var Et=M("ArrayBuffer");function io(A){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(A):e=A&&A.buffer&&Et(A.buffer),e}var no=LA("string"),G=LA("function"),ct=LA("number"),CA=A=>A!==null&&typeof A=="object",ao=A=>A===!0||A===!1,NA=A=>{if(GA(A)!=="object")return!1;let e=pe(A);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Qt in A)&&!(bA in A)},so=A=>{if(!CA(A)||gA(A))return!1;try{return Object.keys(A).length===0&&Object.getPrototypeOf(A)===Object.prototype}catch{return!1}},Io=M("Date"),go=M("File"),Co=A=>!!(A&&typeof A.uri<"u"),Bo=A=>A&&typeof A.getParts<"u",Qo=M("Blob"),Eo=M("FileList"),co=A=>CA(A)&&G(A.pipe);function lo(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var gt=lo(),Ct=typeof gt.FormData<"u"?gt.FormData:void 0,fo=A=>{let e;return A&&(Ct&&A instanceof Ct||G(A.append)&&((e=GA(A))==="formdata"||e==="object"&&G(A.toString)&&A.toString()==="[object FormData]"))},uo=M("URLSearchParams"),[po,yo,mo,ho]=["ReadableStream","Request","Response","Headers"].map(M),wo=A=>A.trim?A.trim():A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function BA(A,e,{allOwnKeys:t=!1}={}){if(A===null||typeof A>"u")return;let r,o;if(typeof A!="object"&&(A=[A]),eA(A))for(r=0,o=A.length;r<o;r++)e.call(null,A[r],r,A);else{if(gA(A))return;let i=t?Object.getOwnPropertyNames(A):Object.keys(A),n=i.length,I;for(r=0;r<n;r++)I=i[r],e.call(null,A[I],I,A)}}function lt(A,e){if(gA(A))return null;e=e.toLowerCase();let t=Object.keys(A),r=t.length,o;for(;r-- >0;)if(o=t[r],e===o.toLowerCase())return o;return null}var X=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ft=A=>!AA(A)&&A!==X;function ue(){let{caseless:A,skipUndefined:e}=ft(this)&&this||{},t={},r=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let n=A&<(t,i)||i;NA(t[n])&&NA(o)?t[n]=ue(t[n],o):NA(o)?t[n]=ue({},o):eA(o)?t[n]=o.slice():(!e||!AA(o))&&(t[n]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&BA(arguments[o],r);return t}var Do=(A,e,t,{allOwnKeys:r}={})=>(BA(e,(o,i)=>{t&&G(o)?Object.defineProperty(A,i,{value:IA(o,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(A,i,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),A),So=A=>(A.charCodeAt(0)===65279&&(A=A.slice(1)),A),Fo=(A,e,t,r)=>{A.prototype=Object.create(e.prototype,r),Object.defineProperty(A.prototype,"constructor",{value:A,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(A,"super",{value:e.prototype}),t&&Object.assign(A.prototype,t)},Ro=(A,e,t,r)=>{let o,i,n,I={};if(e=e||{},A==null)return e;do{for(o=Object.getOwnPropertyNames(A),i=o.length;i-- >0;)n=o[i],(!r||r(n,A,e))&&!I[n]&&(e[n]=A[n],I[n]=!0);A=t!==!1&&pe(A)}while(A&&(!t||t(A,e))&&A!==Object.prototype);return e},ko=(A,e,t)=>{A=String(A),(t===void 0||t>A.length)&&(t=A.length),t-=e.length;let r=A.indexOf(e,t);return r!==-1&&r===t},Uo=A=>{if(!A)return null;if(eA(A))return A;let e=A.length;if(!ct(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=A[e];return t},No=(A=>e=>A&&e instanceof A)(typeof Uint8Array<"u"&&pe(Uint8Array)),bo=(A,e)=>{let r=(A&&A[bA]).call(A),o;for(;(o=r.next())&&!o.done;){let i=o.value;e.call(A,i[0],i[1])}},Go=(A,e)=>{let t,r=[];for(;(t=A.exec(e))!==null;)r.push(t);return r},Lo=M("HTMLFormElement"),xo=A=>A.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,o){return r.toUpperCase()+o}),Bt=(({hasOwnProperty:A})=>(e,t)=>A.call(e,t))(Object.prototype),To=M("RegExp"),dt=(A,e)=>{let t=Object.getOwnPropertyDescriptors(A),r={};BA(t,(o,i)=>{let n;(n=e(o,i,A))!==!1&&(r[i]=n||o)}),Object.defineProperties(A,r)},Jo=A=>{dt(A,(e,t)=>{if(G(A)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let r=A[t];if(G(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Ho=(A,e)=>{let t={},r=o=>{o.forEach(i=>{t[i]=!0})};return eA(A)?r(A):r(String(A).split(e)),t},Mo=()=>{},Oo=(A,e)=>A!=null&&Number.isFinite(A=+A)?A:e;function Po(A){return!!(A&&G(A.append)&&A[Qt]==="FormData"&&A[bA])}var Yo=A=>{let e=new Array(10),t=(r,o)=>{if(CA(r)){if(e.indexOf(r)>=0)return;if(gA(r))return r;if(!("toJSON"in r)){e[o]=r;let i=eA(r)?[]:{};return BA(r,(n,I)=>{let E=t(n,o+1);!AA(E)&&(i[I]=E)}),e[o]=void 0,i}}return r};return t(A,0)},qo=M("AsyncFunction"),Ko=A=>A&&(CA(A)||G(A))&&G(A.then)&&G(A.catch),ut=((A,e)=>A?setImmediate:e?((t,r)=>(X.addEventListener("message",({source:o,data:i})=>{o===X&&i===t&&r.length&&r.shift()()},!1),o=>{r.push(o),X.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",G(X.postMessage)),Wo=typeof queueMicrotask<"u"?queueMicrotask.bind(X):typeof process<"u"&&process.nextTick||ut,jo=A=>A!=null&&G(A[bA]),s={isArray:eA,isArrayBuffer:Et,isBuffer:gA,isFormData:fo,isArrayBufferView:io,isString:no,isNumber:ct,isBoolean:ao,isObject:CA,isPlainObject:NA,isEmptyObject:so,isReadableStream:po,isRequest:yo,isResponse:mo,isHeaders:ho,isUndefined:AA,isDate:Io,isFile:go,isReactNativeBlob:Co,isReactNative:Bo,isBlob:Qo,isRegExp:To,isFunction:G,isStream:co,isURLSearchParams:uo,isTypedArray:No,isFileList:Eo,forEach:BA,merge:ue,extend:Do,trim:wo,stripBOM:So,inherits:Fo,toFlatObject:Ro,kindOf:GA,kindOfTest:M,endsWith:ko,toArray:Uo,forEachEntry:bo,matchAll:Go,isHTMLForm:Lo,hasOwnProperty:Bt,hasOwnProp:Bt,reduceDescriptors:dt,freezeMethods:Jo,toObjectSet:Ho,toCamelCase:xo,noop:Mo,toFiniteNumber:Oo,findKey:lt,global:X,isContextDefined:ft,isSpecCompliantForm:Po,toJSONObject:Yo,isAsyncFn:qo,isThenable:Ko,setImmediate:ut,asap:Wo,isIterable:jo};var U=class A extends Error{static from(e,t,r,o,i,n){let I=new A(e.message,t||e.code,r,o,i);return I.cause=e,I.name=e.name,e.status!=null&&I.status==null&&(I.status=e.status),n&&Object.assign(I,n),I}constructor(e,t,r,o,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s.toJSONObject(this.config),code:this.code,status:this.status}}};U.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";U.ERR_BAD_OPTION="ERR_BAD_OPTION";U.ECONNABORTED="ECONNABORTED";U.ETIMEDOUT="ETIMEDOUT";U.ERR_NETWORK="ERR_NETWORK";U.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";U.ERR_DEPRECATED="ERR_DEPRECATED";U.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";U.ERR_BAD_REQUEST="ERR_BAD_REQUEST";U.ERR_CANCELED="ERR_CANCELED";U.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";U.ERR_INVALID_URL="ERR_INVALID_URL";var d=U;var xA=null;function me(A){return s.isPlainObject(A)||s.isArray(A)}function pt(A){return s.endsWith(A,"[]")?A.slice(0,-2):A}function ye(A,e,t){return A?A.concat(e).map(function(o,i){return o=pt(o),!t&&i?"["+o+"]":o}).join(t?".":""):e}function Vo(A){return s.isArray(A)&&!A.some(me)}var zo=s.toFlatObject(s,{},null,function(e){return/^is[A-Z]/.test(e)});function Zo(A,e,t){if(!s.isObject(A))throw new TypeError("target must be an object");e=e||new(xA||FormData),t=s.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,c){return!s.isUndefined(c[l])});let r=t.metaTokens,o=t.visitor||a,i=t.dots,n=t.indexes,E=(t.Blob||typeof Blob<"u"&&Blob)&&s.isSpecCompliantForm(e);if(!s.isFunction(o))throw new TypeError("visitor must be a function");function C(Q){if(Q===null)return"";if(s.isDate(Q))return Q.toISOString();if(s.isBoolean(Q))return Q.toString();if(!E&&s.isBlob(Q))throw new d("Blob is not supported. Use a Buffer instead.");return s.isArrayBuffer(Q)||s.isTypedArray(Q)?E&&typeof Blob=="function"?new Blob([Q]):Buffer.from(Q):Q}function a(Q,l,c){let p=Q;if(s.isReactNative(e)&&s.isReactNativeBlob(Q))return e.append(ye(c,l,i),C(Q)),!1;if(Q&&!c&&typeof Q=="object"){if(s.endsWith(l,"{}"))l=r?l:l.slice(0,-2),Q=JSON.stringify(Q);else if(s.isArray(Q)&&Vo(Q)||(s.isFileList(Q)||s.endsWith(l,"[]"))&&(p=s.toArray(Q)))return l=pt(l),p.forEach(function(w,N){!(s.isUndefined(w)||w===null)&&e.append(n===!0?ye([l],N,i):n===null?l:l+"[]",C(w))}),!1}return me(Q)?!0:(e.append(ye(c,l,i),C(Q)),!1)}let g=[],f=Object.assign(zo,{defaultVisitor:a,convertValue:C,isVisitable:me});function B(Q,l){if(!s.isUndefined(Q)){if(g.indexOf(Q)!==-1)throw Error("Circular reference detected in "+l.join("."));g.push(Q),s.forEach(Q,function(p,k){(!(s.isUndefined(p)||p===null)&&o.call(e,p,s.isString(k)?k.trim():k,l,f))===!0&&B(p,l?l.concat(k):[k])}),g.pop()}}if(!s.isObject(A))throw new TypeError("data must be an object");return B(A),e}var W=Zo;function yt(A){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(A).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function mt(A,e){this._pairs=[],A&&W(A,this,e)}var ht=mt.prototype;ht.append=function(e,t){this._pairs.push([e,t])};ht.toString=function(e){let t=e?function(r){return e.call(this,r,yt)}:yt;return this._pairs.map(function(o){return t(o[0])+"="+t(o[1])},"").join("&")};var TA=mt;function _o(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function QA(A,e,t){if(!e)return A;let r=t&&t.encode||_o,o=s.isFunction(t)?{serialize:t}:t,i=o&&o.serialize,n;if(i?n=i(e,o):n=s.isURLSearchParams(e)?e.toString():new TA(e,o).toString(r),n){let I=A.indexOf("#");I!==-1&&(A=A.slice(0,I)),A+=(A.indexOf("?")===-1?"?":"&")+n}return A}var he=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){s.forEach(this.handlers,function(r){r!==null&&e(r)})}},we=he;var tA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var wt=typeof URLSearchParams<"u"?URLSearchParams:TA;var Dt=typeof FormData<"u"?FormData:null;var St=typeof Blob<"u"?Blob:null;var Ft={isBrowser:!0,classes:{URLSearchParams:wt,FormData:Dt,Blob:St},protocols:["http","https","file","blob","url","data"]};var Fe={};ur(Fe,{hasBrowserEnv:()=>Se,hasStandardBrowserEnv:()=>Xo,hasStandardBrowserWebWorkerEnv:()=>vo,navigator:()=>De,origin:()=>$o});var Se=typeof window<"u"&&typeof document<"u",De=typeof navigator=="object"&&navigator||void 0,Xo=Se&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),vo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$o=Se&&window.location.href||"http://localhost";var h={...Fe,...Ft};function Re(A,e){return W(A,new h.classes.URLSearchParams,{visitor:function(t,r,o,i){return h.isNode&&s.isBuffer(t)?(this.append(r,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function Ai(A){return s.matchAll(/\w+|\[(\w*)]/g,A).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ei(A){let e={},t=Object.keys(A),r,o=t.length,i;for(r=0;r<o;r++)i=t[r],e[i]=A[i];return e}function ti(A){function e(t,r,o,i){let n=t[i++];if(n==="__proto__")return!0;let I=Number.isFinite(+n),E=i>=t.length;return n=!n&&s.isArray(o)?o.length:n,E?(s.hasOwnProp(o,n)?o[n]=[o[n],r]:o[n]=r,!I):((!o[n]||!s.isObject(o[n]))&&(o[n]=[]),e(t,r,o[n],i)&&s.isArray(o[n])&&(o[n]=ei(o[n])),!I)}if(s.isFormData(A)&&s.isFunction(A.entries)){let t={};return s.forEachEntry(A,(r,o)=>{e(Ai(r),o,t,0)}),t}return null}var JA=ti;function ri(A,e,t){if(s.isString(A))try{return(e||JSON.parse)(A),s.trim(A)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(A)}var ke={transitional:tA,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=s.isObject(e);if(i&&s.isHTMLForm(e)&&(e=new FormData(e)),s.isFormData(e))return o?JSON.stringify(JA(e)):e;if(s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)||s.isReadableStream(e))return e;if(s.isArrayBufferView(e))return e.buffer;if(s.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let I;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Re(e,this.formSerializer).toString();if((I=s.isFileList(e))||r.indexOf("multipart/form-data")>-1){let E=this.env&&this.env.FormData;return W(I?{"files[]":e}:e,E&&new E,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),ri(e)):e}],transformResponse:[function(e){let t=this.transitional||ke.transitional,r=t&&t.forcedJSONParsing,o=this.responseType==="json";if(s.isResponse(e)||s.isReadableStream(e))return e;if(e&&s.isString(e)&&(r&&!this.responseType||o)){let n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(I){if(n)throw I.name==="SyntaxError"?d.from(I,d.ERR_BAD_RESPONSE,this,null,this.response):I}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:h.classes.FormData,Blob:h.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};s.forEach(["delete","get","head","post","put","patch"],A=>{ke.headers[A]={}});var rA=ke;var oi=s.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rt=A=>{let e={},t,r,o;return A&&A.split(`
`).forEach(function(n){o=n.indexOf(":"),t=n.substring(0,o).trim().toLowerCase(),r=n.substring(o+1).trim(),!(!t||e[t]&&oi[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e};var kt=Symbol("internals"),ii=A=>!/[\r\n]/.test(A);function Ut(A,e){if(!(A===!1||A==null)){if(s.isArray(A)){A.forEach(t=>Ut(t,e));return}if(!ii(String(A)))throw new Error(`Invalid character in header content ["${e}"]`)}}function EA(A){return A&&String(A).trim().toLowerCase()}function ni(A){let e=A.length;for(;e>0;){let t=A.charCodeAt(e-1);if(t!==10&&t!==13)break;e-=1}return e===A.length?A:A.slice(0,e)}function HA(A){return A===!1||A==null?A:s.isArray(A)?A.map(HA):ni(String(A))}function ai(A){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=t.exec(A);)e[r[1]]=r[2];return e}var si=A=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(A.trim());function Ue(A,e,t,r,o){if(s.isFunction(r))return r.call(this,e,t);if(o&&(e=t),!!s.isString(e)){if(s.isString(r))return e.indexOf(r)!==-1;if(s.isRegExp(r))return r.test(e)}}function Ii(A){return A.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function gi(A,e){let t=s.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(A,r+t,{value:function(o,i,n){return this[r].call(this,e,o,i,n)},configurable:!0})})}var oA=class{constructor(e){e&&this.set(e)}set(e,t,r){let o=this;function i(I,E,C){let a=EA(E);if(!a)throw new Error("header name must be a non-empty string");let g=s.findKey(o,a);(!g||o[g]===void 0||C===!0||C===void 0&&o[g]!==!1)&&(Ut(I,E),o[g||E]=HA(I))}let n=(I,E)=>s.forEach(I,(C,a)=>i(C,a,E));if(s.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(s.isString(e)&&(e=e.trim())&&!si(e))n(Rt(e),t);else if(s.isObject(e)&&s.isIterable(e)){let I={},E,C;for(let a of e){if(!s.isArray(a))throw TypeError("Object iterator must return a key-value pair");I[C=a[0]]=(E=I[C])?s.isArray(E)?[...E,a[1]]:[E,a[1]]:a[1]}n(I,t)}else e!=null&&i(t,e,r);return this}get(e,t){if(e=EA(e),e){let r=s.findKey(this,e);if(r){let o=this[r];if(!t)return o;if(t===!0)return ai(o);if(s.isFunction(t))return t.call(this,o,r);if(s.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=EA(e),e){let r=s.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Ue(this,this[r],r,t)))}return!1}delete(e,t){let r=this,o=!1;function i(n){if(n=EA(n),n){let I=s.findKey(r,n);I&&(!t||Ue(r,r[I],I,t))&&(delete r[I],o=!0)}}return s.isArray(e)?e.forEach(i):i(e),o}clear(e){let t=Object.keys(this),r=t.length,o=!1;for(;r--;){let i=t[r];(!e||Ue(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){let t=this,r={};return s.forEach(this,(o,i)=>{let n=s.findKey(r,i);if(n){t[n]=HA(o),delete t[i];return}let I=e?Ii(i):String(i).trim();I!==i&&delete t[i],t[I]=HA(o),r[I]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return s.forEach(this,(r,o)=>{r!=null&&r!==!1&&(t[o]=e&&s.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(o=>r.set(o)),r}static accessor(e){let r=(this[kt]=this[kt]={accessors:{}}).accessors,o=this.prototype;function i(n){let I=EA(n);r[I]||(gi(o,n),r[I]=!0)}return s.isArray(e)?e.forEach(i):i(e),this}};oA.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);s.reduceDescriptors(oA.prototype,({value:A},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>A,set(r){this[t]=r}}});s.freezeMethods(oA);var F=oA;function cA(A,e){let t=this||rA,r=e||t,o=F.from(r.headers),i=r.data;return s.forEach(A,function(I){i=I.call(t,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function lA(A){return!!(A&&A.__CANCEL__)}var Ne=class extends d{constructor(e,t,r){super(e??"canceled",d.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}},P=Ne;function fA(A,e,t){let r=t.config.validateStatus;!t.status||!r||r(t.status)?A(t):e(new d("Request failed with status code "+t.status,[d.ERR_BAD_REQUEST,d.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function be(A){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return e&&e[1]||""}function Ci(A,e){A=A||10;let t=new Array(A),r=new Array(A),o=0,i=0,n;return e=e!==void 0?e:1e3,function(E){let C=Date.now(),a=r[i];n||(n=C),t[o]=E,r[o]=C;let g=i,f=0;for(;g!==o;)f+=t[g++],g=g%A;if(o=(o+1)%A,o===i&&(i=(i+1)%A),C-n<e)return;let B=a&&C-a;return B?Math.round(f*1e3/B):void 0}}var Nt=Ci;function Bi(A,e){let t=0,r=1e3/e,o,i,n=(C,a=Date.now())=>{t=a,o=null,i&&(clearTimeout(i),i=null),A(...C)};return[(...C)=>{let a=Date.now(),g=a-t;g>=r?n(C,a):(o=C,i||(i=setTimeout(()=>{i=null,n(o)},r-g)))},()=>o&&n(o)]}var bt=Bi;var iA=(A,e,t=3)=>{let r=0,o=Nt(50,250);return bt(i=>{let n=i.loaded,I=i.lengthComputable?i.total:void 0,E=n-r,C=o(E),a=n<=I;r=n;let g={loaded:n,total:I,progress:I?n/I:void 0,bytes:E,rate:C||void 0,estimated:C&&I&&a?(I-n)/C:void 0,event:i,lengthComputable:I!=null,[e?"download":"upload"]:!0};A(g)},t)},Ge=(A,e)=>{let t=A!=null;return[r=>e[0]({lengthComputable:t,total:A,loaded:r}),e[1]]},Le=A=>(...e)=>s.asap(()=>A(...e));var Gt=h.hasStandardBrowserEnv?((A,e)=>t=>(t=new URL(t,h.origin),A.protocol===t.protocol&&A.host===t.host&&(e||A.port===t.port)))(new URL(h.origin),h.navigator&&/(msie|trident)/i.test(h.navigator.userAgent)):()=>!0;var Lt=h.hasStandardBrowserEnv?{write(A,e,t,r,o,i,n){if(typeof document>"u")return;let I=[`${A}=${encodeURIComponent(e)}`];s.isNumber(t)&&I.push(`expires=${new Date(t).toUTCString()}`),s.isString(r)&&I.push(`path=${r}`),s.isString(o)&&I.push(`domain=${o}`),i===!0&&I.push("secure"),s.isString(n)&&I.push(`SameSite=${n}`),document.cookie=I.join("; ")},read(A){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+A+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(A){this.write(A,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xe(A){return typeof A!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function Te(A,e){return e?A.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):A}function dA(A,e,t){let r=!xe(e);return A&&(r||t==!1)?Te(A,e):e}var xt=A=>A instanceof F?{...A}:A;function O(A,e){e=e||{};let t={};function r(C,a,g,f){return s.isPlainObject(C)&&s.isPlainObject(a)?s.merge.call({caseless:f},C,a):s.isPlainObject(a)?s.merge({},a):s.isArray(a)?a.slice():a}function o(C,a,g,f){if(s.isUndefined(a)){if(!s.isUndefined(C))return r(void 0,C,g,f)}else return r(C,a,g,f)}function i(C,a){if(!s.isUndefined(a))return r(void 0,a)}function n(C,a){if(s.isUndefined(a)){if(!s.isUndefined(C))return r(void 0,C)}else return r(void 0,a)}function I(C,a,g){if(g in e)return r(C,a);if(g in A)return r(void 0,C)}let E={url:i,method:i,data:i,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:I,headers:(C,a,g)=>o(xt(C),xt(a),g,!0)};return s.forEach(Object.keys({...A,...e}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;let g=s.hasOwnProp(E,a)?E[a]:o,f=g(A[a],e[a],a);s.isUndefined(f)&&g!==I||(t[a]=f)}),t}var MA=A=>{let e=O({},A),{data:t,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:n,auth:I}=e;if(e.headers=n=F.from(n),e.url=QA(dA(e.baseURL,e.url,e.allowAbsoluteUrls),A.params,A.paramsSerializer),I&&n.set("Authorization","Basic "+btoa((I.username||"")+":"+(I.password?unescape(encodeURIComponent(I.password)):""))),s.isFormData(t)){if(h.hasStandardBrowserEnv||h.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(s.isFunction(t.getHeaders)){let E=t.getHeaders(),C=["content-type","content-length"];Object.entries(E).forEach(([a,g])=>{C.includes(a.toLowerCase())&&n.set(a,g)})}}if(h.hasStandardBrowserEnv&&(r&&s.isFunction(r)&&(r=r(e)),r||r!==!1&&Gt(e.url))){let E=o&&i&&Lt.read(i);E&&n.set(o,E)}return e};var Qi=typeof XMLHttpRequest<"u",Tt=Qi&&function(A){return new Promise(function(t,r){let o=MA(A),i=o.data,n=F.from(o.headers).normalize(),{responseType:I,onUploadProgress:E,onDownloadProgress:C}=o,a,g,f,B,Q;function l(){B&&B(),Q&&Q(),o.cancelToken&&o.cancelToken.unsubscribe(a),o.signal&&o.signal.removeEventListener("abort",a)}let c=new XMLHttpRequest;c.open(o.method.toUpperCase(),o.url,!0),c.timeout=o.timeout;function p(){if(!c)return;let w=F.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),J={data:!I||I==="text"||I==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:w,config:A,request:c};fA(function(x){t(x),l()},function(x){r(x),l()},J),c=null}"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(r(new d("Request aborted",d.ECONNABORTED,A,c)),c=null)},c.onerror=function(N){let J=N&&N.message?N.message:"Network Error",V=new d(J,d.ERR_NETWORK,A,c);V.event=N||null,r(V),c=null},c.ontimeout=function(){let N=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",J=o.transitional||tA;o.timeoutErrorMessage&&(N=o.timeoutErrorMessage),r(new d(N,J.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,A,c)),c=null},i===void 0&&n.setContentType(null),"setRequestHeader"in c&&s.forEach(n.toJSON(),function(N,J){c.setRequestHeader(J,N)}),s.isUndefined(o.withCredentials)||(c.withCredentials=!!o.withCredentials),I&&I!=="json"&&(c.responseType=o.responseType),C&&([f,Q]=iA(C,!0),c.addEventListener("progress",f)),E&&c.upload&&([g,B]=iA(E),c.upload.addEventListener("progress",g),c.upload.addEventListener("loadend",B)),(o.cancelToken||o.signal)&&(a=w=>{c&&(r(!w||w.type?new P(null,A,c):w),c.abort(),c=null)},o.cancelToken&&o.cancelToken.subscribe(a),o.signal&&(o.signal.aborted?a():o.signal.addEventListener("abort",a)));let k=be(o.url);if(k&&h.protocols.indexOf(k)===-1){r(new d("Unsupported protocol "+k+":",d.ERR_BAD_REQUEST,A));return}c.send(i||null)})};var Ei=(A,e)=>{let{length:t}=A=A?A.filter(Boolean):[];if(e||t){let r=new AbortController,o,i=function(C){if(!o){o=!0,I();let a=C instanceof Error?C:this.reason;r.abort(a instanceof d?a:new P(a instanceof Error?a.message:a))}},n=e&&setTimeout(()=>{n=null,i(new d(`timeout of ${e}ms exceeded`,d.ETIMEDOUT))},e),I=()=>{A&&(n&&clearTimeout(n),n=null,A.forEach(C=>{C.unsubscribe?C.unsubscribe(i):C.removeEventListener("abort",i)}),A=null)};A.forEach(C=>C.addEventListener("abort",i));let{signal:E}=r;return E.unsubscribe=()=>s.asap(I),E}},Jt=Ei;var ci=function*(A,e){let t=A.byteLength;if(!e||t<e){yield A;return}let r=0,o;for(;r<t;)o=r+e,yield A.slice(r,o),r=o},li=async function*(A,e){for await(let t of fi(A))yield*ci(t,e)},fi=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}let e=A.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Je=(A,e,t,r)=>{let o=li(A,e),i=0,n,I=E=>{n||(n=!0,r&&r(E))};return new ReadableStream({async pull(E){try{let{done:C,value:a}=await o.next();if(C){I(),E.close();return}let g=a.byteLength;if(t){let f=i+=g;t(f)}E.enqueue(new Uint8Array(a))}catch(C){throw I(C),C}},cancel(E){return I(E),o.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:OA}=s,di=(({Request:A,Response:e})=>({Request:A,Response:e}))(s.global),{ReadableStream:Mt,TextEncoder:Ot}=s.global,Pt=(A,...e)=>{try{return!!A(...e)}catch{return!1}},ui=A=>{A=s.merge.call({skipUndefined:!0},di,A);let{fetch:e,Request:t,Response:r}=A,o=e?OA(e):typeof fetch=="function",i=OA(t),n=OA(r);if(!o)return!1;let I=o&&OA(Mt),E=o&&(typeof Ot=="function"?(Q=>l=>Q.encode(l))(new Ot):async Q=>new Uint8Array(await new t(Q).arrayBuffer())),C=i&&I&&Pt(()=>{let Q=!1,l=new Mt,c=new t(h.origin,{body:l,method:"POST",get duplex(){return Q=!0,"half"}}).headers.has("Content-Type");return l.cancel(),Q&&!c}),a=n&&I&&Pt(()=>s.isReadableStream(new r("").body)),g={stream:a&&(Q=>Q.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(Q=>{!g[Q]&&(g[Q]=(l,c)=>{let p=l&&l[Q];if(p)return p.call(l);throw new d(`Response type '${Q}' is not supported`,d.ERR_NOT_SUPPORT,c)})});let f=async Q=>{if(Q==null)return 0;if(s.isBlob(Q))return Q.size;if(s.isSpecCompliantForm(Q))return(await new t(h.origin,{method:"POST",body:Q}).arrayBuffer()).byteLength;if(s.isArrayBufferView(Q)||s.isArrayBuffer(Q))return Q.byteLength;if(s.isURLSearchParams(Q)&&(Q=Q+""),s.isString(Q))return(await E(Q)).byteLength},B=async(Q,l)=>{let c=s.toFiniteNumber(Q.getContentLength());return c??f(l)};return async Q=>{let{url:l,method:c,data:p,signal:k,cancelToken:w,timeout:N,onDownloadProgress:J,onUploadProgress:V,responseType:x,headers:VA,withCredentials:hA="same-origin",fetchOptions:Ze}=MA(Q),_e=e||fetch;x=x?(x+"").toLowerCase():"text";let wA=Jt([k,w&&w.toAbortSignal()],N),sA=null,z=wA&&wA.unsubscribe&&(()=>{wA.unsubscribe()}),Xe;try{if(V&&C&&c!=="get"&&c!=="head"&&(Xe=await B(VA,p))!==0){let K=new t(l,{method:"POST",body:p,duplex:"half"}),v;if(s.isFormData(p)&&(v=K.headers.get("content-type"))&&VA.setContentType(v),K.body){let[zA,DA]=Ge(Xe,iA(Le(V)));p=Je(K.body,Ht,zA,DA)}}s.isString(hA)||(hA=hA?"include":"omit");let b=i&&"credentials"in t.prototype,ve={...Ze,signal:wA,method:c.toUpperCase(),headers:VA.normalize().toJSON(),body:p,duplex:"half",credentials:b?hA:void 0};sA=i&&new t(l,ve);let q=await(i?_e(sA,Ze):_e(l,ve)),$e=a&&(x==="stream"||x==="response");if(a&&(J||$e&&z)){let K={};["status","statusText","headers"].forEach(At=>{K[At]=q[At]});let v=s.toFiniteNumber(q.headers.get("content-length")),[zA,DA]=J&&Ge(v,iA(Le(J),!0))||[];q=new r(Je(q.body,Ht,zA,()=>{DA&&DA(),z&&z()}),K)}x=x||"text";let fr=await g[s.findKey(g,x)||"text"](q,Q);return!$e&&z&&z(),await new Promise((K,v)=>{fA(K,v,{data:fr,headers:F.from(q.headers),status:q.status,statusText:q.statusText,config:Q,request:sA})})}catch(b){throw z&&z(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new d("Network Error",d.ERR_NETWORK,Q,sA,b&&b.response),{cause:b.cause||b}):d.from(b,b&&b.code,Q,sA,b&&b.response)}}},pi=new Map,He=A=>{let e=A&&A.env||{},{fetch:t,Request:r,Response:o}=e,i=[r,o,t],n=i.length,I=n,E,C,a=pi;for(;I--;)E=i[I],C=a.get(E),C===void 0&&a.set(E,C=I?new Map:ui(e)),a=C;return C},WI=He();var Me={http:xA,xhr:Tt,fetch:{get:He}};s.forEach(Me,(A,e)=>{if(A){try{Object.defineProperty(A,"name",{value:e})}catch{}Object.defineProperty(A,"adapterName",{value:e})}});var Yt=A=>`- ${A}`,mi=A=>s.isFunction(A)||A===null||A===!1;function hi(A,e){A=s.isArray(A)?A:[A];let{length:t}=A,r,o,i={};for(let n=0;n<t;n++){r=A[n];let I;if(o=r,!mi(r)&&(o=Me[(I=String(r)).toLowerCase()],o===void 0))throw new d(`Unknown adapter '${I}'`);if(o&&(s.isFunction(o)||(o=o.get(e))))break;i[I||"#"+n]=o}if(!o){let n=Object.entries(i).map(([E,C])=>`adapter ${E} `+(C===!1?"is not supported by the environment":"is not available in the build")),I=t?n.length>1?`since :
`+n.map(Yt).join(`
`):" "+Yt(n[0]):"as no adapter specified";throw new d("There is no suitable adapter to dispatch the request "+I,"ERR_NOT_SUPPORT")}return o}var PA={getAdapter:hi,adapters:Me};function Oe(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new P(null,A)}function YA(A){return Oe(A),A.headers=F.from(A.headers),A.data=cA.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),PA.getAdapter(A.adapter||rA.adapter,A)(A).then(function(r){return Oe(A),r.data=cA.call(A,A.transformResponse,r),r.headers=F.from(r.headers),r},function(r){return lA(r)||(Oe(A),r&&r.response&&(r.response.data=cA.call(A,A.transformResponse,r.response),r.response.headers=F.from(r.response.headers))),Promise.reject(r)})}var qA="1.15.0";var KA={};["object","boolean","number","function","string","symbol"].forEach((A,e)=>{KA[A]=function(r){return typeof r===A||"a"+(e<1?"n ":" ")+A}});var qt={};KA.transitional=function(e,t,r){function o(i,n){return"[Axios v"+qA+"] Transitional option '"+i+"'"+n+(r?". "+r:"")}return(i,n,I)=>{if(e===!1)throw new d(o(n," has been removed"+(t?" in "+t:"")),d.ERR_DEPRECATED);return t&&!qt[n]&&(qt[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,n,I):!0}};KA.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function wi(A,e,t){if(typeof A!="object")throw new