bb_datasource_supersoap 1.0.1

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/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # SuperSOAP
2
+
3
+ Connect to web services using SOAP in Budibase
4
+
5
+ A Budibase datasource integration for connecting to SOAP web services, parsing XML responses, and mapping data to Budibase schemas.
6
+
7
+ ## Metadata
8
+
9
+ | | |
10
+ |---|---|
11
+ | **Type** | Budibase Datasource |
12
+ | **Category** | datasource |
13
+ | **Topics** | `budibase`, `datasource`, `datasource` |
14
+
15
+ ## Development
16
+
17
+ ```bash
18
+ bun install
19
+ bun link @poirazis/superlib
20
+ bun run build
21
+ ```
22
+
23
+ ## Schema
24
+
25
+ See `schema.json` for the component definition.
package/dist/icon.svg ADDED
@@ -0,0 +1,118 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ width="512px" height="512px" viewBox="32 32 480 480" xml:space="preserve">
5
+ <g>
6
+ <g>
7
+ <path fill="#AB7C94" d="M466.978,200.728h-4.441c1.979-9.991,0.948-20.341-3.098-29.933c-11.044-26.178-41.322-38.49-67.5-27.451
8
+ c-26.178,11.042-38.491,41.322-27.45,67.5c5.349,12.681,15.316,22.52,28.065,27.705c6.27,2.55,12.844,3.823,19.415,3.823
9
+ c6.79,0,13.576-1.361,20.02-4.078c9.879-4.167,18.021-11.146,23.593-20.049h11.397c15.166,0,27.506,12.339,27.506,27.506v191.075
10
+ c0,15.166-12.339,27.507-27.506,27.507H45.023c-15.166,0-27.506-12.339-27.506-27.507V245.752
11
+ c0-15.166,12.339-27.506,27.506-27.506H326.87c4.837,0,8.759-3.922,8.759-8.759c0-4.837-3.922-8.759-8.759-8.759H45.023
12
+ C20.197,200.728,0,220.926,0,245.752v191.075c0,24.827,20.197,45.024,45.023,45.024h421.954c24.825,0,45.023-20.197,45.023-45.024
13
+ V245.752C512,220.926,491.803,200.728,466.978,200.728z M443.466,203.632c-3.422,8.414-9.915,14.994-18.286,18.523
14
+ c-8.369,3.53-17.613,3.591-26.028,0.168c-8.414-3.422-14.992-9.916-18.523-18.286c-7.288-17.278,0.84-37.264,18.117-44.551
15
+ c4.303-1.815,8.77-2.674,13.171-2.674c13.271,0,25.908,7.816,31.38,20.792C446.828,185.973,446.887,195.216,443.466,203.632z"/>
16
+ </g>
17
+ </g>
18
+ <g>
19
+ <g>
20
+ <path fill="#AB7C94" d="M416.056,254.992H95.944c-18.063,0-32.757,14.695-32.757,32.757v107.079c0,18.063,14.695,32.757,32.757,32.757h271.458
21
+ c4.837,0,8.759-3.92,8.759-8.759s-3.922-8.759-8.759-8.759H95.944c-8.404,0-15.24-6.836-15.24-15.24V287.749
22
+ c0-8.402,6.836-15.24,15.24-15.24h320.111c8.404,0,15.24,6.836,15.24,15.24v107.079c0,8.402-6.836,15.24-15.24,15.24
23
+ c-4.837,0-8.759,3.92-8.759,8.759s3.922,8.759,8.759,8.759c18.063,0,32.757-14.695,32.757-32.757V287.749
24
+ C448.813,269.687,434.118,254.992,416.056,254.992z"/>
25
+ </g>
26
+ </g>
27
+ <g>
28
+ <g>
29
+ <path fill="#AB7C94" d="M363.813,102.608c-8.594-20.374-32.159-29.961-52.537-21.365c-20.373,8.593-29.957,32.161-21.364,52.535
30
+ c4.163,9.869,11.921,17.528,21.843,21.563c4.88,1.985,9.996,2.977,15.11,2.977c5.284,0,10.566-1.059,15.581-3.174
31
+ c9.87-4.163,17.528-11.921,21.564-21.843C368.047,123.378,367.977,112.478,363.813,102.608z M347.784,126.7
32
+ c-2.273,5.588-6.585,9.957-12.144,12.302c-5.558,2.344-11.697,2.385-17.285,0.111c-5.589-2.273-9.958-6.585-12.303-12.144
33
+ c-4.838-11.474,0.559-24.747,12.033-29.587c5.559-2.346,11.697-2.385,17.286-0.112c5.588,2.273,9.957,6.585,12.302,12.144
34
+ C350.017,114.973,350.058,121.111,347.784,126.7z"/>
35
+ </g>
36
+ </g>
37
+ <g>
38
+ <g>
39
+ <path fill="#AB7C94" d="M453.309,48.162c-3.056-7.245-8.75-12.866-16.034-15.829c-7.284-2.963-15.284-2.91-22.531,0.146
40
+ c-7.245,3.056-12.866,8.75-15.829,16.034c-2.962,7.284-2.91,15.286,0.146,22.531c3.056,7.244,8.75,12.866,16.034,15.827
41
+ c3.583,1.457,7.339,2.185,11.093,2.185c3.878,0,7.757-0.778,11.438-2.33c7.245-3.056,12.866-8.75,15.829-16.034
42
+ C456.417,63.409,456.365,55.408,453.309,48.162z M430.818,70.587c-6.054,2.556-13.061-0.294-15.616-6.351
43
+ c-2.554-6.056,0.295-13.062,6.352-15.616c1.508-0.636,3.074-0.938,4.616-0.938c4.651,0,9.081,2.74,10.999,7.288
44
+ C439.724,61.027,436.874,68.033,430.818,70.587z"/>
45
+ </g>
46
+ </g>
47
+ <g>
48
+ <g>
49
+ <path fill="#AB7C94" d="M165.515,346.485c-2.65-4.261-6.817-7.738-12.757-10.634c-4.466-2.122-10.028-3.819-17.005-5.185l-0.415-0.033
50
+ c-6.107-1.144-11.273-2.956-14.191-4.978c-1.276-0.884-2.256-1.812-2.756-2.612c-0.355-0.568-0.576-1.175-0.576-2.438
51
+ c0-2.194,1.299-4.268,3.858-6.165c3.211-2.379,7.739-3.743,12.422-3.743c6.736,0,12.31,3.35,18.381,7.399
52
+ c1.794,1.195,3.932,1.606,6.025,1.154c2.079-0.448,3.842-1.685,4.92-3.415c2.455-3.528,1.503-8.451-2.169-11.007l-0.308-0.199
53
+ c-6.324-4.094-14.984-9.7-26.849-9.7c-8.098,0-15.847,2.381-21.838,6.715c-6.563,4.851-10.327,11.761-10.327,18.958
54
+ c0,3.884,1.048,7.614,3.034,10.789c2.603,4.143,6.612,7.517,11.913,10.027c4.234,2.008,9.444,3.585,15.928,4.827l0.406,0.03
55
+ c6.681,1.26,12.386,3.211,15.66,5.356c1.417,0.945,2.394,1.914,3.075,3.049c0.615,1.025,0.833,1.796,0.833,2.945
56
+ c-0.001,2.642-1.499,5.079-4.454,7.245c-3.561,2.611-8.661,4.11-14.015,4.11c-8.014,0.084-16.745-4.703-21.827-8.861
57
+ c-1.641-1.342-3.717-1.975-5.841-1.77c-2.138,0.202-4.056,1.217-5.399,2.858l-0.03,0.039c-2.66,3.442-2.104,8.468,1.262,11.222
58
+ c7.077,5.586,18.345,12.273,31.859,12.398c8.697,0,16.964-2.555,23.262-7.182c7.033-5.064,11.066-12.373,11.066-20.055
59
+ C168.663,353.691,167.544,349.732,165.515,346.485z"/>
60
+ </g>
61
+ </g>
62
+ <g>
63
+ <g>
64
+ <path fill="#AB7C94" d="M253.072,308.359c-7.525-8.408-18.746-13.429-30.02-13.429c-11.649,0-22.852,4.893-30.729,13.415
65
+ c-7.981,8.496-12.377,19.723-12.377,31.613c0,12.018,4.399,23.249,12.375,31.612c8.001,8.526,19.201,13.415,30.729,13.415
66
+ c11.166,0,22.389-5.023,29.998-13.405c8.142-8.537,12.625-19.766,12.625-31.622C265.674,328.239,261.199,317.018,253.072,308.359z
67
+ M240.764,359.679c-4.873,5.224-11.164,8.1-17.712,8.1c-6.958,0-13.249-2.8-18.221-8.128c-4.878-4.994-7.676-12.171-7.676-19.692
68
+ c0-7.48,2.803-14.708,7.703-19.841c4.871-5.22,11.162-7.979,18.193-7.979c6.62,0,12.911,2.834,17.712,7.977
69
+ c4.896,5.254,7.704,12.486,7.704,19.842C248.467,347.357,245.664,354.54,240.764,359.679z"/>
70
+ </g>
71
+ </g>
72
+ <g>
73
+ <g>
74
+ <path fill="#AB7C94" d="M345.627,373.604l-26.585-70.851c-1.348-3.293-4.56-5.434-7.991-5.298c-3.395-0.134-6.666,2.049-8.012,5.344
75
+ l-26.582,70.849c-1.533,4.446,0.663,9.219,5.068,10.888c0.921,0.307,1.823,0.451,2.839,0.451c3.466,0,6.556-2.079,7.89-5.34
76
+ l5.463-14.494h26.787l5.455,14.475c1.167,3.206,4.292,5.36,7.778,5.36c0.642,0,1.879-0.063,2.906-0.474
77
+ C344.979,382.867,347.177,378.094,345.627,373.604z M303.844,348.423l7.204-19.124l7.205,19.124H303.844z"/>
78
+ </g>
79
+ </g>
80
+ <g>
81
+ <g>
82
+ <path fill="#AB7C94" d="M388.586,297.335h-21.518c-4.612,0-8.363,3.752-8.363,8.363v70.924c0,4.611,3.751,8.363,8.363,8.363
83
+ c4.678,0,8.484-3.752,8.484-8.363v-24.335h13.034c15.217,0,27.597-12.273,27.597-27.356
84
+ C416.183,309.715,403.803,297.335,388.586,297.335z M388.586,335.441h-13.034v-21.259h13.034c5.924,0,10.646,4.735,10.751,10.719
85
+ C399.231,330.81,394.508,335.441,388.586,335.441z"/>
86
+ </g>
87
+ </g>
88
+ <g>
89
+ </g>
90
+ <g>
91
+ </g>
92
+ <g>
93
+ </g>
94
+ <g>
95
+ </g>
96
+ <g>
97
+ </g>
98
+ <g>
99
+ </g>
100
+ <g>
101
+ </g>
102
+ <g>
103
+ </g>
104
+ <g>
105
+ </g>
106
+ <g>
107
+ </g>
108
+ <g>
109
+ </g>
110
+ <g>
111
+ </g>
112
+ <g>
113
+ </g>
114
+ <g>
115
+ </g>
116
+ <g>
117
+ </g>
118
+ </svg>
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "bb_datasource_supersoap",
3
+ "version": "1.0.1",
4
+ "description": "Connect to web services using SOAP in Budibase",
5
+ "license": "MIT"
6
+ }
@@ -0,0 +1 @@
1
+ var t=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,s=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),a=(s,a,u)=>(u=null!=s?t(o(s)):{},((t,o,s,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(var u,c=r(o),l=0,p=c.length;l<p;l++)u=c[l],i.call(t,u)||u===s||e(t,u,{get:(t=>o[t]).bind(null,u),enumerable:!(a=n(o,u))||a.enumerable});return t})(!a&&s&&s.__esModule?u:e(u,"default",{value:s,enumerable:!0}),s)),u=s((t,e)=>{function n(t,e){return function(){return t.apply(e,arguments)}}var r,{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:s,toStringTag:a}=Symbol,u=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),c=(t,e)=>{let n=t;const r=[];for(;null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),u(n,e))return!0;n=i(n)}return!1},l=(r=Object.create(null),t=>{const e=o.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())}),p=t=>(t=t.toLowerCase(),e=>l(e)===t),h=t=>e=>typeof e===t,{isArray:f}=Array,d=h("undefined");function y(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&w(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var m=p("ArrayBuffer");var g=h("string"),w=h("function"),b=h("number"),E=t=>null!==t&&"object"==typeof t,O=t=>{if(!E(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==i(e)||c(t,a)||c(t,s))},T=p("Date"),v=p("File"),_=p("Blob"),D=p("FileList");var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},A=void 0!==N.FormData?N.FormData:void 0,I=p("URLSearchParams"),[P,C,x,S]=["ReadableStream","Request","Response","Headers"].map(p);function R(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),f(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(y(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function L(t,e){if(y(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}var F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,j=t=>!d(t)&&t!==F;var B,M=(B="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>B&&t instanceof B),U=p("HTMLFormElement"),{propertyIsEnumerable:k}=Object.prototype,V=p("RegExp"),q=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};R(n,(n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)}),Object.defineProperties(t,r)};var z,G,W,H,X=p("AsyncFunction"),K=(z="function"==typeof setImmediate,G=w(F.postMessage),z?setImmediate:G?(W=`axios@${Math.random()}`,H=[],F.addEventListener("message",({source:t,data:e})=>{t===F&&e===W&&H.length&&H.shift()()},!1),t=>{H.push(t),F.postMessage(W,"*")}):t=>setTimeout(t)),Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):"undefined"!=typeof process&&process.nextTick||K,$=t=>null!=t&&w(t[s]),J={isArray:f,isArrayBuffer:m,isBuffer:y,isFormData:t=>{if(!t)return!1;if(A&&t instanceof A)return!0;const e=i(t);if(!e||e===Object.prototype)return!1;if(!w(t.append))return!1;const n=l(t);return"formdata"===n||"object"===n&&w(t.toString)&&"[object FormData]"===t.toString()},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&m(t.buffer),e},isString:g,isNumber:b,isBoolean:t=>!0===t||!1===t,isObject:E,isPlainObject:O,isEmptyObject:t=>{if(!E(t)||y(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(e){return!1}},isReadableStream:P,isRequest:C,isResponse:x,isHeaders:S,isUndefined:d,isDate:T,isFile:v,isReactNativeBlob:t=>!(!t||void 0===t.uri),isReactNative:t=>t&&void 0!==t.getParts,isBlob:_,isRegExp:V,isFunction:w,isStream:t=>E(t)&&w(t.pipe),isURLSearchParams:I,isTypedArray:M,isFileList:D,forEach:R,merge:function t(...e){const{caseless:n,skipUndefined:r}=j(this)&&this||{},o={},i=(e,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const s=n&&"string"==typeof i&&L(o,i)||i,a=u(o,s)?o[s]:void 0;O(a)&&O(e)?o[s]=t(a,e):O(e)?o[s]=t({},e):f(e)?o[s]=e.slice():r&&d(e)||(o[s]=e)};for(let s=0,a=e.length;s<a;s++){const t=e[s];if(!t||y(t))continue;if(R(t,i),"object"!=typeof t||f(t))continue;const n=Object.getOwnPropertySymbols(t);for(let e=0;e<n.length;e++){const r=n[e];k.call(t,r)&&i(t[r],r)}}return o},extend:(t,e,r,{allOwnKeys:o}={})=>(R(e,(e,o)=>{r&&w(e)?Object.defineProperty(t,o,{__proto__:null,value:n(e,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,s,a;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)a=o[s],r&&!r(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:l,kindOfTest:p,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(f(t))return t;let e=t.length;if(!b(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[s]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:U,hasOwnProperty:u,hasOwnProp:u,hasOwnInPrototypeChain:c,getSafeProp:(t,e)=>null!=t&&c(t,e)?t[e]:void 0,reduceDescriptors:q,freezeMethods:t=>{q(t,(e,n)=>{if(w(t)&&["arguments","caller","callee"].includes(n))return!1;const r=t[n];w(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach(t=>{n[t]=!0})};return f(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:L,global:F,isContextDefined:j,isSpecCompliantForm:function(t){return!!(t&&w(t.append)&&"FormData"===t[a]&&t[s])},toJSONObject:t=>{const e=new WeakSet,n=t=>{if(E(t)){if(e.has(t))return;if(y(t))return t;if(!("toJSON"in t)){e.add(t);const r=f(t)?[]:{};return R(t,(t,e)=>{const o=n(t);!d(o)&&(r[e]=o)}),e.delete(t),r}}return t};return n(t)},isAsyncFn:X,isThenable:t=>t&&(E(t)||w(t))&&w(t.then)&&w(t.catch),setImmediate:K,asap:Y,isIterable:$,isSafeIterable:t=>null!=t&&c(t,s)&&$(t)},Q=J.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"]);var Z=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),tt=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function et(t,e){return J.isArray(t)?t.map(t=>et(t,e)):function(t){let e=0,n=t.length;for(;e<n;){const n=t.charCodeAt(e);if(9!==n&&32!==n)break;e+=1}for(;n>e;){const e=t.charCodeAt(n-1);if(9!==e&&32!==e)break;n-=1}return 0===e&&n===t.length?t:t.slice(e,n)}(String(t).replace(e,""))}function nt(t){const e=Object.create(null);return J.forEach(t.toJSON(),(t,n)=>{e[n]=(t=>et(t,tt))(t)}),e}var rt=Symbol("internals");function ot(t){return t&&String(t).trim().toLowerCase()}function it(t){return!1===t||null==t?t:J.isArray(t)?t.map(it):(t=>et(t,Z))(String(t))}function st(t,e,n,r,o){return J.isFunction(r)?r.call(this,e,n):(o&&(e=n),J.isString(e)?J.isString(r)?-1!==e.indexOf(r):J.isRegExp(r)?r.test(e):void 0:void 0)}var at=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=ot(e);if(!o)return;const i=J.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=it(t))}const i=(t,e)=>J.forEach(t,(t,n)=>o(t,n,e));if(J.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(J.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach(function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&Q[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e})(t),e);else if(J.isObject(t)&&J.isSafeIterable(t)){let n,r,o=Object.create(null);for(const e of t){if(!J.isArray(e))throw new TypeError("Object iterator must return a key-value pair");r=e[0],J.hasOwnProp(o,r)?(n=o[r],o[r]=J.isArray(n)?[...n,e[1]]:[n,e[1]]):o[r]=e[1]}i(o,e)}else null!=t&&o(e,t,n);return this}get(t,e){if(t=ot(t)){const n=J.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(J.isFunction(e))return e.call(this,t,n);if(J.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ot(t)){const n=J.findKey(this,t);return!(!n||void 0===this[n]||e&&!st(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=ot(t)){const o=J.findKey(n,t);!o||e&&!st(0,n[o],o,e)||(delete n[o],r=!0)}}return J.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!st(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return J.forEach(this,(r,o)=>{const i=J.findKey(n,o);if(i)return e[i]=it(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete e[o],e[s]=it(r),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(e[r]=t&&J.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(t=>n.set(t)),n}static accessor(t){const e=(this[rt]=this[rt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=ot(t);e[r]||(!function(t,e){const n=J.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})})}(n,t),e[r]=!0)}return J.isArray(t)?t.forEach(r):r(t),this}};at.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(at.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),J.freezeMethods(at);function ut(t,e){const n=new Set(e.map(t=>String(t).toLowerCase())),r=[],o=t=>{if(null===t||"object"!=typeof t)return t;if(J.isBuffer(t))return t;if(-1!==r.indexOf(t))return;let e;if(t instanceof at&&(t=t.toJSON()),r.push(t),J.isArray(t))e=[],t.forEach((t,n)=>{const r=o(t);J.isUndefined(r)||(e[n]=r)});else{if(!J.isPlainObject(t)&&function(t){if(J.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(J.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}(t))return r.pop(),t;e=Object.create(null);for(const[r,i]of Object.entries(t)){const t=n.has(r.toLowerCase())?"[REDACTED ****]":o(i);J.isUndefined(t)||(e[r]=t)}}return r.pop(),e};return o(t)}var ct=class t extends Error{static from(e,n,r,o,i,s){const a=new t(e.message,n||e.code,r,o,i);return a.cause=e,a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(t,e,n,r,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,e=t&&J.hasOwnProp(t,"redact")?t.redact:void 0,n=J.isArray(e)&&e.length>0?ut(t,e):J.toJSONObject(t);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:n,code:this.code,status:this.status}}};ct.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ct.ERR_BAD_OPTION="ERR_BAD_OPTION",ct.ECONNABORTED="ECONNABORTED",ct.ETIMEDOUT="ETIMEDOUT",ct.ECONNREFUSED="ECONNREFUSED",ct.ERR_NETWORK="ERR_NETWORK",ct.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ct.ERR_DEPRECATED="ERR_DEPRECATED",ct.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ct.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ct.ERR_CANCELED="ERR_CANCELED",ct.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ct.ERR_INVALID_URL="ERR_INVALID_URL",ct.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function lt(t){return J.isPlainObject(t)||J.isArray(t)}function pt(t){return J.endsWith(t,"[]")?t.slice(0,-2):t}function ht(t,e,n){return t?t.concat(e).map(function(t,e){return t=pt(t),!n&&e?"["+t+"]":t}).join(n?".":""):e}var ft=J.toFlatObject(J,{},null,function(t){return/^is[A-Z]/.test(t)});function dt(t,e,n){if(!J.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!J.isUndefined(e[t])})).metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,a=n.Blob||"undefined"!=typeof Blob&&Blob,u=void 0===n.maxDepth?100:n.maxDepth,c=a&&J.isSpecCompliantForm(e),l=[];if(!J.isFunction(o))throw new TypeError("visitor must be a function");function p(t){if(null===t)return"";if(J.isDate(t))return t.toISOString();if(J.isBoolean(t))return t.toString();if(!c&&J.isBlob(t))throw new ct("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(t)||J.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function h(t){if(t>u)throw new ct("Object is too deeply nested ("+t+" levels). Max depth: "+u,ct.ERR_FORM_DATA_DEPTH_EXCEEDED)}function f(t,n,o){let a=t;if(J.isReactNative(e)&&J.isReactNativeBlob(t))return e.append(ht(o,n,i),p(t)),!1;if(t&&!o&&"object"==typeof t)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=function(t,e){if(u===1/0)return JSON.stringify(t);const n=[];return JSON.stringify(t,function(t,r){if(!J.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),h(e+n.length-1),r})}(t,1);else if(J.isArray(t)&&function(t){return J.isArray(t)&&!t.some(lt)}(t)||(J.isFileList(t)||J.endsWith(n,"[]"))&&(a=J.toArray(t)))return n=pt(n),a.forEach(function(t,r){!J.isUndefined(t)&&null!==t&&e.append(!0===s?ht([n],r,i):null===s?n:n+"[]",p(t))}),!1;return!!lt(t)||(e.append(ht(o,n,i),p(t)),!1)}const d=Object.assign(ft,{defaultVisitor:f,convertValue:p,isVisitable:lt});if(!J.isObject(t))throw new TypeError("data must be an object");return function t(n,r,i=0){if(!J.isUndefined(n)){if(h(i),-1!==l.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));l.push(n),J.forEach(n,function(n,s){!0===(!(J.isUndefined(n)||null===n)&&o.call(e,n,J.isString(s)?s.trim():s,r,d))&&t(n,r?r.concat(s):[s],i+1)}),l.pop()}}(t),e}function yt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(t){return e[t]})}function mt(t,e){this._pairs=[],t&&dt(t,this,e)}var gt=mt.prototype;function wt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bt(t,e,n){if(!e)return t;const r=J.isFunction(n)?{serialize:n}:n,o=J.getSafeProp(r,"encode")||wt,i=J.getSafeProp(r,"serialize");let s;if(s=i?i(e,r):J.isURLSearchParams(e)?e.toString():new mt(e,r).toString(o),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}gt.append=function(t,e){this._pairs.push([t,e])},gt.toString=function(t){const e=t?function(e){return t.call(this,e,yt)}:yt;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var Et=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){J.forEach(this.handlers,function(e){null!==e&&t(e)})}},Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Tt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},vt="undefined"!=typeof window&&"undefined"!=typeof document,_t="object"==typeof navigator&&navigator||void 0,Dt=vt&&(!_t||["ReactNative","NativeScript","NS"].indexOf(_t.product)<0),Nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,At=vt&&window.location.href||"http://localhost",It={...Object.freeze({__proto__:null,hasBrowserEnv:vt,hasStandardBrowserEnv:Dt,hasStandardBrowserWebWorkerEnv:Nt,navigator:_t,origin:At}),...Tt};function Pt(t){if(t>100)throw new ct("FormData field is too deeply nested ("+t+" levels). Max depth: 100",ct.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ct(t){function e(t,n,r,o){Pt(o);let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=t.length;return i=!i&&J.isArray(r)?r.length:i,a?(J.hasOwnProp(r,i)?r[i]=J.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!s):(J.hasOwnProp(r,i)&&J.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&J.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s)}if(J.isFormData(t)&&J.isFunction(t.entries)){const n={};return J.forEachEntry(t,(t,r)=>{e(function(t){const e=[],n=/\w+|\[(\w*)]/g;let r;for(;null!==(r=n.exec(t));)Pt(e.length),e.push("[]"===r[0]?"":r[1]||r[0]);return e}(t),r,n,0)}),n}return null}var xt=(t,e)=>null!=t&&J.hasOwnProp(t,e)?t[e]:void 0;var St={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=J.isObject(t);if(o&&J.isHTMLForm(t)&&(t=new FormData(t)),J.isFormData(t))return r?JSON.stringify(Ct(t)):t;if(J.isArrayBuffer(t)||J.isBuffer(t)||J.isStream(t)||J.isFile(t)||J.isBlob(t)||J.isReadableStream(t))return t;if(J.isArrayBufferView(t))return t.buffer;if(J.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){const e=xt(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return dt(t,new It.classes.URLSearchParams,{visitor:function(t,e,n,r){return It.isNode&&J.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}(t,e).toString();if((i=J.isFileList(t))||n.indexOf("multipart/form-data")>-1){const n=xt(this,"env"),r=n&&n.FormData;return dt(i?{"files[]":t}:t,r&&new r,e)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(J.isString(t))try{return(e||JSON.parse)(t),J.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=xt(this,"transitional")||St.transitional,n=e&&e.forcedJSONParsing,r=xt(this,"responseType"),o="json"===r;if(J.isResponse(t)||J.isReadableStream(t))return t;if(t&&J.isString(t)&&(n&&!r||o)){const n=!(e&&e.silentJSONParsing)&&o;try{return JSON.parse(t,xt(this,"parseReviver"))}catch(i){if(n){if("SyntaxError"===i.name)throw ct.from(i,ct.ERR_BAD_RESPONSE,this,null,xt(this,"response"));throw i}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Rt(t,e){const n=this||St,r=e||n,o=at.from(r.headers);let i=r.data;return J.forEach(t,function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Lt(t){return!(!t||!t.__CANCEL__)}J.forEach(["delete","get","head","post","put","patch","query"],t=>{St.headers[t]={}});var Ft=class extends ct{constructor(t,e,n){super(null==t?"canceled":t,ct.ERR_CANCELED,e,n),this.name="CanceledError",this.__CANCEL__=!0}};function jt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ct("Request failed with status code "+n.status,n.status>=400&&n.status<500?ct.ERR_BAD_REQUEST:ct.ERR_BAD_RESPONSE,n.config,n.request,n)):t(n)}var Bt=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,p=0;for(;l!==i;)p+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-o<e)return;const h=c&&u-c;return h?Math.round(1e3*p/h):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const s=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t(...e)};return[(...t)=>{const e=Date.now(),a=e-o;a>=i?s(t,e):(n=t,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{if(!n||"number"!=typeof n.loaded)return;const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=null!=s?Math.min(i,s):i,u=Math.max(0,a-r),c=o(u);r=Math.max(r,a),t({loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s?(s-a)/c:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})},n)},Mt=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ut=t=>(...e)=>J.asap(()=>t(...e)),kt=It.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,It.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0,Vt=It.hasStandardBrowserEnv?{write(t,e,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${t}=${encodeURIComponent(e)}`];J.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),J.isString(r)&&a.push(`path=${r}`),J.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),J.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const r=e[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===t)return decodeURIComponent(r.slice(o+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};var qt=/^https?:(?!\/\/)/i,zt=/[\t\n\r]/g;function Gt(t,e){if("string"==typeof t&&qt.test(function(t){return function(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}(t).replace(zt,"")}(t)))throw new ct('Invalid URL: missing "//" after protocol',ct.ERR_INVALID_URL,e)}function Wt(t,e,n,r){Gt(e,r);let o=!("string"==typeof(i=e)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return t&&(o||!1===n)?(Gt(t,r),function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e)):e}var Ht=t=>t instanceof at?{...t}:t;function Xt(t,e){e=e||{};const n=Object.create(null);function r(t,e,n,r){return J.isPlainObject(t)&&J.isPlainObject(e)?J.merge.call({caseless:r},t,e):J.isPlainObject(e)?J.merge({},e):J.isArray(e)?e.slice():e}function o(t,e,n,o){return J.isUndefined(e)?J.isUndefined(t)?void 0:r(void 0,t,0,o):r(t,e,0,o)}function i(t,e){if(!J.isUndefined(e))return r(void 0,e)}function s(t,e){return J.isUndefined(e)?J.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,o,i){return J.hasOwnProp(e,i)?r(n,o):J.hasOwnProp(t,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:a,headers:(t,e,n)=>o(Ht(t),Ht(e),0,!0)};return J.forEach(Object.keys({...t,...e}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=J.hasOwnProp(u,r)?u[r]:o,s=i(J.hasOwnProp(t,r)?t[r]:void 0,J.hasOwnProp(e,r)?e[r]:void 0,r);J.isUndefined(s)&&i!==a||(n[r]=s)}),J.hasOwnProp(e,"validateStatus")&&J.isUndefined(e.validateStatus)&&!1===function(n){const r=J.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!J.isUndefined(r)){if(!J.isPlainObject(r))return;if(J.hasOwnProp(r,n))return r[n]}const o=J.hasOwnProp(t,"transitional")?t.transitional:void 0;if(J.isPlainObject(o)&&J.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(J.hasOwnProp(t,"validateStatus")?n.validateStatus=r(void 0,t.validateStatus):delete n.validateStatus),n}var Kt=["content-type","content-length"];function Yt(t){const e=Xt({},t),n=t=>J.hasOwnProp(e,t)?e[t]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let a=n("headers");const u=n("auth"),c=n("baseURL"),l=n("allowAbsoluteUrls"),p=n("url");if(e.headers=a=at.from(a),e.url=bt(Wt(c,p,l,e),n("params"),n("paramsSerializer")),u){const t=J.getSafeProp(u,"username")||"",e=J.getSafeProp(u,"password")||"";a.set("Authorization","Basic "+btoa(t+":"+(e?encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))):"")))}if(J.isFormData(r)&&(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv||J.isReactNative(r)?a.setContentType(void 0):J.isFunction(r.getHeaders)&&function(t,e,n){"content-only"===n?Object.entries(e).forEach(([e,n])=>{Kt.includes(e.toLowerCase())&&t.set(e,n)}):t.set(e)}(a,r.getHeaders(),n("formDataHeaderPolicy"))),It.hasStandardBrowserEnv&&(J.isFunction(o)&&(o=o(e)),!0===o||null==o&&kt(e.url))){const t=i&&s&&Vt.read(s);t&&a.set(i,t)}return e}var $t="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise(function(e,n){const r=Yt(t);let o=r.data;const i=at.from(r.headers).normalize();let s,a,u,c,l,{responseType:p,onUploadProgress:h,onDownloadProgress:f}=r;function d(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const r=at.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());jt(function(t){e(t),d()},function(t){n(t),d()},{data:p&&"text"!==p&&"json"!==p?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&y.responseURL.startsWith("file:"))&&setTimeout(m)},y.onabort=function(){y&&(n(new ct("Request aborted",ct.ECONNABORTED,t,y)),d(),y=null)},y.onerror=function(e){const r=new ct(e&&e.message?e.message:"Network Error",ct.ERR_NETWORK,t,y);r.event=e||null,n(r),d(),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ot;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new ct(e,o.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,y)),d(),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&J.forEach(nt(i),function(t,e){y.setRequestHeader(e,t)}),J.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),p&&"json"!==p&&(y.responseType=r.responseType),f&&([u,l]=Bt(f,!0),y.addEventListener("progress",u)),h&&y.upload&&([a,c]=Bt(h),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=e=>{y&&(n(!e||e.type?new Ft(null,t,y):e),y.abort(),d(),y=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const g=function(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}(r.url);!g||It.protocols.includes(g)?y.send(o||null):n(new ct("Unsupported protocol "+g+":",ct.ERR_BAD_REQUEST,t))})},Jt=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let r=!1;const o=function(t){if(!r){r=!0,s();const e=t instanceof Error?t:this.reason;n.abort(e instanceof ct?e:new Ft(e instanceof Error?e.message:e))}};let i=e&&setTimeout(()=>{i=null,o(new ct(`timeout of ${e}ms exceeded`,ct.ETIMEDOUT))},e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)}),t=null)};t.forEach(t=>t.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>J.asap(s),a},Qt=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Zt=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},te=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of Zt(t))yield*Qt(n,e)}(t,e);let i,s=0,a=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return a(),void t.close();let i=r.byteLength;n&&n(s+=i),t.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:t=>(a(t),o.return())},{highWaterMark:2})},ee=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,ne=(t,e,n)=>e+2<n&&ee(t.charCodeAt(e+1))&&ee(t.charCodeAt(e+2));var{isFunction:re}=J,oe=t=>{if(!J.isString(t))return t;try{return decodeURIComponent(t)}catch(e){return t}},ie=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},se=t=>{const e=void 0!==J.global&&null!==J.global?J.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=J.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:o,Request:i,Response:s}=t,a=o?re(o):"function"==typeof fetch,u=re(i),c=re(s);if(!a)return!1;const l=a&&re(n),p=a&&("function"==typeof r?(h=new r,t=>h.encode(t)):async t=>new Uint8Array(await new i(t).arrayBuffer()));var h;const f=u&&l&&ie(()=>{let t=!1;const e=new i(It.origin,{body:new n,method:"POST",get duplex(){return t=!0,"half"}}),r=e.headers.has("Content-Type");return null!=e.body&&e.body.cancel(),t&&!r}),d=c&&l&&ie(()=>J.isReadableStream(new s("").body)),y={stream:d&&(t=>t.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!y[t]&&(y[t]=(e,n)=>{let r=e&&e[t];if(r)return r.call(e);throw new ct(`Response type '${t}' is not supported`,ct.ERR_NOT_SUPPORT,n)})});const m=async t=>null==t?0:J.isBlob(t)?t.size:J.isSpecCompliantForm(t)?(await new i(It.origin,{method:"POST",body:t}).arrayBuffer()).byteLength:J.isArrayBufferView(t)||J.isArrayBuffer(t)?t.byteLength:(J.isURLSearchParams(t)&&(t+=""),J.isString(t)?(await p(t)).byteLength:void 0);return async t=>{let{url:e,method:n,data:a,signal:c,cancelToken:p,timeout:h,onDownloadProgress:g,onUploadProgress:w,responseType:b,headers:E,withCredentials:O="same-origin",fetchOptions:T,maxContentLength:v,maxBodyLength:_}=Yt(t);const D=J.isNumber(v)&&v>-1,N=J.isNumber(_)&&_>-1;let A=o||fetch;b=b?(b+"").toLowerCase():"text";let I=Jt([c,p&&p.toAbortSignal()],h),P=null;const C=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let x,S=null;const R=()=>new ct("Request body larger than maxBodyLength limit",ct.ERR_BAD_REQUEST,t,P);try{let o;const c=(F="auth",J.hasOwnProp(t,F)?t[F]:void 0);if(c&&(o={username:J.getSafeProp(c,"username")||"",password:J.getSafeProp(c,"password")||""}),(t=>{const e=t.indexOf("://");let n=t;return-1!==e&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")})(e)){const t=new URL(e,It.origin);o||!t.username&&!t.password||(o={username:oe(t.username),password:oe(t.password)}),(t.username||t.password)&&(t.username="",t.password="",e=t.href)}if(o&&(E.delete("authorization"),E.set("Authorization","Basic "+btoa((L=(o.username||"")+":"+(o.password||""),encodeURIComponent(L).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))))),D&&"string"==typeof e&&e.startsWith("data:")&&function(t){if(!t||"string"!=typeof t)return 0;if(!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let t=r.length;const e=r.length;for(let a=0;a<e;a++)if(37===r.charCodeAt(a)&&a+2<e){const e=r.charCodeAt(a+1),n=r.charCodeAt(a+2);ee(e)&&ee(n)&&(t-=2,a+=2)}let n=0,o=e-1;const i=t=>t>=2&&37===r.charCodeAt(t-2)&&51===r.charCodeAt(t-1)&&(68===r.charCodeAt(t)||100===r.charCodeAt(t));o>=0&&(61===r.charCodeAt(o)?(n++,o--):i(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||i(o))&&n++;const s=3*Math.floor(t/4)-(n||0);return s>0?s:0}let o=0;for(let i=0,s=r.length;i<s;i++){const t=r.charCodeAt(i);if(37===t&&ne(r,i,s))o+=1,i+=2;else if(t<128)o+=1;else if(t<2048)o+=2;else if(t>=55296&&t<=56319&&i+1<s){const t=r.charCodeAt(i+1);t>=56320&&t<=57343?(o+=4,i++):o+=3}else o+=3}return o}(e)>v)throw new ct("maxContentLength size of "+v+" exceeded",ct.ERR_BAD_RESPONSE,t,P);if(N&&"get"!==n&&"head"!==n){const t=await m(a);if("number"==typeof t&&isFinite(t)&&(x=t,t>_))throw R()}const p=N&&(J.isReadableStream(a)||J.isStream(a)),h=(t,e,n)=>te(t,65536,t=>{if(N&&t>_)throw S=R();e&&e(t)},n);if(f&&"get"!==n&&"head"!==n&&(w||p)){if(x=null==x?await(async(t,e)=>{const n=J.toFiniteNumber(t.getContentLength());return null==n?m(e):n})(E,a):x,0!==x||p){let t,n=new i(e,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(t=n.headers.get("content-type"))&&E.setContentType(t),n.body){const[t,e]=w&&Mt(x,Bt(Ut(w)))||[];a=h(n.body,t,e)}}}else if(p&&!u&&l&&"get"!==n&&"head"!==n)a=h(a);else if(p&&u&&!f&&"get"!==n&&"head"!==n)throw new ct("Stream request bodies are not supported by the current fetch implementation",ct.ERR_NOT_SUPPORT,t,P);J.isString(O)||(O=O?"include":"omit");const j=u&&"credentials"in i.prototype;if(J.isFormData(a)){const t=E.getContentType();t&&/^multipart\/form-data/i.test(t)&&!/boundary=/i.test(t)&&E.delete("content-type")}E.set("User-Agent","axios/1.18.0",!1);const B={...T,signal:I,method:n.toUpperCase(),headers:nt(E.normalize()),body:a,duplex:"half",credentials:j?O:void 0};P=u&&new i(e,B);let M=await(u?A(P,T):A(e,B));const U=at.from(M.headers);if(D){const e=J.toFiniteNumber(U.getContentLength());if(null!=e&&e>v)throw new ct("maxContentLength size of "+v+" exceeded",ct.ERR_BAD_RESPONSE,t,P)}const k=d&&("stream"===b||"response"===b);if(d&&M.body&&(g||D||k&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=M[t]});const n=J.toFiniteNumber(U.getContentLength()),[r,o]=g&&Mt(n,Bt(Ut(g),!0))||[];let i=0;const a=e=>{if(D&&(i=e,i>v))throw new ct("maxContentLength size of "+v+" exceeded",ct.ERR_BAD_RESPONSE,t,P);r&&r(e)};M=new s(te(M.body,65536,a,()=>{o&&o(),C&&C()}),e)}b=b||"text";let V=await y[J.findKey(y,b)||"text"](M,t);if(D&&!d&&!k){let e;if(null!=V&&("number"==typeof V.byteLength?e=V.byteLength:"number"==typeof V.size?e=V.size:"string"==typeof V&&(e="function"==typeof r?(new r).encode(V).byteLength:V.length)),"number"==typeof e&&e>v)throw new ct("maxContentLength size of "+v+" exceeded",ct.ERR_BAD_RESPONSE,t,P)}return!k&&C&&C(),await new Promise((e,n)=>{jt(e,n,{data:V,headers:at.from(M.headers),status:M.status,statusText:M.statusText,config:t,request:P})})}catch(j){if(C&&C(),I&&I.aborted&&I.reason instanceof ct){const e=I.reason;throw e.config=t,P&&(e.request=P),j!==e&&(e.cause=j),e}if(S)throw P&&!S.request&&(S.request=P),S;if(j instanceof ct)throw P&&!j.request&&(j.request=P),j;if(j&&"TypeError"===j.name&&/Load failed|fetch/i.test(j.message))throw Object.assign(new ct("Network Error",ct.ERR_NETWORK,t,P,j&&j.response),{cause:j.cause||j});throw ct.from(j,j&&j.code,t,P,j&&j.response)}var L,F}},ae=new Map,ue=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:o}=e,i=[r,o,n];let s,a,u=i.length,c=ae;for(;u--;)s=i[u],a=c.get(s),void 0===a&&c.set(s,a=u?new Map:se(e)),c=a;return a};ue();var ce={http:null,xhr:$t,fetch:{get:ue}};J.forEach(ce,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch(n){}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var le=t=>`- ${t}`,pe=t=>J.isFunction(t)||null===t||!1===t;var he={getAdapter:function(t,e){t=J.isArray(t)?t:[t];const{length:n}=t;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=t[s],o=r,!pe(r)&&(o=ce[(n=String(r)).toLowerCase()],void 0===o))throw new ct(`Unknown adapter '${n}'`);if(o&&(J.isFunction(o)||(o=o.get(e))))break;i[n||"#"+s]=o}if(!o){const t=Object.entries(i).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));throw new ct("There is no suitable adapter to dispatch the request "+(n?t.length>1?"since :\n"+t.map(le).join("\n"):" "+le(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:ce};function fe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ft(null,t)}function de(t){return fe(t),t.headers=at.from(t.headers),t.data=Rt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),he.getAdapter(t.adapter||St.adapter,t)(t).then(function(e){fe(t),t.response=e;try{e.data=Rt.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=at.from(e.headers),e},function(e){if(!Lt(e)&&(fe(t),e&&e.response)){t.response=e.response;try{e.response.data=Rt.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=at.from(e.response.headers)}return Promise.reject(e)})}var ye={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ye[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var me={};ye.transitional=function(t,e,n){function r(t,e){return"[Axios v1.18.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ct(r(o," has been removed"+(e?" in "+e:"")),ct.ERR_DEPRECATED);return e&&!me[o]&&(me[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}},ye.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};var ge={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=Object.prototype.hasOwnProperty.call(e,i)?e[i]:void 0;if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new ct("option "+i+" must be "+n,ct.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ct("Unknown option "+i,ct.ERR_BAD_OPTION)}},validators:ye},we=ge.validators,be=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Et,response:new Et}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const e=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(n.stack){if(e){const t=e.indexOf("\n"),r=-1===t?-1:e.indexOf("\n",t+1),o=-1===r?"":e.slice(r+1);String(n.stack).endsWith(o)||(n.stack+="\n"+e)}}else n.stack=e}catch(r){}}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Xt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ge.assertOptions(n,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean),legacyInterceptorReqResOrdering:we.transitional(we.boolean),advertiseZstdAcceptEncoding:we.transitional(we.boolean),validateStatusUndefinedResolves:we.transitional(we.boolean)},!1),null!=r&&(J.isFunction(r)?e.paramsSerializer={serialize:r}:ge.assertOptions(r,{encode:we.function,serialize:we.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ge.assertOptions(e,{baseUrl:we.spelling("baseURL"),withXsrfToken:we.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&J.merge(o.common,o[e.method]);o&&J.forEach(["delete","get","head","post","put","patch","query","common"],t=>{delete o[t]}),e.headers=at.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(t){if("function"==typeof t.runWhen&&!1===t.runWhen(e))return;a=a&&t.synchronous;const n=e.transitional||Ot;n&&n.legacyInterceptorReqResOrdering?s.unshift(t.fulfilled,t.rejected):s.push(t.fulfilled,t.rejected)});const u=[];let c;this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)});let l,p=0;if(!a){const t=[de.bind(this),void 0];for(t.unshift(...s),t.push(...u),l=t.length,c=Promise.resolve(e);p<l;)c=c.then(t[p++],t[p++]);return c}l=s.length;let h=e;for(;p<l;){const t=s[p++],e=s[p++];try{h=t(h)}catch(f){e.call(this,f);break}}try{c=de.call(this,h)}catch(f){return Promise.reject(f)}for(p=0,l=u.length;p<l;)c=c.then(u[p++],u[p++]);return c}getUri(t){return bt(Wt((t=Xt(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls,t),t.params,t.paramsSerializer)}};J.forEach(["delete","get","head","options"],function(t){be.prototype[t]=function(e,n){return this.request(Xt(n||{},{method:t,url:e,data:n&&J.hasOwnProp(n,"data")?n.data:void 0}))}}),J.forEach(["post","put","patch","query"],function(t){function e(e){return function(n,r,o){return this.request(Xt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}be.prototype[t]=e(),"query"!==t&&(be.prototype[t+"Form"]=e(!0))});var Ee={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ee).forEach(([t,e])=>{Ee[e]=t});var Oe=function t(e){const r=new be(e),o=n(be.prototype.request,r);return J.extend(o,be.prototype,r,{allOwnKeys:!0}),J.extend(o,r,null,{allOwnKeys:!0}),o.create=function(n){return t(Xt(e,n))},o}(St);Oe.Axios=be,Oe.CanceledError=Ft,Oe.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(t){e=t});const n=this;this.promise.then(t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null}),this.promise.then=t=>{let e;const r=new Promise(t=>{n.subscribe(t),e=t}).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t(function(t,r,o){n.reason||(n.reason=new Ft(t,r,o),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t(function(t){e=t}),cancel:e}}},Oe.isCancel=Lt,Oe.VERSION="1.18.0",Oe.toFormData=dt,Oe.AxiosError=ct,Oe.Cancel=Oe.CanceledError,Oe.all=function(t){return Promise.all(t)},Oe.spread=function(t){return function(e){return t.apply(null,e)}},Oe.isAxiosError=function(t){return J.isObject(t)&&!0===t.isAxiosError},Oe.mergeConfig=Xt,Oe.AxiosHeaders=at,Oe.formToJSON=t=>Ct(J.isHTMLForm(t)?new FormData(t):t),Oe.getAdapter=he.getAdapter,Oe.HttpStatusCode=Ee,Oe.default=Oe,e.exports=Oe}),c=s((t,e)=>{var n=u();e.exports=function(t={method:"POST",url:"",headers:{},xml:"",timeout:1e4,proxy:{},maxBodyLength:1/0,maxContentLength:1/0,extraOpts:{}}){const{method:e,url:r,headers:o,xml:i,timeout:s,proxy:a,maxBodyLength:u,maxContentLength:c,extraOpts:l}=t;return n({method:e||"POST",url:r,headers:o,data:i,timeout:s,proxy:a,maxBodyLength:u,maxContentLength:c,...l}).then(t=>({response:{headers:t.headers,body:t.data,statusCode:t.status}}))}}),l=s(t=>{(function(){t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(t)}),p=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u=[].slice,c={}.hasOwnProperty;t=function(){var t,e,n,r,o,s=arguments[0];if(o=2<=arguments.length?u.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(t=0,n=o.length;t<n;t++)if(null!=(r=o[t]))for(e in r)c.call(r,e)&&(s[e]=r[e]);return s},i=function(t){return!!t&&"[object Function]"===Object.prototype.toString.call(t)},s=function(t){var e;return!!t&&("function"==(e=typeof t)||"object"===e)},r=function(t){return i(Array.isArray)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},o=function(t){var e;if(r(t))return!t.length;for(e in t)if(c.call(t,e))return!1;return!0},a=function(t){var e,n;return s(t)&&(n=Object.getPrototypeOf(t))&&(e=n.constructor)&&"function"==typeof e&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)},n=function(t){return i(t.valueOf)?t.valueOf():t},e.exports.assign=t,e.exports.isFunction=i,e.exports.isObject=s,e.exports.isArray=r,e.exports.isEmpty=o,e.exports.isPlainObject=a,e.exports.getValue=n}).call(t)}),h=s((t,e)=>{(function(){e.exports=function(){function t(){}return t.prototype.hasFeature=function(t,e){return!0},t.prototype.createDocumentType=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(t)}),f=s((t,e)=>{(function(){e.exports=function(){function t(){}return t.prototype.handleError=function(t){throw new Error(t)},t}()}).call(t)}),d=s((t,e)=>{(function(){e.exports=function(){function t(t){this.arr=t||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(t){return this.arr[t]||null},t.prototype.contains=function(t){return-1!==this.arr.indexOf(t)},t}()}).call(t)}),y=s((t,e)=>{(function(){var t=f(),n=d();e.exports=function(){function e(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new t,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new n(Object.keys(this.defaultParams))}}),e.prototype.getParameter=function(t){return this.params.hasOwnProperty(t)?this.params[t]:null},e.prototype.canSetParameter=function(t,e){return!0},e.prototype.setParameter=function(t,e){return null!=e?this.params[t]=e:delete this.params[t]},e}()}).call(t)}),m=s((t,e)=>{(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(t)}),g=s((t,e)=>{(function(){var t=m();F(),e.exports=function(){function e(e,n,r){if(this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==n)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(r),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"specified",{get:function(){return!0}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.attribute(this,this.options.writer.filterOptions(t))},e.prototype.debugInfo=function(t){return null==(t=t||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+t+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(t){return t.namespaceURI===this.namespaceURI&&(t.prefix===this.prefix&&(t.localName===this.localName&&t.value===this.value))},e}()}).call(t)}),w=s((t,e)=>{(function(){e.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(t){return this.nodes[t]},t.prototype.setNamedItem=function(t){var e=this.nodes[t.nodeName];return this.nodes[t.nodeName]=t,e||null},t.prototype.removeNamedItem=function(t){var e=this.nodes[t];return delete this.nodes[t],e||null},t.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},t.prototype.getNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(t)}),b=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u,c={}.hasOwnProperty;u=p(),a=u.isObject,s=u.isFunction,i=u.getValue,o=F(),t=m(),n=g(),r=w(),e.exports=function(e){function o(e,n,r){var i,s,a,u;if(o.__super__.constructor.call(this,e),null==n)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,null!=r&&this.attribute(r),e.type===t.Document&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this,e.children))for(s=0,a=(u=e.children).length;s<a;s++)if((i=u[s]).type===t.DocType){i.name=this.name;break}}return function(t,e){for(var n in e)c.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(o,e),Object.defineProperty(o.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(o.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(o.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(o.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(o.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new r(this.attribs)),this.attributeMap}}),o.prototype.clone=function(){var t,e,n,r=Object.create(this);for(e in r.isRoot&&(r.documentObject=null),r.attribs={},n=this.attribs)c.call(n,e)&&(t=n[e],r.attribs[e]=t.clone());return r.children=[],this.children.forEach(function(t){var e=t.clone();return e.parent=r,r.children.push(e)}),r},o.prototype.attribute=function(t,e){var r,o;if(null!=t&&(t=i(t)),a(t))for(r in t)c.call(t,r)&&(o=t[r],this.attribute(r,o));else s(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.attribs[t]=new n(this,t,""):null!=e&&(this.attribs[t]=new n(this,t,e));return this},o.prototype.removeAttribute=function(t){var e,n,r;if(null==t)throw new Error("Missing attribute name. "+this.debugInfo());if(t=i(t),Array.isArray(t))for(n=0,r=t.length;n<r;n++)e=t[n],delete this.attribs[e];else delete this.attribs[t];return this},o.prototype.toString=function(t){return this.options.writer.element(this,this.options.writer.filterOptions(t))},o.prototype.att=function(t,e){return this.attribute(t,e)},o.prototype.a=function(t,e){return this.attribute(t,e)},o.prototype.getAttribute=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t].value:null},o.prototype.setAttribute=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getAttributeNode=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t]:null},o.prototype.setAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.removeAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.setAttributeNS=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.removeAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getAttributeNodeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.setAttributeNodeNS=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.hasAttribute=function(t){return this.attribs.hasOwnProperty(t)},o.prototype.hasAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.setIdAttribute=function(t,e){return this.attribs.hasOwnProperty(t)?this.attribs[t].isId:e},o.prototype.setIdAttributeNS=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.setIdAttributeNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(t){var e,n,r;if(!o.__super__.isEqualNode.apply(this,arguments).isEqualNode(t))return!1;if(t.namespaceURI!==this.namespaceURI)return!1;if(t.prefix!==this.prefix)return!1;if(t.localName!==this.localName)return!1;if(t.attribs.length!==this.attribs.length)return!1;for(e=n=0,r=this.attribs.length-1;0<=r?n<=r:n>=r;e=0<=r?++n:--n)if(!this.attribs[e].isEqualNode(t.attribs[e]))return!1;return!0},o}(o)}).call(t)}),E=s((t,e)=>{(function(){var t,n={}.hasOwnProperty;t=F(),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.value=""}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.data===this.data},e}(t)}).call(t)}),O=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;t=m(),n=E(),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(r)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),T=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;t=m(),n=E(),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(r)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),v=s((t,e)=>{(function(){var t,n,r,o={}.hasOwnProperty;r=p().isObject,n=F(),t=m(),e.exports=function(e){function n(e,o,i,s){var a;n.__super__.constructor.call(this,e),r(o)&&(o=(a=o).version,i=a.encoding,s=a.standalone),o||(o="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(o),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,e),n.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),_=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;n=F(),t=m(),e.exports=function(e){function n(e,r,o,i,s,a){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==o)throw new Error("Missing DTD attribute name. "+this.debugInfo(r));if(!i)throw new Error("Missing DTD attribute type. "+this.debugInfo(r));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(r));if(0!==s.indexOf("#")&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r));if(a&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r));this.elementName=this.stringify.name(r),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(i),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=s}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),D=s((t,e)=>{(function(){var t,n,r,o={}.hasOwnProperty;r=p().isObject,n=F(),t=m(),e.exports=function(e){function n(e,o,i,s){if(n.__super__.constructor.call(this,e),null==i)throw new Error("Missing DTD entity name. "+this.debugInfo(i));if(null==s)throw new Error("Missing DTD entity value. "+this.debugInfo(i));if(this.pe=!!o,this.name=this.stringify.name(i),this.type=t.EntityDeclaration,r(s)){if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(i));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(i));if(this.internal=!1,null!=s.pubID&&(this.pubID=this.stringify.dtdPubID(s.pubID)),null!=s.sysID&&(this.sysID=this.stringify.dtdSysID(s.sysID)),null!=s.nData&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(i))}else this.value=this.stringify.dtdEntityValue(s),this.internal=!0}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,e),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return null}}),n.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),N=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;n=F(),t=m(),e.exports=function(e){function n(e,r,o){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.name(r),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),A=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;n=F(),t=m(),e.exports=function(e){function n(e,r,o){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=t.NotationDeclaration,null!=o.pubID&&(this.pubID=this.stringify.dtdPubID(o.pubID)),null!=o.sysID&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),n.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),I=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u,c={}.hasOwnProperty;u=p().isObject,a=F(),t=m(),n=_(),o=D(),r=N(),i=A(),s=w(),e.exports=function(e){function a(e,n,r){var o,i,s,c,l,p;if(a.__super__.constructor.call(this,e),this.type=t.DocType,e.children)for(i=0,s=(c=e.children).length;i<s;i++)if((o=c[i]).type===t.Element){this.name=o.name;break}this.documentObject=e,u(n)&&(n=(l=n).pubID,r=l.sysID),null==r&&(r=(p=[n,r])[0],n=p[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return function(t,e){for(var n in e)c.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(a,e),Object.defineProperty(a.prototype,"entities",{get:function(){var e,n,r,o={},i=this.children;for(n=0,r=i.length;n<r;n++)(e=i[n]).type!==t.EntityDeclaration||e.pe||(o[e.name]=e);return new s(o)}}),Object.defineProperty(a.prototype,"notations",{get:function(){var e,n,r,o={},i=this.children;for(n=0,r=i.length;n<r;n++)(e=i[n]).type===t.NotationDeclaration&&(o[e.name]=e);return new s(o)}}),Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),a.prototype.element=function(t,e){var n=new r(this,t,e);return this.children.push(n),this},a.prototype.attList=function(t,e,r,o,i){var s=new n(this,t,e,r,o,i);return this.children.push(s),this},a.prototype.entity=function(t,e){var n=new o(this,!1,t,e);return this.children.push(n),this},a.prototype.pEntity=function(t,e){var n=new o(this,!0,t,e);return this.children.push(n),this},a.prototype.notation=function(t,e){var n=new i(this,t,e);return this.children.push(n),this},a.prototype.toString=function(t){return this.options.writer.docType(this,this.options.writer.filterOptions(t))},a.prototype.ele=function(t,e){return this.element(t,e)},a.prototype.att=function(t,e,n,r,o){return this.attList(t,e,n,r,o)},a.prototype.ent=function(t,e){return this.entity(t,e)},a.prototype.pent=function(t,e){return this.pEntity(t,e)},a.prototype.not=function(t,e){return this.notation(t,e)},a.prototype.up=function(){return this.root()||this.documentObject},a.prototype.isEqualNode=function(t){return!!a.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&(t.name===this.name&&(t.publicId===this.publicId&&t.systemId===this.systemId))},a}(a)}).call(t)}),P=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;t=m(),n=F(),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(r)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},n}(n)}).call(t)}),C=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;t=m(),n=E(),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(r)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),Object.defineProperty(n.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"wholeText",{get:function(){var t,e,n="";for(e=this.previousSibling;e;)n=e.data+n,e=e.previousSibling;for(n+=this.data,t=this.nextSibling;t;)n+=t.data,t=t.nextSibling;return n}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},n.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n}(n)}).call(t)}),x=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;t=m(),n=E(),e.exports=function(e){function n(e,r,o){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,o&&(this.value=this.stringify.insValue(o))}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},n.prototype.isEqualNode=function(t){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.target===this.target},n}(n)}).call(t)}),S=s((t,e)=>{(function(){var t,n,r={}.hasOwnProperty;n=F(),t=m(),e.exports=function(e){function n(e){n.__super__.constructor.call(this,e),this.type=t.Dummy}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return""},n}(n)}).call(t)}),R=s((t,e)=>{(function(){e.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(t){return this.nodes[t]||null},t}()}).call(t)}),L=s((t,e)=>{(function(){e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(t)}),F=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u,c,l,h,f,d,y,g,E,_,D={}.hasOwnProperty;_=p(),E=_.isObject,g=_.isFunction,y=_.isEmpty,d=_.getValue,u=null,r=null,o=null,i=null,s=null,h=null,f=null,l=null,a=null,n=null,c=null,t=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,u||(u=b(),r=O(),o=T(),i=v(),s=I(),h=P(),f=C(),l=x(),a=S(),n=m(),c=R(),w(),t=L())}return Object.defineProperty(e.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new c(this.children)),this.childNodeList}}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){var t=this.parent.children.indexOf(this);return this.parent.children[t-1]||null}}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){var t=this.parent.children.indexOf(this);return this.parent.children[t+1]||null}}),Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,r,o,i;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(i="",e=0,r=(o=this.children).length;e<r;e++)(t=o[e]).textContent&&(i+=t.textContent);return i}return null},set:function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.setParent=function(t){var e,n,r,o,i;for(this.parent=t,t&&(this.options=t.options,this.stringify=t.stringify),i=[],n=0,r=(o=this.children).length;n<r;n++)e=o[n],i.push(e.setParent(this));return i},e.prototype.element=function(t,e,n){var r,o,i,s,a,u,c,l,p,h,f=null;if(null===e&&null==n&&(e=(l=[{},null])[0],n=l[1]),null==e&&(e={}),e=d(e),E(e)||(n=(p=[e,n])[0],e=p[1]),null!=t&&(t=d(t)),Array.isArray(t))for(i=0,u=t.length;i<u;i++)o=t[i],f=this.element(o);else if(g(t))f=this.element(t.apply());else if(E(t)){for(a in t)if(D.call(t,a))if(h=t[a],g(h)&&(h=h.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))f=this.attribute(a.substr(this.stringify.convertAttKey.length),h);else if(!this.options.separateArrayItems&&Array.isArray(h)&&y(h))f=this.dummy();else if(E(h)&&y(h))f=this.element(a);else if(this.options.keepNullNodes||null!=h)if(!this.options.separateArrayItems&&Array.isArray(h))for(s=0,c=h.length;s<c;s++)o=h[s],(r={})[a]=o,f=this.element(r);else E(h)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?f=this.element(h):(f=this.element(a)).element(h):f=this.element(a,h);else f=this.dummy()}else f=this.options.keepNullNodes||null!==n?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===t.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===t.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===t.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===t.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===t.indexOf(this.stringify.convertPIKey)?this.instruction(t.substr(this.stringify.convertPIKey.length),n):this.node(t,e,n):this.dummy();if(null==f)throw new Error("Could not create any elements with: "+t+". "+this.debugInfo());return f},e.prototype.insertBefore=function(t,e,n){var r,o,i,s,a;if(null!=t?t.type:void 0)return s=e,(i=t).setParent(this),s?(o=children.indexOf(s),a=children.splice(o),children.push(i),Array.prototype.push.apply(children,a)):children.push(i),i;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return o=this.parent.children.indexOf(this),a=this.parent.children.splice(o),r=this.parent.element(t,e,n),Array.prototype.push.apply(this.parent.children,a),r},e.prototype.insertAfter=function(t,e,n){var r,o,i;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return o=this.parent.children.indexOf(this),i=this.parent.children.splice(o+1),r=this.parent.element(t,e,n),Array.prototype.push.apply(this.parent.children,i),r},e.prototype.remove=function(){var t;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return t=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[t,t-t+1].concat([])),this.parent},e.prototype.node=function(t,e,n){var r,o;return null!=t&&(t=d(t)),e||(e={}),e=d(e),E(e)||(n=(o=[e,n])[0],e=o[1]),r=new u(this,t,e),null!=n&&r.text(n),this.children.push(r),r},e.prototype.text=function(t){var e;return E(t)&&this.element(t),e=new f(this,t),this.children.push(e),this},e.prototype.cdata=function(t){var e=new r(this,t);return this.children.push(e),this},e.prototype.comment=function(t){var e=new o(this,t);return this.children.push(e),this},e.prototype.commentBefore=function(t){var e=this.parent.children.indexOf(this),n=this.parent.children.splice(e);return this.parent.comment(t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.commentAfter=function(t){var e=this.parent.children.indexOf(this),n=this.parent.children.splice(e+1);return this.parent.comment(t),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.raw=function(t){var e=new h(this,t);return this.children.push(e),this},e.prototype.dummy=function(){return new a(this)},e.prototype.instruction=function(t,e){var n,r,o,i,s;if(null!=t&&(t=d(t)),null!=e&&(e=d(e)),Array.isArray(t))for(i=0,s=t.length;i<s;i++)n=t[i],this.instruction(n);else if(E(t))for(n in t)D.call(t,n)&&(r=t[n],this.instruction(n,r));else g(e)&&(e=e.apply()),o=new l(this,t,e),this.children.push(o);return this},e.prototype.instructionBefore=function(t,e){var n=this.parent.children.indexOf(this),r=this.parent.children.splice(n);return this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.instructionAfter=function(t,e){var n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1);return this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.declaration=function(t,e,r){var o=this.document(),s=new i(o,t,e,r);return 0===o.children.length?o.children.unshift(s):o.children[0].type===n.Declaration?o.children[0]=s:o.children.unshift(s),o.root()||o},e.prototype.dtd=function(t,e){var r,o,i,a,u,c,l=this.document(),p=new s(l,t,e),h=l.children;for(r=o=0,a=h.length;o<a;r=++o)if(h[r].type===n.DocType)return l.children[r]=p,p;for(r=i=0,u=(c=l.children).length;i<u;r=++i)if(c[r].isRoot)return l.children.splice(r,0,p),p;return l.children.push(p),p},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){for(var t=this;t;){if(t.type===n.Document)return t.rootObject;if(t.isRoot)return t;t=t.parent}},e.prototype.document=function(){for(var t=this;t;){if(t.type===n.Document)return t;t=t.parent}},e.prototype.end=function(t){return this.document().end(t)},e.prototype.prev=function(){var t=this.parent.children.indexOf(this);if(t<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[t-1]},e.prototype.next=function(){var t=this.parent.children.indexOf(this);if(-1===t||t===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[t+1]},e.prototype.importDocument=function(t){var e=t.root().clone();return e.parent=this,e.isRoot=!1,this.children.push(e),this},e.prototype.debugInfo=function(t){var e,n;return null!=(t=t||this.name)||(null!=(e=this.parent)?e.name:void 0)?null==t?"parent: <"+this.parent.name+">":(null!=(n=this.parent)?n.name:void 0)?"node: <"+t+">, parent: <"+this.parent.name+">":"node: <"+t+">":""},e.prototype.ele=function(t,e,n){return this.element(t,e,n)},e.prototype.nod=function(t,e,n){return this.node(t,e,n)},e.prototype.txt=function(t){return this.text(t)},e.prototype.dat=function(t){return this.cdata(t)},e.prototype.com=function(t){return this.comment(t)},e.prototype.ins=function(t,e){return this.instruction(t,e)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},e.prototype.e=function(t,e,n){return this.element(t,e,n)},e.prototype.n=function(t,e,n){return this.node(t,e,n)},e.prototype.t=function(t){return this.text(t)},e.prototype.d=function(t){return this.cdata(t)},e.prototype.c=function(t){return this.comment(t)},e.prototype.r=function(t){return this.raw(t)},e.prototype.i=function(t,e){return this.instruction(t,e)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(t){return this.importDocument(t)},e.prototype.replaceChild=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasChildNodes=function(){return 0!==this.children.length},e.prototype.cloneNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isSupported=function(t,e){return!0},e.prototype.hasAttributes=function(){return 0!==this.attribs.length},e.prototype.compareDocumentPosition=function(e){var n,r=this;return r===e?0:this.document()!==e.document()?(n=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?n|=t.Preceding:n|=t.Following,n):r.isAncestor(e)?t.Contains|t.Preceding:r.isDescendant(e)?t.Contains|t.Following:r.isPreceding(e)?t.Preceding:t.Following},e.prototype.isSameNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupPrefix=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isDefaultNamespace=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupNamespaceURI=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){var e,n,r;if(t.nodeType!==this.nodeType)return!1;if(t.children.length!==this.children.length)return!1;for(e=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;e=0<=r?++n:--n)if(!this.children[e].isEqualNode(t.children[e]))return!1;return!0},e.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setUserData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getUserData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.contains=function(t){return!!t&&(t===this||this.isDescendant(t))},e.prototype.isDescendant=function(t){var e,n,r,o=this.children;for(n=0,r=o.length;n<r;n++){if(t===(e=o[n]))return!0;if(e.isDescendant(t))return!0}return!1},e.prototype.isAncestor=function(t){return t.isDescendant(this)},e.prototype.isPreceding=function(t){var e=this.treePosition(t),n=this.treePosition(this);return-1!==e&&-1!==n&&e<n},e.prototype.isFollowing=function(t){var e=this.treePosition(t),n=this.treePosition(this);return-1!==e&&-1!==n&&e>n},e.prototype.treePosition=function(t){var e,n=0;return e=!1,this.foreachTreeNode(this.document(),function(r){if(n++,!e&&r===t)return e=!0}),e?n:-1},e.prototype.foreachTreeNode=function(t,e){var n,r,o,i,s;for(t||(t=this.document()),r=0,o=(i=t.children).length;r<o;r++){if(s=e(n=i[r]))return s;if(s=this.foreachTreeNode(n,e))return s}},e}()}).call(t)}),j=s((t,e)=>{(function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty;e.exports=function(){function e(e){var r,o,i;for(r in this.assertLegalName=t(this.assertLegalName,this),this.assertLegalChar=t(this.assertLegalChar,this),e||(e={}),this.options=e,this.options.version||(this.options.version="1.0"),o=e.stringify||{})n.call(o,r)&&(i=o[r],this[r]=i)}return e.prototype.name=function(t){return this.options.noValidation?t:this.assertLegalName(""+t||"")},e.prototype.text=function(t){return this.options.noValidation?t:this.assertLegalChar(this.textEscape(""+t||""))},e.prototype.cdata=function(t){return this.options.noValidation?t:(t=(t=""+t||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(t))},e.prototype.comment=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)},e.prototype.raw=function(t){return this.options.noValidation?t:""+t||""},e.prototype.attValue=function(t){return this.options.noValidation?t:this.assertLegalChar(this.attEscape(t=""+t||""))},e.prototype.insTarget=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.insValue=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return this.assertLegalChar(t)},e.prototype.xmlVersion=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t},e.prototype.xmlEncoding=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return this.assertLegalChar(t)},e.prototype.xmlStandalone=function(t){return this.options.noValidation?t:t?"yes":"no"},e.prototype.dtdPubID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdSysID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdElementValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdAttType=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdAttDefault=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdEntityValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.dtdNData=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(t){var e,n;if(this.options.noValidation)return t;if(e="","1.0"===this.options.version){if(e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e))throw new Error("Invalid character in string: "+t+" at index "+n.index)}else if("1.1"===this.options.version&&(e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e)))throw new Error("Invalid character in string: "+t+" at index "+n.index);return t},e.prototype.assertLegalName=function(t){var e;if(this.options.noValidation)return t;if(this.assertLegalChar(t),e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!t.match(e))throw new Error("Invalid character in name");return t},e.prototype.textEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},e.prototype.attEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},e}()}).call(t)}),B=s((t,e)=>{(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(t)}),M=s((t,e)=>{(function(){var t,n,r,o={}.hasOwnProperty;r=p().assign,t=m(),v(),I(),O(),T(),b(),P(),C(),x(),S(),_(),N(),D(),A(),n=B(),e.exports=function(){function e(t){var e,n,r;for(e in t||(t={}),this.options=t,n=t.writer||{})o.call(n,e)&&(r=n[e],this["_"+e]=this[e],this[e]=r)}return e.prototype.filterOptions=function(t){var e,o,i,s,a,u,c,l;return t||(t={}),t=r({},this.options,t),(e={writer:this}).pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=null!=(o=t.indent)?o:" ",e.newline=null!=(i=t.newline)?i:"\n",e.offset=null!=(s=t.offset)?s:0,e.dontPrettyTextNodes=null!=(a=null!=(u=t.dontPrettyTextNodes)?u:t.dontprettytextnodes)?a:0,e.spaceBeforeSlash=null!=(c=null!=(l=t.spaceBeforeSlash)?l:t.spacebeforeslash)?c:"",!0===e.spaceBeforeSlash&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=n.None,e},e.prototype.indent=function(t,e,n){var r;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(r=(n||0)+e.offset+1)>0?new Array(r).join(e.indent):""},e.prototype.endline=function(t,e,n){return!e.pretty||e.suppressPrettyCount?"":e.newline},e.prototype.attribute=function(t,e,n){var r;return this.openAttribute(t,e,n),r=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,n),r},e.prototype.cdata=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<![CDATA[",e.state=n.InsideTag,o+=t.value,e.state=n.CloseTag,o+="]]>"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.comment=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"\x3c!-- ",e.state=n.InsideTag,o+=t.value,e.state=n.CloseTag,o+=" --\x3e"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.declaration=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<?xml",e.state=n.InsideTag,o+=' version="'+t.version+'"',null!=t.encoding&&(o+=' encoding="'+t.encoding+'"'),null!=t.standalone&&(o+=' standalone="'+t.standalone+'"'),e.state=n.CloseTag,o+=e.spaceBeforeSlash+"?>",o+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.docType=function(t,e,r){var o,i,s,a,u;if(r||(r=0),this.openNode(t,e,r),e.state=n.OpenTag,a=this.indent(t,e,r),a+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?a+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(a+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(a+=" [",a+=this.endline(t,e,r),e.state=n.InsideTag,i=0,s=(u=t.children).length;i<s;i++)o=u[i],a+=this.writeChildNode(o,e,r+1);e.state=n.CloseTag,a+="]"}return e.state=n.CloseTag,a+=e.spaceBeforeSlash+">",a+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),a},e.prototype.element=function(e,r,i){var s,a,u,c,l,p,h,f,d,y,m,g,w,b;for(d in i||(i=0),y=!1,m="",this.openNode(e,r,i),r.state=n.OpenTag,m+=this.indent(e,r,i)+"<"+e.name,g=e.attribs)o.call(g,d)&&(s=g[d],m+=this.attribute(s,r,i));if(c=0===(u=e.children.length)?null:e.children[0],0===u||e.children.every(function(e){return(e.type===t.Text||e.type===t.Raw)&&""===e.value}))r.allowEmpty?(m+=">",r.state=n.CloseTag,m+="</"+e.name+">"+this.endline(e,r,i)):(r.state=n.CloseTag,m+=r.spaceBeforeSlash+"/>"+this.endline(e,r,i));else if(!r.pretty||1!==u||c.type!==t.Text&&c.type!==t.Raw||null==c.value){if(r.dontPrettyTextNodes)for(l=0,h=(w=e.children).length;l<h;l++)if(((a=w[l]).type===t.Text||a.type===t.Raw)&&null!=a.value){r.suppressPrettyCount++,y=!0;break}for(m+=">"+this.endline(e,r,i),r.state=n.InsideTag,p=0,f=(b=e.children).length;p<f;p++)a=b[p],m+=this.writeChildNode(a,r,i+1);r.state=n.CloseTag,m+=this.indent(e,r,i)+"</"+e.name+">",y&&r.suppressPrettyCount--,m+=this.endline(e,r,i),r.state=n.None}else m+=">",r.state=n.InsideTag,r.suppressPrettyCount++,y=!0,m+=this.writeChildNode(c,r,i+1),r.suppressPrettyCount--,y=!1,r.state=n.CloseTag,m+="</"+e.name+">"+this.endline(e,r,i);return this.closeNode(e,r,i),m},e.prototype.writeChildNode=function(e,n,r){switch(e.type){case t.CData:return this.cdata(e,n,r);case t.Comment:return this.comment(e,n,r);case t.Element:return this.element(e,n,r);case t.Raw:return this.raw(e,n,r);case t.Text:return this.text(e,n,r);case t.ProcessingInstruction:return this.processingInstruction(e,n,r);case t.Dummy:return"";case t.Declaration:return this.declaration(e,n,r);case t.DocType:return this.docType(e,n,r);case t.AttributeDeclaration:return this.dtdAttList(e,n,r);case t.ElementDeclaration:return this.dtdElement(e,n,r);case t.EntityDeclaration:return this.dtdEntity(e,n,r);case t.NotationDeclaration:return this.dtdNotation(e,n,r);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<?",e.state=n.InsideTag,o+=t.target,t.value&&(o+=" "+t.value),e.state=n.CloseTag,o+=e.spaceBeforeSlash+"?>",o+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.raw=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r),e.state=n.InsideTag,o+=t.value,e.state=n.CloseTag,o+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.text=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r),e.state=n.InsideTag,o+=t.value,e.state=n.CloseTag,o+=this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.dtdAttList=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<!ATTLIST",e.state=n.InsideTag,o+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,"#DEFAULT"!==t.defaultValueType&&(o+=" "+t.defaultValueType),t.defaultValue&&(o+=' "'+t.defaultValue+'"'),e.state=n.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.dtdElement=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<!ELEMENT",e.state=n.InsideTag,o+=" "+t.name+" "+t.value,e.state=n.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.dtdEntity=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<!ENTITY",e.state=n.InsideTag,t.pe&&(o+=" %"),o+=" "+t.name,t.value?o+=' "'+t.value+'"':(t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),t.nData&&(o+=" NDATA "+t.nData)),e.state=n.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.dtdNotation=function(t,e,r){var o;return this.openNode(t,e,r),e.state=n.OpenTag,o=this.indent(t,e,r)+"<!NOTATION",e.state=n.InsideTag,o+=" "+t.name,t.pubID&&t.sysID?o+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?o+=' PUBLIC "'+t.pubID+'"':t.sysID&&(o+=' SYSTEM "'+t.sysID+'"'),e.state=n.CloseTag,o+=e.spaceBeforeSlash+">"+this.endline(t,e,r),e.state=n.None,this.closeNode(t,e,r),o},e.prototype.openNode=function(t,e,n){},e.prototype.closeNode=function(t,e,n){},e.prototype.openAttribute=function(t,e,n){},e.prototype.closeAttribute=function(t,e,n){},e}()}).call(t)}),U=s((t,e)=>{(function(){var t,n={}.hasOwnProperty;t=M(),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function o(){this.constructor=t}o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype}(e,t),e.prototype.document=function(t,e){var n,r,o,i,s;for(e=this.filterOptions(e),i="",r=0,o=(s=t.children).length;r<o;r++)n=s[r],i+=this.writeChildNode(n,e,0);return e.pretty&&i.slice(-e.newline.length)===e.newline&&(i=i.slice(0,-e.newline.length)),i},e}(t)}).call(t)}),k=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u={}.hasOwnProperty;a=p().isPlainObject,r=h(),n=y(),o=F(),t=m(),s=j(),i=U(),e.exports=function(e){function o(e){o.__super__.constructor.call(this,null),this.name="#document",this.type=t.Document,this.documentURI=null,this.domConfig=new n,e||(e={}),e.writer||(e.writer=new i),this.options=e,this.stringify=new s(e)}return function(t,e){for(var n in e)u.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(o,e),Object.defineProperty(o.prototype,"implementation",{value:new r}),Object.defineProperty(o.prototype,"doctype",{get:function(){var e,n,r,o=this.children;for(n=0,r=o.length;n<r;n++)if((e=o[n]).type===t.DocType)return e;return null}}),Object.defineProperty(o.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(o.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(o.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration?this.children[0].encoding:null}}),Object.defineProperty(o.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(o.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===t.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(o.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(o.prototype,"origin",{get:function(){return null}}),Object.defineProperty(o.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(o.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(o.prototype,"contentType",{get:function(){return null}}),o.prototype.end=function(t){var e={};return t?a(t)&&(e=t,t=this.options.writer):t=this.options.writer,t.document(this,t.filterOptions(e))},o.prototype.toString=function(t){return this.options.writer.document(this,this.options.writer.filterOptions(t))},o.prototype.createElement=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createTextNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createComment=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createCDATASection=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createProcessingInstruction=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createAttribute=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createEntityReference=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.importNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createElementNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementById=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.adoptNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.renameNode=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createEvent=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createNodeIterator=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.createTreeWalker=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},o}(o)}).call(t)}),V=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u,c,l,h,f,d,y,w,E,S,R,L,F,M,V,q,z={}.hasOwnProperty;q=p(),M=q.isObject,F=q.isFunction,V=q.isPlainObject,L=q.getValue,t=m(),f=k(),d=b(),o=O(),i=T(),w=P(),R=C(),y=x(),l=v(),h=I(),s=_(),u=D(),a=N(),c=A(),r=g(),S=j(),E=U(),n=B(),e.exports=function(){function e(e,n,r){var o;this.name="?xml",this.type=t.Document,e||(e={}),o={},e.writer?V(e.writer)&&(o=e.writer,e.writer=new E):e.writer=new E,this.options=e,this.writer=e.writer,this.writerOptions=this.writer.filterOptions(o),this.stringify=new S(e),this.onDataCallback=n||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.createChildNode=function(e){var n,r,o,i,s,a,u,c;switch(e.type){case t.CData:this.cdata(e.value);break;case t.Comment:this.comment(e.value);break;case t.Element:for(r in o={},u=e.attribs)z.call(u,r)&&(n=u[r],o[r]=n.value);this.node(e.name,o);break;case t.Dummy:this.dummy();break;case t.Raw:this.raw(e.value);break;case t.Text:this.text(e.value);break;case t.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}for(s=0,a=(c=e.children).length;s<a;s++)i=c[s],this.createChildNode(i),i.type===t.Element&&this.up();return this},e.prototype.dummy=function(){return this},e.prototype.node=function(t,e,n){var r;if(null==t)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(t));return this.openCurrent(),t=L(t),null==e&&(e={}),e=L(e),M(e)||(n=(r=[e,n])[0],e=r[1]),this.currentNode=new d(this,t,e),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,n,r){var o,i,s,a,u,c;if(this.currentNode&&this.currentNode.type===t.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(e)||M(e)||F(e))for(a=this.options.noValidation,this.options.noValidation=!0,(c=new f(this.options).element("TEMP_ROOT")).element(e),this.options.noValidation=a,i=0,s=(u=c.children).length;i<s;i++)o=u[i],this.createChildNode(o),o.type===t.Element&&this.up();else this.node(e,n,r);return this},e.prototype.attribute=function(t,e){var n,o;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(t));if(null!=t&&(t=L(t)),M(t))for(n in t)z.call(t,n)&&(o=t[n],this.attribute(n,o));else F(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.currentNode.attribs[t]=new r(this,t,""):null!=e&&(this.currentNode.attribs[t]=new r(this,t,e));return this},e.prototype.text=function(t){var e;return this.openCurrent(),e=new R(this,t),this.onData(this.writer.text(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.cdata=function(t){var e;return this.openCurrent(),e=new o(this,t),this.onData(this.writer.cdata(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.comment=function(t){var e;return this.openCurrent(),e=new i(this,t),this.onData(this.writer.comment(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.raw=function(t){var e;return this.openCurrent(),e=new w(this,t),this.onData(this.writer.raw(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.instruction=function(t,e){var n,r,o,i,s;if(this.openCurrent(),null!=t&&(t=L(t)),null!=e&&(e=L(e)),Array.isArray(t))for(n=0,i=t.length;n<i;n++)r=t[n],this.instruction(r);else if(M(t))for(r in t)z.call(t,r)&&(o=t[r],this.instruction(r,o));else F(e)&&(e=e.apply()),s=new y(this,t,e),this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},e.prototype.declaration=function(t,e,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return r=new l(this,t,e,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.doctype=function(t,e,n){if(this.openCurrent(),null==t)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new h(this,e,n),this.currentNode.rootNodeName=t,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(t,e){var n;return this.openCurrent(),n=new a(this,t,e),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.attList=function(t,e,n,r,o){var i;return this.openCurrent(),i=new s(this,t,e,n,r,o),this.onData(this.writer.dtdAttList(i,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.entity=function(t,e){var n;return this.openCurrent(),n=new u(this,!1,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.pEntity=function(t,e){var n;return this.openCurrent(),n=new u(this,!0,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.notation=function(t,e){var n;return this.openCurrent(),n=new c(this,t,e),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},e.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){var r,o,i,s;if(!e.isOpen){if(this.root||0!==this.currentLevel||e.type!==t.Element||(this.root=e),o="",e.type===t.Element){for(i in this.writerOptions.state=n.OpenTag,o=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name,s=e.attribs)z.call(s,i)&&(r=s[i],o+=this.writer.attribute(r,this.writerOptions,this.currentLevel));o+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=n.InsideTag}else this.writerOptions.state=n.OpenTag,o=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?o+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(o+=' SYSTEM "'+e.sysID+'"'),e.children?(o+=" [",this.writerOptions.state=n.InsideTag):(this.writerOptions.state=n.CloseTag,o+=">"),o+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(o,this.currentLevel),e.isOpen=!0}},e.prototype.closeNode=function(e){var r;if(!e.isClosed)return r="",this.writerOptions.state=n.CloseTag,r=e.type===t.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=n.None,this.onData(r,this.currentLevel),e.isClosed=!0},e.prototype.onData=function(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.debugInfo=function(t){return null==t?"":"node: <"+t+">"},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(t,e,n){return this.node(t,e,n)},e.prototype.txt=function(t){return this.text(t)},e.prototype.dat=function(t){return this.cdata(t)},e.prototype.com=function(t){return this.comment(t)},e.prototype.ins=function(t,e){return this.instruction(t,e)},e.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},e.prototype.dtd=function(t,e,n){return this.doctype(t,e,n)},e.prototype.e=function(t,e,n){return this.element(t,e,n)},e.prototype.n=function(t,e,n){return this.node(t,e,n)},e.prototype.t=function(t){return this.text(t)},e.prototype.d=function(t){return this.cdata(t)},e.prototype.c=function(t){return this.comment(t)},e.prototype.r=function(t){return this.raw(t)},e.prototype.i=function(t,e){return this.instruction(t,e)},e.prototype.att=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode.type===t.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(t,e){return this.entity(t,e)},e.prototype.pent=function(t,e){return this.pEntity(t,e)},e.prototype.not=function(t,e){return this.notation(t,e)},e}()}).call(t)}),q=s((t,e)=>{(function(){var t,n,r,o={}.hasOwnProperty;t=m(),r=M(),n=B(),e.exports=function(e){function r(t,e){this.stream=t,r.__super__.constructor.call(this,e)}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(r,e),r.prototype.endline=function(t,e,o){return t.isLastRootNode&&e.state===n.CloseTag?"":r.__super__.endline.call(this,t,e,o)},r.prototype.document=function(t,e){var n,r,o,i,s,a,u,c,l=t.children;for(r=o=0,s=l.length;o<s;r=++o)(n=l[r]).isLastRootNode=r===t.children.length-1;for(e=this.filterOptions(e),c=[],i=0,a=(u=t.children).length;i<a;i++)n=u[i],c.push(this.writeChildNode(n,e,0));return c},r.prototype.attribute=function(t,e,n){return this.stream.write(r.__super__.attribute.call(this,t,e,n))},r.prototype.cdata=function(t,e,n){return this.stream.write(r.__super__.cdata.call(this,t,e,n))},r.prototype.comment=function(t,e,n){return this.stream.write(r.__super__.comment.call(this,t,e,n))},r.prototype.declaration=function(t,e,n){return this.stream.write(r.__super__.declaration.call(this,t,e,n))},r.prototype.docType=function(t,e,r){var o,i,s,a;if(r||(r=0),this.openNode(t,e,r),e.state=n.OpenTag,this.stream.write(this.indent(t,e,r)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,e,r)),e.state=n.InsideTag,i=0,s=(a=t.children).length;i<s;i++)o=a[i],this.writeChildNode(o,e,r+1);e.state=n.CloseTag,this.stream.write("]")}return e.state=n.CloseTag,this.stream.write(e.spaceBeforeSlash+">"),this.stream.write(this.endline(t,e,r)),e.state=n.None,this.closeNode(t,e,r)},r.prototype.element=function(e,r,i){var s,a,u,c,l,p,h,f,d;for(h in i||(i=0),this.openNode(e,r,i),r.state=n.OpenTag,this.stream.write(this.indent(e,r,i)+"<"+e.name),f=e.attribs)o.call(f,h)&&(s=f[h],this.attribute(s,r,i));if(c=0===(u=e.children.length)?null:e.children[0],0===u||e.children.every(function(e){return(e.type===t.Text||e.type===t.Raw)&&""===e.value}))r.allowEmpty?(this.stream.write(">"),r.state=n.CloseTag,this.stream.write("</"+e.name+">")):(r.state=n.CloseTag,this.stream.write(r.spaceBeforeSlash+"/>"));else if(!r.pretty||1!==u||c.type!==t.Text&&c.type!==t.Raw||null==c.value){for(this.stream.write(">"+this.endline(e,r,i)),r.state=n.InsideTag,l=0,p=(d=e.children).length;l<p;l++)a=d[l],this.writeChildNode(a,r,i+1);r.state=n.CloseTag,this.stream.write(this.indent(e,r,i)+"</"+e.name+">")}else this.stream.write(">"),r.state=n.InsideTag,r.suppressPrettyCount++,this.writeChildNode(c,r,i+1),r.suppressPrettyCount--,r.state=n.CloseTag,this.stream.write("</"+e.name+">");return this.stream.write(this.endline(e,r,i)),r.state=n.None,this.closeNode(e,r,i)},r.prototype.processingInstruction=function(t,e,n){return this.stream.write(r.__super__.processingInstruction.call(this,t,e,n))},r.prototype.raw=function(t,e,n){return this.stream.write(r.__super__.raw.call(this,t,e,n))},r.prototype.text=function(t,e,n){return this.stream.write(r.__super__.text.call(this,t,e,n))},r.prototype.dtdAttList=function(t,e,n){return this.stream.write(r.__super__.dtdAttList.call(this,t,e,n))},r.prototype.dtdElement=function(t,e,n){return this.stream.write(r.__super__.dtdElement.call(this,t,e,n))},r.prototype.dtdEntity=function(t,e,n){return this.stream.write(r.__super__.dtdEntity.call(this,t,e,n))},r.prototype.dtdNotation=function(t,e,n){return this.stream.write(r.__super__.dtdNotation.call(this,t,e,n))},r}(r)}).call(t)}),z=s((t,e)=>{(function(){var t,n,r,o,i,s,a,u,c,l=p();u=l.assign,c=l.isFunction,r=h(),o=k(),i=V(),a=U(),s=q(),t=m(),n=B(),e.exports.create=function(t,e,n,r){var i,s;if(null==t)throw new Error("Root element needs a name.");return r=u({},e,n,r),s=(i=new o(r)).element(t),r.headless||(i.declaration(r),null==r.pubID&&null==r.sysID||i.dtd(r)),s},e.exports.begin=function(t,e,n){var r;return c(t)&&(e=(r=[t,e])[0],n=r[1],t={}),e?new i(t,e,n):new o(t)},e.exports.stringWriter=function(t){return new a(t)},e.exports.streamWriter=function(t,e){return new s(t,e)},e.exports.implementation=new r,e.exports.nodeType=t,e.exports.writerState=n}).call(t)}),G=s(t=>{(function(){"use strict";var e,n,r,o,i,s={}.hasOwnProperty;e=z(),n=l().defaults,o=function(t){return"string"==typeof t&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},i=function(t){return"<![CDATA["+r(t)+"]]>"},r=function(t){return t.replace("]]>","]]]]><![CDATA[>")},t.Builder=function(){function t(t){var e,r,o;for(e in this.options={},r=n[.2])s.call(r,e)&&(o=r[e],this.options[e]=o);for(e in t)s.call(t,e)&&(o=t[e],this.options[e]=o)}return t.prototype.buildObject=function(t){var r,a,u,c,l=this.options.attrkey,p=this.options.charkey;return 1===Object.keys(t).length&&this.options.rootName===n[.2].rootName?t=t[u=Object.keys(t)[0]]:u=this.options.rootName,c=this,r=function(t,e){var n,a,u,h,f,d;if("object"!=typeof e)c.options.cdata&&o(e)?t.raw(i(e)):t.txt(e);else if(Array.isArray(e)){for(h in e)if(s.call(e,h))for(f in a=e[h])u=a[f],t=r(t.ele(f),u).up()}else for(f in e)if(s.call(e,f))if(a=e[f],f===l){if("object"==typeof a)for(n in a)d=a[n],t=t.att(n,d)}else if(f===p)t=c.options.cdata&&o(a)?t.raw(i(a)):t.txt(a);else if(Array.isArray(a))for(h in a)s.call(a,h)&&(t="string"==typeof(u=a[h])?c.options.cdata&&o(u)?t.ele(f).raw(i(u)).up():t.ele(f,u).up():r(t.ele(f),u).up());else"object"==typeof a?t=r(t.ele(f),a).up():"string"==typeof a&&c.options.cdata&&o(a)?t=t.ele(f).raw(i(a)).up():(null==a&&(a=""),t=t.ele(f,a.toString()).up());return t},a=e.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),r(a,t).end(this.options.renderOpts)},t}()}).call(t)}),W=s((t,e)=>{e.exports={}}),H=s(t=>{!function(t){t.parser=function(t,e){return new r(t,e)},t.SAXParser=r,t.SAXStream=i,t.createStream=function(t,e){return new i(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(e,o){if(!(this instanceof r))return new r(e,o);var i=this;!function(t){for(var e=0,r=n.length;e<r;e++)t[n[e]]=""}(i),i.q=i.c="",i.bufferCheckPosition=t.MAX_BUFFER_LENGTH,i.encoding=null,i.opt=o||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.opt.maxEntityCount=i.opt.maxEntityCount||512,i.opt.maxEntityDepth=i.opt.maxEntityDepth||4,i.entityCount=i.entityDepth=0,i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=v.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(l)),void 0===i.opt.unquotedAttributeValues&&(i.opt.unquotedAttributeValues=!e),i.trackPosition=!1!==i.opt.position,i.trackPosition&&(i.position=i.line=i.column=0),D(i,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),r.prototype={end:function(){S(this)},write:function(e){var r=this;if(this.error)throw this.error;if(r.closed)return x(r,"Cannot write after close. Assign an onready handler.");if(null===e)return S(r);"object"==typeof e&&(e=e.toString());var o=0,i="";for(;i=V(e,o++),r.c=i,i;)switch(r.trackPosition&&(r.position++,"\n"===i?(r.line++,r.column=0):r.column++),r.state){case v.BEGIN:if(r.state=v.BEGIN_WHITESPACE,"\ufeff"===i)continue;k(r,i);continue;case v.BEGIN_WHITESPACE:k(r,i);continue;case v.TEXT:if(r.sawRoot&&!r.closedRoot){for(var u=o-1;i&&"<"!==i&&"&"!==i;)(i=V(e,o++))&&r.trackPosition&&(r.position++,"\n"===i?(r.line++,r.column=0):r.column++);r.textNode+=e.substring(u,o-1)}"<"!==i||r.sawRoot&&r.closedRoot&&!r.strict?(y(i)||r.sawRoot&&!r.closedRoot||R(r,"Text data outside of root node."),"&"===i?r.state=v.TEXT_ENTITY:r.textNode+=i):(r.state=v.OPEN_WAKA,r.startTagPosition=r.position);continue;case v.SCRIPT:"<"===i?r.state=v.SCRIPT_ENDING:r.script+=i;continue;case v.SCRIPT_ENDING:"/"===i?r.state=v.CLOSE_TAG:(r.script+="<"+i,r.state=v.SCRIPT);continue;case v.OPEN_WAKA:if("!"===i)r.state=v.SGML_DECL,r.sgmlDecl="";else if(y(i));else if(w(p,i))r.state=v.OPEN_TAG,r.tagName=i;else if("/"===i)r.state=v.CLOSE_TAG,r.tagName="";else if("?"===i)r.state=v.PROC_INST,r.procInstName=r.procInstBody="";else{if(R(r,"Unencoded <"),r.startTagPosition+1<r.position){var c=r.position-r.startTagPosition;i=new Array(c).join(" ")+i}r.textNode+="<"+i,r.state=v.TEXT}continue;case v.SGML_DECL:if(r.sgmlDecl+i==="--"){r.state=v.COMMENT,r.comment="",r.sgmlDecl="";continue}r.doctype&&!0!==r.doctype&&r.sgmlDecl?(r.state=v.DOCTYPE_DTD,r.doctype+="<!"+r.sgmlDecl+i,r.sgmlDecl=""):(r.sgmlDecl+i).toUpperCase()===s?(I(r,"onopencdata"),r.state=v.CDATA,r.sgmlDecl="",r.cdata=""):(r.sgmlDecl+i).toUpperCase()===a?(r.state=v.DOCTYPE,(r.doctype||r.sawRoot)&&R(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===i?(I(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=v.TEXT):m(i)?(r.state=v.SGML_DECL_QUOTED,r.sgmlDecl+=i):r.sgmlDecl+=i;continue;case v.SGML_DECL_QUOTED:i===r.q&&(r.state=v.SGML_DECL,r.q=""),r.sgmlDecl+=i;continue;case v.DOCTYPE:">"===i?(r.state=v.TEXT,I(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=i,"["===i?r.state=v.DOCTYPE_DTD:m(i)&&(r.state=v.DOCTYPE_QUOTED,r.q=i));continue;case v.DOCTYPE_QUOTED:r.doctype+=i,i===r.q&&(r.q="",r.state=v.DOCTYPE);continue;case v.DOCTYPE_DTD:"]"===i?(r.doctype+=i,r.state=v.DOCTYPE):"<"===i?(r.state=v.OPEN_WAKA,r.startTagPosition=r.position):m(i)?(r.doctype+=i,r.state=v.DOCTYPE_DTD_QUOTED,r.q=i):r.doctype+=i;continue;case v.DOCTYPE_DTD_QUOTED:r.doctype+=i,i===r.q&&(r.state=v.DOCTYPE_DTD,r.q="");continue;case v.COMMENT:"-"===i?r.state=v.COMMENT_ENDING:r.comment+=i;continue;case v.COMMENT_ENDING:"-"===i?(r.state=v.COMMENT_ENDED,r.comment=C(r.opt,r.comment),r.comment&&I(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+i,r.state=v.COMMENT);continue;case v.COMMENT_ENDED:">"!==i?(R(r,"Malformed comment"),r.comment+="--"+i,r.state=v.COMMENT):r.doctype&&!0!==r.doctype?r.state=v.DOCTYPE_DTD:r.state=v.TEXT;continue;case v.CDATA:for(u=o-1;i&&"]"!==i;)(i=V(e,o++))&&r.trackPosition&&(r.position++,"\n"===i?(r.line++,r.column=0):r.column++);r.cdata+=e.substring(u,o-1),"]"===i&&(r.state=v.CDATA_ENDING);continue;case v.CDATA_ENDING:"]"===i?r.state=v.CDATA_ENDING_2:(r.cdata+="]"+i,r.state=v.CDATA);continue;case v.CDATA_ENDING_2:">"===i?(r.cdata&&I(r,"oncdata",r.cdata),I(r,"onclosecdata"),r.cdata="",r.state=v.TEXT):"]"===i?r.cdata+="]":(r.cdata+="]]"+i,r.state=v.CDATA);continue;case v.PROC_INST:"?"===i?r.state=v.PROC_INST_ENDING:y(i)?r.state=v.PROC_INST_BODY:r.procInstName+=i;continue;case v.PROC_INST_BODY:if(!r.procInstBody&&y(i))continue;"?"===i?r.state=v.PROC_INST_ENDING:r.procInstBody+=i;continue;case v.PROC_INST_ENDING:if(">"===i){const t={name:r.procInstName,body:r.procInstBody};A(r,t),I(r,"onprocessinginstruction",t),r.procInstName=r.procInstBody="",r.state=v.TEXT}else r.procInstBody+="?"+i,r.state=v.PROC_INST_BODY;continue;case v.OPEN_TAG:w(h,i)?r.tagName+=i:(L(r),">"===i?B(r):"/"===i?r.state=v.OPEN_TAG_SLASH:(y(i)||R(r,"Invalid character in tag name"),r.state=v.ATTRIB));continue;case v.OPEN_TAG_SLASH:">"===i?(B(r,!0),M(r)):(R(r,"Forward-slash in opening tag not followed by >"),r.state=v.ATTRIB);continue;case v.ATTRIB:if(y(i))continue;">"===i?B(r):"/"===i?r.state=v.OPEN_TAG_SLASH:w(p,i)?(r.attribName=i,r.attribValue="",r.state=v.ATTRIB_NAME):R(r,"Invalid attribute name");continue;case v.ATTRIB_NAME:"="===i?r.state=v.ATTRIB_VALUE:">"===i?(R(r,"Attribute without value"),r.attribValue=r.attribName,j(r),B(r)):y(i)?r.state=v.ATTRIB_NAME_SAW_WHITE:w(h,i)?r.attribName+=i:R(r,"Invalid attribute name");continue;case v.ATTRIB_NAME_SAW_WHITE:if("="===i)r.state=v.ATTRIB_VALUE;else{if(y(i))continue;R(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",I(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===i?B(r):w(p,i)?(r.attribName=i,r.state=v.ATTRIB_NAME):(R(r,"Invalid attribute name"),r.state=v.ATTRIB)}continue;case v.ATTRIB_VALUE:if(y(i))continue;m(i)?(r.q=i,r.state=v.ATTRIB_VALUE_QUOTED):(r.opt.unquotedAttributeValues||x(r,"Unquoted attribute value"),r.state=v.ATTRIB_VALUE_UNQUOTED,r.attribValue=i);continue;case v.ATTRIB_VALUE_QUOTED:if(i!==r.q){"&"===i?r.state=v.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=i;continue}j(r),r.q="",r.state=v.ATTRIB_VALUE_CLOSED;continue;case v.ATTRIB_VALUE_CLOSED:y(i)?r.state=v.ATTRIB:">"===i?B(r):"/"===i?r.state=v.OPEN_TAG_SLASH:w(p,i)?(R(r,"No whitespace between attributes"),r.attribName=i,r.attribValue="",r.state=v.ATTRIB_NAME):R(r,"Invalid attribute name");continue;case v.ATTRIB_VALUE_UNQUOTED:if(!g(i)){"&"===i?r.state=v.ATTRIB_VALUE_ENTITY_U:r.attribValue+=i;continue}j(r),">"===i?B(r):r.state=v.ATTRIB;continue;case v.CLOSE_TAG:if(r.tagName)">"===i?M(r):w(h,i)?r.tagName+=i:r.script?(r.script+="</"+r.tagName+i,r.tagName="",r.state=v.SCRIPT):(y(i)||R(r,"Invalid tagname in closing tag"),r.state=v.CLOSE_TAG_SAW_WHITE);else{if(y(i))continue;b(p,i)?r.script?(r.script+="</"+i,r.state=v.SCRIPT):R(r,"Invalid tagname in closing tag."):r.tagName=i}continue;case v.CLOSE_TAG_SAW_WHITE:if(y(i))continue;">"===i?M(r):R(r,"Invalid characters in closing tag");continue;case v.TEXT_ENTITY:case v.ATTRIB_VALUE_ENTITY_Q:case v.ATTRIB_VALUE_ENTITY_U:var l,E;switch(r.state){case v.TEXT_ENTITY:l=v.TEXT,E="textNode";break;case v.ATTRIB_VALUE_ENTITY_Q:l=v.ATTRIB_VALUE_QUOTED,E="attribValue";break;case v.ATTRIB_VALUE_ENTITY_U:l=v.ATTRIB_VALUE_UNQUOTED,E="attribValue"}if(";"===i){var O=U(r);r.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(O)?((r.entityCount+=1)>r.opt.maxEntityCount&&x(r,"Parsed entity count exceeds max entity count"),(r.entityDepth+=1)>r.opt.maxEntityDepth&&x(r,"Parsed entity depth exceeds max entity depth"),r.entity="",r.state=l,r.write(O),r.entityDepth-=1):(r[E]+=O,r.entity="",r.state=l)}else w(r.entity.length?d:f,i)?r.entity+=i:(R(r,"Invalid character in entity name"),r[E]+="&"+r.entity+i,r.entity="",r.state=l);continue;default:throw new Error(r,"Unknown state: "+r.state)}r.position>=r.bufferCheckPosition&&function(e){for(var r=Math.max(t.MAX_BUFFER_LENGTH,10),o=0,i=0,s=n.length;i<s;i++){var a=e[n[i]].length;if(a>r)switch(n[i]){case"textNode":P(e);break;case"cdata":I(e,"oncdata",e.cdata),e.cdata="";break;case"script":I(e,"onscript",e.script),e.script="";break;default:x(e,"Max buffer length exceeded: "+n[i])}o=Math.max(o,a)}e.bufferCheckPosition=t.MAX_BUFFER_LENGTH-o+e.position}(r);return r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;P(t=this),""!==t.cdata&&(I(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(I(t,"onscript",t.script),t.script="")}};try{e=W().Stream}catch(q){e=function(){}}e||(e=function(){});var o=t.EVENTS.filter(function(t){return"error"!==t&&"end"!==t});function i(t,n){if(!(this instanceof i))return new i(t,n);e.apply(this),this._parser=new r(t,n),this.writable=!0,this.readable=!0;var s=this;this._parser.onend=function(){s.emit("end")},this._parser.onerror=function(t){s.emit("error",t),s._parser.error=null},this._decoder=null,this._decoderBuffer=null,o.forEach(function(t){Object.defineProperty(s,"on"+t,{get:function(){return s._parser["on"+t]},set:function(e){if(!e)return s.removeAllListeners(t),s._parser["on"+t]=e,e;s.on(t,e)},enumerable:!0,configurable:!1})})}i.prototype=Object.create(e.prototype,{constructor:{value:i}}),i.prototype._decodeBuffer=function(t,e){if(this._decoderBuffer&&(t=Buffer.concat([this._decoderBuffer,t]),this._decoderBuffer=null),!this._decoder){var n=function(t,e){if(t.length>=2){if(255===t[0]&&254===t[1])return"utf-16le";if(254===t[0]&&255===t[1])return"utf-16be"}return t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]?"utf8":t.length>=4?60===t[0]&&0===t[1]&&63===t[2]&&0===t[3]?"utf-16le":0===t[0]&&60===t[1]&&0===t[2]&&63===t[3]?"utf-16be":"utf8":e?"utf8":null}(t,e);if(!n)return this._decoderBuffer=t,"";this._parser.encoding=n,this._decoder=new TextDecoder(n)}return this._decoder.decode(t,{stream:!e})},i.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t))t=this._decodeBuffer(t,!1);else if(this._decoderBuffer){var e=this._decodeBuffer(Buffer.alloc(0),!0);e&&(this._parser.write(e),this.emit("data",e))}return this._parser.write(t.toString()),this.emit("data",t),!0},i.prototype.end=function(t){if(t&&t.length&&this.write(t),this._decoderBuffer){var e=this._decodeBuffer(Buffer.alloc(0),!0);e&&(this._parser.write(e),this.emit("data",e))}else if(this._decoder){var n=this._decoder.decode();n&&(this._parser.write(n),this.emit("data",n))}return this._parser.end(),!0},i.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===o.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var s="[CDATA[",a="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/2000/xmlns/",l={xml:u,xmlns:c},p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function m(t){return'"'===t||"'"===t}function g(t){return">"===t||y(t)}function w(t,e){return t.test(e)}function b(t,e){return!w(t,e)}var E,O,T,v=0;for(var _ in t.STATE={BEGIN:v++,BEGIN_WHITESPACE:v++,TEXT:v++,TEXT_ENTITY:v++,OPEN_WAKA:v++,SGML_DECL:v++,SGML_DECL_QUOTED:v++,DOCTYPE:v++,DOCTYPE_QUOTED:v++,DOCTYPE_DTD:v++,DOCTYPE_DTD_QUOTED:v++,COMMENT_STARTING:v++,COMMENT:v++,COMMENT_ENDING:v++,COMMENT_ENDED:v++,CDATA:v++,CDATA_ENDING:v++,CDATA_ENDING_2:v++,PROC_INST:v++,PROC_INST_BODY:v++,PROC_INST_ENDING:v++,OPEN_TAG:v++,OPEN_TAG_SLASH:v++,ATTRIB:v++,ATTRIB_NAME:v++,ATTRIB_NAME_SAW_WHITE:v++,ATTRIB_VALUE:v++,ATTRIB_VALUE_QUOTED:v++,ATTRIB_VALUE_CLOSED:v++,ATTRIB_VALUE_UNQUOTED:v++,ATTRIB_VALUE_ENTITY_Q:v++,ATTRIB_VALUE_ENTITY_U:v++,CLOSE_TAG:v++,CLOSE_TAG_SAW_WHITE:v++,SCRIPT:v++,SCRIPT_ENDING:v++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r}),t.STATE)t.STATE[t.STATE[_]]=_;function D(t,e,n){t[e]&&t[e](n)}function N(t){return t?t.toLowerCase().replace(/[^a-z0-9]/g,""):null}function A(t,e){if(t.strict&&t.encoding&&e&&"xml"===e.name){var n,r,o=(n=e.body,(r=n&&n.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i))?r[2]:null);o&&!function(t,e){const n=N(t),r=N(e);return!n||!r||("utf16"===r?"utf16le"===n||"utf16be"===n:n===r)}(t.encoding,o)&&R(t,"XML declaration encoding "+o+" does not match detected stream encoding "+t.encoding.toUpperCase())}}function I(t,e,n){t.textNode&&P(t),D(t,e,n)}function P(t){t.textNode=C(t.opt,t.textNode),t.textNode&&D(t,"ontext",t.textNode),t.textNode=""}function C(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function x(t,e){return P(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,D(t,"onerror",e),t}function S(t){return t.sawRoot&&!t.closedRoot&&R(t,"Unclosed root tag"),t.state!==v.BEGIN&&t.state!==v.BEGIN_WHITESPACE&&t.state!==v.TEXT&&x(t,"Unexpected end"),P(t),t.c="",t.closed=!0,D(t,"onend"),r.call(t,t.strict,t.opt),t}function R(t,e){if("object"!=typeof t||!(t instanceof r))throw new Error("bad call to strictFail");t.strict&&x(t,e)}function L(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,I(t,"onopentagstart",n)}function F(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],o=n[1];return e&&"xmlns"===t&&(r="xmlns",o=""),{prefix:r,local:o}}function j(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=F(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==u)R(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==c)R(t,"xmlns: prefix must be bound to "+c+"\nActual: "+t.attribValue);else{var o=t.tag,i=t.tags[t.tags.length-1]||t;o.ns===i.ns&&(o.ns=Object.create(i.ns)),o.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,I(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function B(t,e){if(t.opt.xmlns){var n=t.tag,r=F(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(R(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var o=t.tags[t.tags.length-1]||t;n.ns&&o.ns!==n.ns&&Object.keys(n.ns).forEach(function(e){I(t,"onopennamespace",{prefix:e,uri:n.ns[e]})});for(var i=0,s=t.attribList.length;i<s;i++){var a=t.attribList[i],u=a[0],c=a[1],l=F(u,!0),p=l.prefix,h=l.local,f=""===p?"":n.ns[p]||"",d={name:u,value:c,prefix:p,local:h,uri:f};p&&"xmlns"!==p&&!f&&(R(t,"Unbound namespace prefix: "+JSON.stringify(p)),d.uri=p),t.tag.attributes[u]=d,I(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),I(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=v.TEXT:t.state=v.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function M(t){if(!t.tagName)return R(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=v.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=v.SCRIPT);I(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)R(t,"Unexpected close tag");if(e<0)return R(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=v.TEXT);t.tagName=n;for(var o=t.tags.length;o-- >e;){var i=t.tag=t.tags.pop();t.tagName=t.tag.name,I(t,"onclosetag",t.tagName);var s={};for(var a in i.ns)s[a]=i.ns[a];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&i.ns!==u.ns&&Object.keys(i.ns).forEach(function(e){var n=i.ns[e];I(t,"onclosenamespace",{prefix:e,uri:n})})}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=v.TEXT}function U(t){var e,n=t.entity,r=n.toLowerCase(),o="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||o.toLowerCase()!==n||e<0||e>1114111?(R(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function k(t,e){"<"===e?(t.state=v.OPEN_WAKA,t.startTagPosition=t.position):y(e)||(R(t,"Non-whitespace before first tag."),t.textNode=e,t.state=v.TEXT)}function V(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}v=t.STATE,String.fromCodePoint||(E=String.fromCharCode,O=Math.floor,T=function(){var t,e,n=[],r=-1,o=arguments.length;if(!o)return"";for(var i="";++r<o;){var s=Number(arguments[r]);if(!isFinite(s)||s<0||s>1114111||O(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?n.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,n.push(t,e)),(r+1===o||n.length>16384)&&(i+=E.apply(null,n),n.length=0)}return i},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(void 0===t?t.sax={}:t)}),X=s((t,e)=>{var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(t,e){return new Promise(function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}m(t,e,i,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n)}(t,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var o,i,s,a;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),s=i[e]),void 0===s)s=i[e]=n,++t._eventsCount;else if("function"==typeof s?s=i[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=c(t))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function f(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):y(o,o.length)}function d(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function o(i){r.once&&t.removeEventListener(e,o),n(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)o(l[n],this,e)}return!0},s.prototype.addListener=function(t,e){return l(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return l(this,t,e,!0)},s.prototype.once=function(t,e){return u(e),this.on(t,h(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,h(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,o,i,s;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r=this._events;if(void 0===r)return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return f(this,t,!0)},s.prototype.rawListeners=function(t){return f(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}),K=s(t=>{(function(){"use strict";t.stripBOM=function(t){return"\ufeff"===t[0]?t.substring(1):t}}).call(t)}),Y=s(t=>{(function(){"use strict";var e=new RegExp(/(?!xmlns)^.*:/);t.normalize=function(t){return t.toLowerCase()},t.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t.stripPrefix=function(t){return t.replace(e,"")},t.parseNumbers=function(t){return isNaN(t)||(t=t%1==0?parseInt(t,10):parseFloat(t)),t},t.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t="true"===t.toLowerCase()),t}}).call(t)}),$=s(t=>{(function(){"use strict";var e,n,r,o,i,s,a,u,c,p=function(t,e){return function(){return t.apply(e,arguments)}},h={}.hasOwnProperty;u=H(),o=X(),e=K(),a=Y(),c=W().setImmediate,n=l().defaults,i=function(t){return"object"==typeof t&&null!=t&&0===Object.keys(t).length},s=function(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)e=(0,t[r])(e,n);return e},r=function(t,e,n){var r=Object.create(null);return r.value=n,r.writable=!0,r.enumerable=!0,r.configurable=!0,Object.defineProperty(t,e,r)},t.Parser=function(o){function l(e){var r,o,i;if(this.parseStringPromise=p(this.parseStringPromise,this),this.parseString=p(this.parseString,this),this.reset=p(this.reset,this),this.assignOrPush=p(this.assignOrPush,this),this.processAsync=p(this.processAsync,this),!(this instanceof t.Parser))return new t.Parser(e);for(r in this.options={},o=n[.2])h.call(o,r)&&(i=o[r],this.options[r]=i);for(r in e)h.call(e,r)&&(i=e[r],this.options[r]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return function(t,e){for(var n in e)h.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(l,o),l.prototype.processAsync=function(){var t,e;try{return this.remaining.length<=this.options.chunkSize?(t=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(t),this.saxParser.close()):(t=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(t),c(this.processAsync))}catch(n){if(e=n,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(e)}},l.prototype.assignOrPush=function(t,e,n){return e in t?(t[e]instanceof Array||r(t,e,[t[e]]),t[e].push(n)):this.options.explicitArray?r(t,e,[n]):r(t,e,n)},l.prototype.reset=function(){var t,e,n,o,a;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(a=this,function(t){if(a.saxParser.resume(),!a.saxParser.errThrown)return a.saxParser.errThrown=!0,a.emit("error",t)}),this.saxParser.onend=function(t){return function(){if(!t.saxParser.ended)return t.saxParser.ended=!0,t.emit("end",t.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,o=[],t=this.options.attrkey,e=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var a,u,c,l,p={};if(p[e]="",!n.options.ignoreAttrs)for(a in l=i.attributes)h.call(l,a)&&(t in p||n.options.mergeAttrs||(p[t]={}),u=n.options.attrValueProcessors?s(n.options.attrValueProcessors,i.attributes[a],a):i.attributes[a],c=n.options.attrNameProcessors?s(n.options.attrNameProcessors,a):a,n.options.mergeAttrs?n.assignOrPush(p,c,u):r(p[t],c,u));return p["#name"]=n.options.tagNameProcessors?s(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(p[n.options.xmlnskey]={uri:i.uri,local:i.local}),o.push(p)}}(this),this.saxParser.onclosetag=function(t){return function(){var n,a,u,c,l,p,f,d,y,m=o.pop();if(l=m["#name"],t.options.explicitChildren&&t.options.preserveChildrenOrder||delete m["#name"],!0===m.cdata&&(n=m.cdata,delete m.cdata),d=o[o.length-1],m[e].match(/^\s*$/)&&!n?(a=m[e],delete m[e]):(t.options.trim&&(m[e]=m[e].trim()),t.options.normalize&&(m[e]=m[e].replace(/\s{2,}/g," ").trim()),m[e]=t.options.valueProcessors?s(t.options.valueProcessors,m[e],l):m[e],1===Object.keys(m).length&&e in m&&!t.EXPLICIT_CHARKEY&&(m=m[e])),i(m)&&(m="function"==typeof t.options.emptyTag?t.options.emptyTag():""!==t.options.emptyTag?t.options.emptyTag:a),null!=t.options.validator&&(y="/"+function(){var t,e,n=[];for(t=0,e=o.length;t<e;t++)c=o[t],n.push(c["#name"]);return n}().concat(l).join("/"),function(){var e;try{return m=t.options.validator(y,d&&d[l],m)}catch(n){return e=n,t.emit("error",e)}}()),t.options.explicitChildren&&!t.options.mergeAttrs&&"object"==typeof m)if(t.options.preserveChildrenOrder){if(d){for(u in d[t.options.childkey]=d[t.options.childkey]||[],p={},m)h.call(m,u)&&r(p,u,m[u]);d[t.options.childkey].push(p),delete m["#name"],1===Object.keys(m).length&&e in m&&!t.EXPLICIT_CHARKEY&&(m=m[e])}}else c={},t.options.attrkey in m&&(c[t.options.attrkey]=m[t.options.attrkey],delete m[t.options.attrkey]),!t.options.charsAsChildren&&t.options.charkey in m&&(c[t.options.charkey]=m[t.options.charkey],delete m[t.options.charkey]),Object.getOwnPropertyNames(m).length>0&&(c[t.options.childkey]=m),m=c;return o.length>0?t.assignOrPush(d,l,m):(t.options.explicitRoot&&(f=m,r(m={},l,f)),t.resultObject=m,t.saxParser.ended=!0,t.emit("end",t.resultObject))}}(this),n=function(t){return function(n){var r,i=o[o.length-1];if(i)return i[e]+=n,t.options.explicitChildren&&t.options.preserveChildrenOrder&&t.options.charsAsChildren&&(t.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(i[t.options.childkey]=i[t.options.childkey]||[],(r={"#name":"__text__"})[e]=n,t.options.normalize&&(r[e]=r[e].replace(/\s{2,}/g," ").trim()),i[t.options.childkey].push(r)),i}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(t){var e=n(t);if(e)return e.cdata=!0}},l.prototype.parseString=function(t,n){var r;null!=n&&"function"==typeof n&&(this.on("end",function(t){return this.reset(),n(null,t)}),this.on("error",function(t){return this.reset(),n(t)}));try{return""===(t=t.toString()).trim()?(this.emit("end",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,c(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(o){if(r=o,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},l.prototype.parseStringPromise=function(t){return new Promise((e=this,function(n,r){return e.parseString(t,function(t,e){return t?r(t):n(e)})}));var e},l}(o),t.parseString=function(e,n,r){var o,i;return null!=r?("function"==typeof r&&(o=r),"object"==typeof n&&(i=n)):("function"==typeof n&&(o=n),i={}),new t.Parser(i).parseString(e,o)},t.parseStringPromise=function(e,n){var r;return"object"==typeof n&&(r=n),new t.Parser(r).parseStringPromise(e)}}).call(t)}),J=s(t=>{(function(){"use strict";var e,n,r,o,i={}.hasOwnProperty;n=l(),e=G(),r=$(),o=Y(),t.defaults=n.defaults,t.processors=o,t.ValidationError=function(){function t(t){this.message=t}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(t,Error),t}(),t.Builder=e.Builder,t.Parser=r.Parser,t.parseString=r.parseString,t.parseStringPromise=r.parseStringPromise}).call(t)}),Q=a(c(),1),Z=J(),tt={explicitArray:!1,ignoreAttrs:!0,trim:!0,tagNameProcessors:[Z.processors.stripPrefix]};function et(t){if(null==t)return t;if(Array.isArray(t)){const e=t.map(et);return 1===e.length?e[0]:e}if("string"==typeof t)return function(t){const e=t.trim();return"true"===e||"false"!==e&&(/^-?\d+$/.test(e)||/^-?\d+\.\d+$/.test(e)?Number(e):t)}(t);if("object"!=typeof t)return t;const e=t,n={};for(const[r,o]of Object.entries(e)){if("$"===r||"_"===r)continue;n[r.includes(":")?r.split(":").pop()??r:r]=et(o)}return n}var nt={type:"datasource",metadata:{},schema:{docs:"https://www.npmjs.com/package/soap#clientmethodasyncargs-options---call-method-on-the-soap-service",friendlyName:"SuperSOAP",type:"API",description:"Performs a basic SOAP call to a web service",datasource:{url:{type:"string",required:!0}},query:{create:{type:"fields",readable:!0,fields:{soapAction:{type:"string",required:!1,display:"SOAP Action"},body:{type:"json",required:!1}}},update:{type:"fields",readable:!0,fields:{soapAction:{type:"string",required:!1,display:"SOAP Action"},body:{type:"json",required:!1}}},read:{type:"fields",readable:!0,fields:{soapAction:{type:"string",required:!1,display:"SOAP Action"},body:{type:"json",required:!1}}},delete:{type:"fields",readable:!0,fields:{soapAction:{type:"string",required:!1,display:"SOAP Action"},body:{type:"json",required:!1}}}}}},rt={integration:class{constructor(t){this.url=t.url}async execute(t){const e={"Content-Type":"text/xml;charset=UTF-8"};t.soapAction&&(e.SOAPAction=t.soapAction);const n=null==(r=t.body)?"":"string"==typeof r?r:JSON.stringify(r);var r;if(!n.trim())throw new Error("SOAP body is required");const o=(await(0,Q.default)({url:this.url,headers:e,xml:n}))?.response?.body;return o?function(t){const e=Object.keys(t).find(t=>"Envelope"===t||/:Envelope$/i.test(t));if(!e)return{};const n=t[e];if(!n||"object"!=typeof n)return{};const r=Object.keys(n).find(t=>"Body"===t||/:Body$/i.test(t));if(!r)return{};const o=n[r];return et(Array.isArray(o)?o[0]:o)}(await(0,Z.parseStringPromise)(o,tt)):{}}async create(t){return this.execute(t)}async read(t){return this.execute(t)}async update(t){return this.execute(t)}async delete(t){return this.execute(t)}},schema:nt};module.exports=rt;
@@ -0,0 +1,80 @@
1
+ {
2
+ "type": "datasource",
3
+ "metadata": {},
4
+ "schema": {
5
+ "docs": "https://www.npmjs.com/package/soap#clientmethodasyncargs-options---call-method-on-the-soap-service",
6
+ "friendlyName": "SuperSOAP",
7
+ "type": "API",
8
+ "description": "Performs a basic SOAP call to a web service",
9
+ "datasource": {
10
+ "url": {
11
+ "type": "string",
12
+ "required": true
13
+ }
14
+ },
15
+ "query": {
16
+ "create": {
17
+ "type": "fields",
18
+ "readable": true,
19
+ "fields": {
20
+ "soapAction": {
21
+ "type": "string",
22
+ "required": false,
23
+ "display": "SOAP Action"
24
+ },
25
+ "body": {
26
+ "type": "json",
27
+ "required": false
28
+ }
29
+ }
30
+ },
31
+ "update": {
32
+ "type": "fields",
33
+ "readable": true,
34
+ "fields": {
35
+ "soapAction": {
36
+ "type": "string",
37
+ "required": false,
38
+ "display": "SOAP Action"
39
+ },
40
+ "body": {
41
+ "type": "json",
42
+ "required": false
43
+ }
44
+ }
45
+ },
46
+ "read": {
47
+ "type": "fields",
48
+ "readable": true,
49
+ "fields": {
50
+ "soapAction": {
51
+ "type": "string",
52
+ "required": false,
53
+ "display": "SOAP Action"
54
+ },
55
+ "body": {
56
+ "type": "json",
57
+ "required": false
58
+ }
59
+ }
60
+ },
61
+ "delete": {
62
+ "type": "fields",
63
+ "readable": true,
64
+ "fields": {
65
+ "soapAction": {
66
+ "type": "string",
67
+ "required": false,
68
+ "display": "SOAP Action"
69
+ },
70
+ "body": {
71
+ "type": "json",
72
+ "required": false
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "hash": "84f25d9456abeb1ea91ffc50197805d089d52f6b",
79
+ "version": "1.0.1"
80
+ }
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "bb_datasource_supersoap",
3
+ "version": "1.0.1",
4
+ "description": "Connect to web services using SOAP in Budibase",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "files": [
8
+ "dist/",
9
+ "README.md"
10
+ ],
11
+ "scripts": {
12
+ "build": "vite build",
13
+ "watch": "vite build --watch",
14
+ "test": "bun test"
15
+ },
16
+ "dependencies": {
17
+ "@budibase/types": "^3.39.22",
18
+ "easy-soap-request": "^5.18.0",
19
+ "xml2js": "^0.6.2"
20
+ },
21
+ "devDependencies": {
22
+ "@budibase/backend-core": "^3.39.22",
23
+ "@types/node": "^22.20.0",
24
+ "@types/xml2js": "^0.4.14",
25
+ "tar": "^7.5.16",
26
+ "terser": "^5.48.0",
27
+ "typescript": "^5.9.3",
28
+ "vite": "^8.1.0"
29
+ }
30
+ }