qs.js 103 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728
  1. import {
  2. __commonJS
  3. } from "./chunk-HM4MQYWN.js";
  4. // node_modules/has-symbols/shams.js
  5. var require_shams = __commonJS({
  6. "node_modules/has-symbols/shams.js"(exports, module) {
  7. "use strict";
  8. module.exports = function hasSymbols() {
  9. if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
  10. return false;
  11. }
  12. if (typeof Symbol.iterator === "symbol") {
  13. return true;
  14. }
  15. var obj = {};
  16. var sym = Symbol("test");
  17. var symObj = Object(sym);
  18. if (typeof sym === "string") {
  19. return false;
  20. }
  21. if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
  22. return false;
  23. }
  24. if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
  25. return false;
  26. }
  27. var symVal = 42;
  28. obj[sym] = symVal;
  29. for (sym in obj) {
  30. return false;
  31. }
  32. if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
  33. return false;
  34. }
  35. if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
  36. return false;
  37. }
  38. var syms = Object.getOwnPropertySymbols(obj);
  39. if (syms.length !== 1 || syms[0] !== sym) {
  40. return false;
  41. }
  42. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
  43. return false;
  44. }
  45. if (typeof Object.getOwnPropertyDescriptor === "function") {
  46. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  47. if (descriptor.value !== symVal || descriptor.enumerable !== true) {
  48. return false;
  49. }
  50. }
  51. return true;
  52. };
  53. }
  54. });
  55. // node_modules/has-symbols/index.js
  56. var require_has_symbols = __commonJS({
  57. "node_modules/has-symbols/index.js"(exports, module) {
  58. "use strict";
  59. var origSymbol = typeof Symbol !== "undefined" && Symbol;
  60. var hasSymbolSham = require_shams();
  61. module.exports = function hasNativeSymbols() {
  62. if (typeof origSymbol !== "function") {
  63. return false;
  64. }
  65. if (typeof Symbol !== "function") {
  66. return false;
  67. }
  68. if (typeof origSymbol("foo") !== "symbol") {
  69. return false;
  70. }
  71. if (typeof Symbol("bar") !== "symbol") {
  72. return false;
  73. }
  74. return hasSymbolSham();
  75. };
  76. }
  77. });
  78. // node_modules/has-proto/index.js
  79. var require_has_proto = __commonJS({
  80. "node_modules/has-proto/index.js"(exports, module) {
  81. "use strict";
  82. var test = {
  83. foo: {}
  84. };
  85. var $Object = Object;
  86. module.exports = function hasProto() {
  87. return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
  88. };
  89. }
  90. });
  91. // node_modules/function-bind/implementation.js
  92. var require_implementation = __commonJS({
  93. "node_modules/function-bind/implementation.js"(exports, module) {
  94. "use strict";
  95. var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
  96. var toStr = Object.prototype.toString;
  97. var max = Math.max;
  98. var funcType = "[object Function]";
  99. var concatty = function concatty2(a, b) {
  100. var arr = [];
  101. for (var i = 0; i < a.length; i += 1) {
  102. arr[i] = a[i];
  103. }
  104. for (var j = 0; j < b.length; j += 1) {
  105. arr[j + a.length] = b[j];
  106. }
  107. return arr;
  108. };
  109. var slicy = function slicy2(arrLike, offset) {
  110. var arr = [];
  111. for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
  112. arr[j] = arrLike[i];
  113. }
  114. return arr;
  115. };
  116. var joiny = function(arr, joiner) {
  117. var str = "";
  118. for (var i = 0; i < arr.length; i += 1) {
  119. str += arr[i];
  120. if (i + 1 < arr.length) {
  121. str += joiner;
  122. }
  123. }
  124. return str;
  125. };
  126. module.exports = function bind(that) {
  127. var target = this;
  128. if (typeof target !== "function" || toStr.apply(target) !== funcType) {
  129. throw new TypeError(ERROR_MESSAGE + target);
  130. }
  131. var args = slicy(arguments, 1);
  132. var bound;
  133. var binder = function() {
  134. if (this instanceof bound) {
  135. var result = target.apply(
  136. this,
  137. concatty(args, arguments)
  138. );
  139. if (Object(result) === result) {
  140. return result;
  141. }
  142. return this;
  143. }
  144. return target.apply(
  145. that,
  146. concatty(args, arguments)
  147. );
  148. };
  149. var boundLength = max(0, target.length - args.length);
  150. var boundArgs = [];
  151. for (var i = 0; i < boundLength; i++) {
  152. boundArgs[i] = "$" + i;
  153. }
  154. bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
  155. if (target.prototype) {
  156. var Empty = function Empty2() {
  157. };
  158. Empty.prototype = target.prototype;
  159. bound.prototype = new Empty();
  160. Empty.prototype = null;
  161. }
  162. return bound;
  163. };
  164. }
  165. });
  166. // node_modules/function-bind/index.js
  167. var require_function_bind = __commonJS({
  168. "node_modules/function-bind/index.js"(exports, module) {
  169. "use strict";
  170. var implementation = require_implementation();
  171. module.exports = Function.prototype.bind || implementation;
  172. }
  173. });
  174. // node_modules/hasown/index.js
  175. var require_hasown = __commonJS({
  176. "node_modules/hasown/index.js"(exports, module) {
  177. "use strict";
  178. var call = Function.prototype.call;
  179. var $hasOwn = Object.prototype.hasOwnProperty;
  180. var bind = require_function_bind();
  181. module.exports = bind.call(call, $hasOwn);
  182. }
  183. });
  184. // node_modules/get-intrinsic/index.js
  185. var require_get_intrinsic = __commonJS({
  186. "node_modules/get-intrinsic/index.js"(exports, module) {
  187. "use strict";
  188. var undefined2;
  189. var $SyntaxError = SyntaxError;
  190. var $Function = Function;
  191. var $TypeError = TypeError;
  192. var getEvalledConstructor = function(expressionSyntax) {
  193. try {
  194. return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
  195. } catch (e) {
  196. }
  197. };
  198. var $gOPD = Object.getOwnPropertyDescriptor;
  199. if ($gOPD) {
  200. try {
  201. $gOPD({}, "");
  202. } catch (e) {
  203. $gOPD = null;
  204. }
  205. }
  206. var throwTypeError = function() {
  207. throw new $TypeError();
  208. };
  209. var ThrowTypeError = $gOPD ? function() {
  210. try {
  211. arguments.callee;
  212. return throwTypeError;
  213. } catch (calleeThrows) {
  214. try {
  215. return $gOPD(arguments, "callee").get;
  216. } catch (gOPDthrows) {
  217. return throwTypeError;
  218. }
  219. }
  220. }() : throwTypeError;
  221. var hasSymbols = require_has_symbols()();
  222. var hasProto = require_has_proto()();
  223. var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
  224. return x.__proto__;
  225. } : null);
  226. var needsEval = {};
  227. var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
  228. var INTRINSICS = {
  229. "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
  230. "%Array%": Array,
  231. "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
  232. "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
  233. "%AsyncFromSyncIteratorPrototype%": undefined2,
  234. "%AsyncFunction%": needsEval,
  235. "%AsyncGenerator%": needsEval,
  236. "%AsyncGeneratorFunction%": needsEval,
  237. "%AsyncIteratorPrototype%": needsEval,
  238. "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
  239. "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
  240. "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
  241. "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
  242. "%Boolean%": Boolean,
  243. "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
  244. "%Date%": Date,
  245. "%decodeURI%": decodeURI,
  246. "%decodeURIComponent%": decodeURIComponent,
  247. "%encodeURI%": encodeURI,
  248. "%encodeURIComponent%": encodeURIComponent,
  249. "%Error%": Error,
  250. "%eval%": eval,
  251. // eslint-disable-line no-eval
  252. "%EvalError%": EvalError,
  253. "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
  254. "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
  255. "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
  256. "%Function%": $Function,
  257. "%GeneratorFunction%": needsEval,
  258. "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
  259. "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
  260. "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
  261. "%isFinite%": isFinite,
  262. "%isNaN%": isNaN,
  263. "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
  264. "%JSON%": typeof JSON === "object" ? JSON : undefined2,
  265. "%Map%": typeof Map === "undefined" ? undefined2 : Map,
  266. "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  267. "%Math%": Math,
  268. "%Number%": Number,
  269. "%Object%": Object,
  270. "%parseFloat%": parseFloat,
  271. "%parseInt%": parseInt,
  272. "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
  273. "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
  274. "%RangeError%": RangeError,
  275. "%ReferenceError%": ReferenceError,
  276. "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
  277. "%RegExp%": RegExp,
  278. "%Set%": typeof Set === "undefined" ? undefined2 : Set,
  279. "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  280. "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
  281. "%String%": String,
  282. "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
  283. "%Symbol%": hasSymbols ? Symbol : undefined2,
  284. "%SyntaxError%": $SyntaxError,
  285. "%ThrowTypeError%": ThrowTypeError,
  286. "%TypedArray%": TypedArray,
  287. "%TypeError%": $TypeError,
  288. "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
  289. "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
  290. "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
  291. "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
  292. "%URIError%": URIError,
  293. "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
  294. "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
  295. "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
  296. };
  297. if (getProto) {
  298. try {
  299. null.error;
  300. } catch (e) {
  301. errorProto = getProto(getProto(e));
  302. INTRINSICS["%Error.prototype%"] = errorProto;
  303. }
  304. }
  305. var errorProto;
  306. var doEval = function doEval2(name) {
  307. var value;
  308. if (name === "%AsyncFunction%") {
  309. value = getEvalledConstructor("async function () {}");
  310. } else if (name === "%GeneratorFunction%") {
  311. value = getEvalledConstructor("function* () {}");
  312. } else if (name === "%AsyncGeneratorFunction%") {
  313. value = getEvalledConstructor("async function* () {}");
  314. } else if (name === "%AsyncGenerator%") {
  315. var fn = doEval2("%AsyncGeneratorFunction%");
  316. if (fn) {
  317. value = fn.prototype;
  318. }
  319. } else if (name === "%AsyncIteratorPrototype%") {
  320. var gen = doEval2("%AsyncGenerator%");
  321. if (gen && getProto) {
  322. value = getProto(gen.prototype);
  323. }
  324. }
  325. INTRINSICS[name] = value;
  326. return value;
  327. };
  328. var LEGACY_ALIASES = {
  329. "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  330. "%ArrayPrototype%": ["Array", "prototype"],
  331. "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  332. "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  333. "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  334. "%ArrayProto_values%": ["Array", "prototype", "values"],
  335. "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  336. "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  337. "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  338. "%BooleanPrototype%": ["Boolean", "prototype"],
  339. "%DataViewPrototype%": ["DataView", "prototype"],
  340. "%DatePrototype%": ["Date", "prototype"],
  341. "%ErrorPrototype%": ["Error", "prototype"],
  342. "%EvalErrorPrototype%": ["EvalError", "prototype"],
  343. "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  344. "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  345. "%FunctionPrototype%": ["Function", "prototype"],
  346. "%Generator%": ["GeneratorFunction", "prototype"],
  347. "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  348. "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  349. "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  350. "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  351. "%JSONParse%": ["JSON", "parse"],
  352. "%JSONStringify%": ["JSON", "stringify"],
  353. "%MapPrototype%": ["Map", "prototype"],
  354. "%NumberPrototype%": ["Number", "prototype"],
  355. "%ObjectPrototype%": ["Object", "prototype"],
  356. "%ObjProto_toString%": ["Object", "prototype", "toString"],
  357. "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  358. "%PromisePrototype%": ["Promise", "prototype"],
  359. "%PromiseProto_then%": ["Promise", "prototype", "then"],
  360. "%Promise_all%": ["Promise", "all"],
  361. "%Promise_reject%": ["Promise", "reject"],
  362. "%Promise_resolve%": ["Promise", "resolve"],
  363. "%RangeErrorPrototype%": ["RangeError", "prototype"],
  364. "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  365. "%RegExpPrototype%": ["RegExp", "prototype"],
  366. "%SetPrototype%": ["Set", "prototype"],
  367. "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  368. "%StringPrototype%": ["String", "prototype"],
  369. "%SymbolPrototype%": ["Symbol", "prototype"],
  370. "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  371. "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  372. "%TypeErrorPrototype%": ["TypeError", "prototype"],
  373. "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  374. "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  375. "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  376. "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  377. "%URIErrorPrototype%": ["URIError", "prototype"],
  378. "%WeakMapPrototype%": ["WeakMap", "prototype"],
  379. "%WeakSetPrototype%": ["WeakSet", "prototype"]
  380. };
  381. var bind = require_function_bind();
  382. var hasOwn = require_hasown();
  383. var $concat = bind.call(Function.call, Array.prototype.concat);
  384. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  385. var $replace = bind.call(Function.call, String.prototype.replace);
  386. var $strSlice = bind.call(Function.call, String.prototype.slice);
  387. var $exec = bind.call(Function.call, RegExp.prototype.exec);
  388. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  389. var reEscapeChar = /\\(\\)?/g;
  390. var stringToPath = function stringToPath2(string) {
  391. var first = $strSlice(string, 0, 1);
  392. var last = $strSlice(string, -1);
  393. if (first === "%" && last !== "%") {
  394. throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
  395. } else if (last === "%" && first !== "%") {
  396. throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
  397. }
  398. var result = [];
  399. $replace(string, rePropName, function(match, number, quote, subString) {
  400. result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
  401. });
  402. return result;
  403. };
  404. var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
  405. var intrinsicName = name;
  406. var alias;
  407. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  408. alias = LEGACY_ALIASES[intrinsicName];
  409. intrinsicName = "%" + alias[0] + "%";
  410. }
  411. if (hasOwn(INTRINSICS, intrinsicName)) {
  412. var value = INTRINSICS[intrinsicName];
  413. if (value === needsEval) {
  414. value = doEval(intrinsicName);
  415. }
  416. if (typeof value === "undefined" && !allowMissing) {
  417. throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
  418. }
  419. return {
  420. alias,
  421. name: intrinsicName,
  422. value
  423. };
  424. }
  425. throw new $SyntaxError("intrinsic " + name + " does not exist!");
  426. };
  427. module.exports = function GetIntrinsic(name, allowMissing) {
  428. if (typeof name !== "string" || name.length === 0) {
  429. throw new $TypeError("intrinsic name must be a non-empty string");
  430. }
  431. if (arguments.length > 1 && typeof allowMissing !== "boolean") {
  432. throw new $TypeError('"allowMissing" argument must be a boolean');
  433. }
  434. if ($exec(/^%?[^%]*%?$/, name) === null) {
  435. throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  436. }
  437. var parts = stringToPath(name);
  438. var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
  439. var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
  440. var intrinsicRealName = intrinsic.name;
  441. var value = intrinsic.value;
  442. var skipFurtherCaching = false;
  443. var alias = intrinsic.alias;
  444. if (alias) {
  445. intrinsicBaseName = alias[0];
  446. $spliceApply(parts, $concat([0, 1], alias));
  447. }
  448. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  449. var part = parts[i];
  450. var first = $strSlice(part, 0, 1);
  451. var last = $strSlice(part, -1);
  452. if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
  453. throw new $SyntaxError("property names with quotes must have matching quotes");
  454. }
  455. if (part === "constructor" || !isOwn) {
  456. skipFurtherCaching = true;
  457. }
  458. intrinsicBaseName += "." + part;
  459. intrinsicRealName = "%" + intrinsicBaseName + "%";
  460. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  461. value = INTRINSICS[intrinsicRealName];
  462. } else if (value != null) {
  463. if (!(part in value)) {
  464. if (!allowMissing) {
  465. throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
  466. }
  467. return void 0;
  468. }
  469. if ($gOPD && i + 1 >= parts.length) {
  470. var desc = $gOPD(value, part);
  471. isOwn = !!desc;
  472. if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
  473. value = desc.get;
  474. } else {
  475. value = value[part];
  476. }
  477. } else {
  478. isOwn = hasOwn(value, part);
  479. value = value[part];
  480. }
  481. if (isOwn && !skipFurtherCaching) {
  482. INTRINSICS[intrinsicRealName] = value;
  483. }
  484. }
  485. }
  486. return value;
  487. };
  488. }
  489. });
  490. // node_modules/es-errors/index.js
  491. var require_es_errors = __commonJS({
  492. "node_modules/es-errors/index.js"(exports, module) {
  493. "use strict";
  494. module.exports = Error;
  495. }
  496. });
  497. // node_modules/es-errors/eval.js
  498. var require_eval = __commonJS({
  499. "node_modules/es-errors/eval.js"(exports, module) {
  500. "use strict";
  501. module.exports = EvalError;
  502. }
  503. });
  504. // node_modules/es-errors/range.js
  505. var require_range = __commonJS({
  506. "node_modules/es-errors/range.js"(exports, module) {
  507. "use strict";
  508. module.exports = RangeError;
  509. }
  510. });
  511. // node_modules/es-errors/ref.js
  512. var require_ref = __commonJS({
  513. "node_modules/es-errors/ref.js"(exports, module) {
  514. "use strict";
  515. module.exports = ReferenceError;
  516. }
  517. });
  518. // node_modules/es-errors/syntax.js
  519. var require_syntax = __commonJS({
  520. "node_modules/es-errors/syntax.js"(exports, module) {
  521. "use strict";
  522. module.exports = SyntaxError;
  523. }
  524. });
  525. // node_modules/es-errors/type.js
  526. var require_type = __commonJS({
  527. "node_modules/es-errors/type.js"(exports, module) {
  528. "use strict";
  529. module.exports = TypeError;
  530. }
  531. });
  532. // node_modules/es-errors/uri.js
  533. var require_uri = __commonJS({
  534. "node_modules/es-errors/uri.js"(exports, module) {
  535. "use strict";
  536. module.exports = URIError;
  537. }
  538. });
  539. // node_modules/set-function-length/node_modules/get-intrinsic/index.js
  540. var require_get_intrinsic2 = __commonJS({
  541. "node_modules/set-function-length/node_modules/get-intrinsic/index.js"(exports, module) {
  542. "use strict";
  543. var undefined2;
  544. var $Error = require_es_errors();
  545. var $EvalError = require_eval();
  546. var $RangeError = require_range();
  547. var $ReferenceError = require_ref();
  548. var $SyntaxError = require_syntax();
  549. var $TypeError = require_type();
  550. var $URIError = require_uri();
  551. var $Function = Function;
  552. var getEvalledConstructor = function(expressionSyntax) {
  553. try {
  554. return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
  555. } catch (e) {
  556. }
  557. };
  558. var $gOPD = Object.getOwnPropertyDescriptor;
  559. if ($gOPD) {
  560. try {
  561. $gOPD({}, "");
  562. } catch (e) {
  563. $gOPD = null;
  564. }
  565. }
  566. var throwTypeError = function() {
  567. throw new $TypeError();
  568. };
  569. var ThrowTypeError = $gOPD ? function() {
  570. try {
  571. arguments.callee;
  572. return throwTypeError;
  573. } catch (calleeThrows) {
  574. try {
  575. return $gOPD(arguments, "callee").get;
  576. } catch (gOPDthrows) {
  577. return throwTypeError;
  578. }
  579. }
  580. }() : throwTypeError;
  581. var hasSymbols = require_has_symbols()();
  582. var hasProto = require_has_proto()();
  583. var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
  584. return x.__proto__;
  585. } : null);
  586. var needsEval = {};
  587. var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
  588. var INTRINSICS = {
  589. __proto__: null,
  590. "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
  591. "%Array%": Array,
  592. "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
  593. "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
  594. "%AsyncFromSyncIteratorPrototype%": undefined2,
  595. "%AsyncFunction%": needsEval,
  596. "%AsyncGenerator%": needsEval,
  597. "%AsyncGeneratorFunction%": needsEval,
  598. "%AsyncIteratorPrototype%": needsEval,
  599. "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
  600. "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
  601. "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
  602. "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
  603. "%Boolean%": Boolean,
  604. "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
  605. "%Date%": Date,
  606. "%decodeURI%": decodeURI,
  607. "%decodeURIComponent%": decodeURIComponent,
  608. "%encodeURI%": encodeURI,
  609. "%encodeURIComponent%": encodeURIComponent,
  610. "%Error%": $Error,
  611. "%eval%": eval,
  612. // eslint-disable-line no-eval
  613. "%EvalError%": $EvalError,
  614. "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
  615. "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
  616. "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
  617. "%Function%": $Function,
  618. "%GeneratorFunction%": needsEval,
  619. "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
  620. "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
  621. "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
  622. "%isFinite%": isFinite,
  623. "%isNaN%": isNaN,
  624. "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
  625. "%JSON%": typeof JSON === "object" ? JSON : undefined2,
  626. "%Map%": typeof Map === "undefined" ? undefined2 : Map,
  627. "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  628. "%Math%": Math,
  629. "%Number%": Number,
  630. "%Object%": Object,
  631. "%parseFloat%": parseFloat,
  632. "%parseInt%": parseInt,
  633. "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
  634. "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
  635. "%RangeError%": $RangeError,
  636. "%ReferenceError%": $ReferenceError,
  637. "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
  638. "%RegExp%": RegExp,
  639. "%Set%": typeof Set === "undefined" ? undefined2 : Set,
  640. "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  641. "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
  642. "%String%": String,
  643. "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
  644. "%Symbol%": hasSymbols ? Symbol : undefined2,
  645. "%SyntaxError%": $SyntaxError,
  646. "%ThrowTypeError%": ThrowTypeError,
  647. "%TypedArray%": TypedArray,
  648. "%TypeError%": $TypeError,
  649. "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
  650. "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
  651. "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
  652. "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
  653. "%URIError%": $URIError,
  654. "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
  655. "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
  656. "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
  657. };
  658. if (getProto) {
  659. try {
  660. null.error;
  661. } catch (e) {
  662. errorProto = getProto(getProto(e));
  663. INTRINSICS["%Error.prototype%"] = errorProto;
  664. }
  665. }
  666. var errorProto;
  667. var doEval = function doEval2(name) {
  668. var value;
  669. if (name === "%AsyncFunction%") {
  670. value = getEvalledConstructor("async function () {}");
  671. } else if (name === "%GeneratorFunction%") {
  672. value = getEvalledConstructor("function* () {}");
  673. } else if (name === "%AsyncGeneratorFunction%") {
  674. value = getEvalledConstructor("async function* () {}");
  675. } else if (name === "%AsyncGenerator%") {
  676. var fn = doEval2("%AsyncGeneratorFunction%");
  677. if (fn) {
  678. value = fn.prototype;
  679. }
  680. } else if (name === "%AsyncIteratorPrototype%") {
  681. var gen = doEval2("%AsyncGenerator%");
  682. if (gen && getProto) {
  683. value = getProto(gen.prototype);
  684. }
  685. }
  686. INTRINSICS[name] = value;
  687. return value;
  688. };
  689. var LEGACY_ALIASES = {
  690. __proto__: null,
  691. "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  692. "%ArrayPrototype%": ["Array", "prototype"],
  693. "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  694. "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  695. "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  696. "%ArrayProto_values%": ["Array", "prototype", "values"],
  697. "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  698. "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  699. "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  700. "%BooleanPrototype%": ["Boolean", "prototype"],
  701. "%DataViewPrototype%": ["DataView", "prototype"],
  702. "%DatePrototype%": ["Date", "prototype"],
  703. "%ErrorPrototype%": ["Error", "prototype"],
  704. "%EvalErrorPrototype%": ["EvalError", "prototype"],
  705. "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  706. "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  707. "%FunctionPrototype%": ["Function", "prototype"],
  708. "%Generator%": ["GeneratorFunction", "prototype"],
  709. "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  710. "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  711. "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  712. "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  713. "%JSONParse%": ["JSON", "parse"],
  714. "%JSONStringify%": ["JSON", "stringify"],
  715. "%MapPrototype%": ["Map", "prototype"],
  716. "%NumberPrototype%": ["Number", "prototype"],
  717. "%ObjectPrototype%": ["Object", "prototype"],
  718. "%ObjProto_toString%": ["Object", "prototype", "toString"],
  719. "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  720. "%PromisePrototype%": ["Promise", "prototype"],
  721. "%PromiseProto_then%": ["Promise", "prototype", "then"],
  722. "%Promise_all%": ["Promise", "all"],
  723. "%Promise_reject%": ["Promise", "reject"],
  724. "%Promise_resolve%": ["Promise", "resolve"],
  725. "%RangeErrorPrototype%": ["RangeError", "prototype"],
  726. "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  727. "%RegExpPrototype%": ["RegExp", "prototype"],
  728. "%SetPrototype%": ["Set", "prototype"],
  729. "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  730. "%StringPrototype%": ["String", "prototype"],
  731. "%SymbolPrototype%": ["Symbol", "prototype"],
  732. "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  733. "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  734. "%TypeErrorPrototype%": ["TypeError", "prototype"],
  735. "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  736. "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  737. "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  738. "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  739. "%URIErrorPrototype%": ["URIError", "prototype"],
  740. "%WeakMapPrototype%": ["WeakMap", "prototype"],
  741. "%WeakSetPrototype%": ["WeakSet", "prototype"]
  742. };
  743. var bind = require_function_bind();
  744. var hasOwn = require_hasown();
  745. var $concat = bind.call(Function.call, Array.prototype.concat);
  746. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  747. var $replace = bind.call(Function.call, String.prototype.replace);
  748. var $strSlice = bind.call(Function.call, String.prototype.slice);
  749. var $exec = bind.call(Function.call, RegExp.prototype.exec);
  750. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  751. var reEscapeChar = /\\(\\)?/g;
  752. var stringToPath = function stringToPath2(string) {
  753. var first = $strSlice(string, 0, 1);
  754. var last = $strSlice(string, -1);
  755. if (first === "%" && last !== "%") {
  756. throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
  757. } else if (last === "%" && first !== "%") {
  758. throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
  759. }
  760. var result = [];
  761. $replace(string, rePropName, function(match, number, quote, subString) {
  762. result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
  763. });
  764. return result;
  765. };
  766. var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
  767. var intrinsicName = name;
  768. var alias;
  769. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  770. alias = LEGACY_ALIASES[intrinsicName];
  771. intrinsicName = "%" + alias[0] + "%";
  772. }
  773. if (hasOwn(INTRINSICS, intrinsicName)) {
  774. var value = INTRINSICS[intrinsicName];
  775. if (value === needsEval) {
  776. value = doEval(intrinsicName);
  777. }
  778. if (typeof value === "undefined" && !allowMissing) {
  779. throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
  780. }
  781. return {
  782. alias,
  783. name: intrinsicName,
  784. value
  785. };
  786. }
  787. throw new $SyntaxError("intrinsic " + name + " does not exist!");
  788. };
  789. module.exports = function GetIntrinsic(name, allowMissing) {
  790. if (typeof name !== "string" || name.length === 0) {
  791. throw new $TypeError("intrinsic name must be a non-empty string");
  792. }
  793. if (arguments.length > 1 && typeof allowMissing !== "boolean") {
  794. throw new $TypeError('"allowMissing" argument must be a boolean');
  795. }
  796. if ($exec(/^%?[^%]*%?$/, name) === null) {
  797. throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  798. }
  799. var parts = stringToPath(name);
  800. var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
  801. var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
  802. var intrinsicRealName = intrinsic.name;
  803. var value = intrinsic.value;
  804. var skipFurtherCaching = false;
  805. var alias = intrinsic.alias;
  806. if (alias) {
  807. intrinsicBaseName = alias[0];
  808. $spliceApply(parts, $concat([0, 1], alias));
  809. }
  810. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  811. var part = parts[i];
  812. var first = $strSlice(part, 0, 1);
  813. var last = $strSlice(part, -1);
  814. if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
  815. throw new $SyntaxError("property names with quotes must have matching quotes");
  816. }
  817. if (part === "constructor" || !isOwn) {
  818. skipFurtherCaching = true;
  819. }
  820. intrinsicBaseName += "." + part;
  821. intrinsicRealName = "%" + intrinsicBaseName + "%";
  822. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  823. value = INTRINSICS[intrinsicRealName];
  824. } else if (value != null) {
  825. if (!(part in value)) {
  826. if (!allowMissing) {
  827. throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
  828. }
  829. return void 0;
  830. }
  831. if ($gOPD && i + 1 >= parts.length) {
  832. var desc = $gOPD(value, part);
  833. isOwn = !!desc;
  834. if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
  835. value = desc.get;
  836. } else {
  837. value = value[part];
  838. }
  839. } else {
  840. isOwn = hasOwn(value, part);
  841. value = value[part];
  842. }
  843. if (isOwn && !skipFurtherCaching) {
  844. INTRINSICS[intrinsicRealName] = value;
  845. }
  846. }
  847. }
  848. return value;
  849. };
  850. }
  851. });
  852. // node_modules/es-define-property/node_modules/get-intrinsic/index.js
  853. var require_get_intrinsic3 = __commonJS({
  854. "node_modules/es-define-property/node_modules/get-intrinsic/index.js"(exports, module) {
  855. "use strict";
  856. var undefined2;
  857. var $Error = require_es_errors();
  858. var $EvalError = require_eval();
  859. var $RangeError = require_range();
  860. var $ReferenceError = require_ref();
  861. var $SyntaxError = require_syntax();
  862. var $TypeError = require_type();
  863. var $URIError = require_uri();
  864. var $Function = Function;
  865. var getEvalledConstructor = function(expressionSyntax) {
  866. try {
  867. return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
  868. } catch (e) {
  869. }
  870. };
  871. var $gOPD = Object.getOwnPropertyDescriptor;
  872. if ($gOPD) {
  873. try {
  874. $gOPD({}, "");
  875. } catch (e) {
  876. $gOPD = null;
  877. }
  878. }
  879. var throwTypeError = function() {
  880. throw new $TypeError();
  881. };
  882. var ThrowTypeError = $gOPD ? function() {
  883. try {
  884. arguments.callee;
  885. return throwTypeError;
  886. } catch (calleeThrows) {
  887. try {
  888. return $gOPD(arguments, "callee").get;
  889. } catch (gOPDthrows) {
  890. return throwTypeError;
  891. }
  892. }
  893. }() : throwTypeError;
  894. var hasSymbols = require_has_symbols()();
  895. var hasProto = require_has_proto()();
  896. var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
  897. return x.__proto__;
  898. } : null);
  899. var needsEval = {};
  900. var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
  901. var INTRINSICS = {
  902. __proto__: null,
  903. "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
  904. "%Array%": Array,
  905. "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
  906. "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
  907. "%AsyncFromSyncIteratorPrototype%": undefined2,
  908. "%AsyncFunction%": needsEval,
  909. "%AsyncGenerator%": needsEval,
  910. "%AsyncGeneratorFunction%": needsEval,
  911. "%AsyncIteratorPrototype%": needsEval,
  912. "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
  913. "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
  914. "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
  915. "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
  916. "%Boolean%": Boolean,
  917. "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
  918. "%Date%": Date,
  919. "%decodeURI%": decodeURI,
  920. "%decodeURIComponent%": decodeURIComponent,
  921. "%encodeURI%": encodeURI,
  922. "%encodeURIComponent%": encodeURIComponent,
  923. "%Error%": $Error,
  924. "%eval%": eval,
  925. // eslint-disable-line no-eval
  926. "%EvalError%": $EvalError,
  927. "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
  928. "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
  929. "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
  930. "%Function%": $Function,
  931. "%GeneratorFunction%": needsEval,
  932. "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
  933. "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
  934. "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
  935. "%isFinite%": isFinite,
  936. "%isNaN%": isNaN,
  937. "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
  938. "%JSON%": typeof JSON === "object" ? JSON : undefined2,
  939. "%Map%": typeof Map === "undefined" ? undefined2 : Map,
  940. "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  941. "%Math%": Math,
  942. "%Number%": Number,
  943. "%Object%": Object,
  944. "%parseFloat%": parseFloat,
  945. "%parseInt%": parseInt,
  946. "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
  947. "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
  948. "%RangeError%": $RangeError,
  949. "%ReferenceError%": $ReferenceError,
  950. "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
  951. "%RegExp%": RegExp,
  952. "%Set%": typeof Set === "undefined" ? undefined2 : Set,
  953. "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  954. "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
  955. "%String%": String,
  956. "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
  957. "%Symbol%": hasSymbols ? Symbol : undefined2,
  958. "%SyntaxError%": $SyntaxError,
  959. "%ThrowTypeError%": ThrowTypeError,
  960. "%TypedArray%": TypedArray,
  961. "%TypeError%": $TypeError,
  962. "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
  963. "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
  964. "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
  965. "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
  966. "%URIError%": $URIError,
  967. "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
  968. "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
  969. "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
  970. };
  971. if (getProto) {
  972. try {
  973. null.error;
  974. } catch (e) {
  975. errorProto = getProto(getProto(e));
  976. INTRINSICS["%Error.prototype%"] = errorProto;
  977. }
  978. }
  979. var errorProto;
  980. var doEval = function doEval2(name) {
  981. var value;
  982. if (name === "%AsyncFunction%") {
  983. value = getEvalledConstructor("async function () {}");
  984. } else if (name === "%GeneratorFunction%") {
  985. value = getEvalledConstructor("function* () {}");
  986. } else if (name === "%AsyncGeneratorFunction%") {
  987. value = getEvalledConstructor("async function* () {}");
  988. } else if (name === "%AsyncGenerator%") {
  989. var fn = doEval2("%AsyncGeneratorFunction%");
  990. if (fn) {
  991. value = fn.prototype;
  992. }
  993. } else if (name === "%AsyncIteratorPrototype%") {
  994. var gen = doEval2("%AsyncGenerator%");
  995. if (gen && getProto) {
  996. value = getProto(gen.prototype);
  997. }
  998. }
  999. INTRINSICS[name] = value;
  1000. return value;
  1001. };
  1002. var LEGACY_ALIASES = {
  1003. __proto__: null,
  1004. "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  1005. "%ArrayPrototype%": ["Array", "prototype"],
  1006. "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  1007. "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  1008. "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  1009. "%ArrayProto_values%": ["Array", "prototype", "values"],
  1010. "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  1011. "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  1012. "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  1013. "%BooleanPrototype%": ["Boolean", "prototype"],
  1014. "%DataViewPrototype%": ["DataView", "prototype"],
  1015. "%DatePrototype%": ["Date", "prototype"],
  1016. "%ErrorPrototype%": ["Error", "prototype"],
  1017. "%EvalErrorPrototype%": ["EvalError", "prototype"],
  1018. "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  1019. "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  1020. "%FunctionPrototype%": ["Function", "prototype"],
  1021. "%Generator%": ["GeneratorFunction", "prototype"],
  1022. "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  1023. "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  1024. "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  1025. "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  1026. "%JSONParse%": ["JSON", "parse"],
  1027. "%JSONStringify%": ["JSON", "stringify"],
  1028. "%MapPrototype%": ["Map", "prototype"],
  1029. "%NumberPrototype%": ["Number", "prototype"],
  1030. "%ObjectPrototype%": ["Object", "prototype"],
  1031. "%ObjProto_toString%": ["Object", "prototype", "toString"],
  1032. "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  1033. "%PromisePrototype%": ["Promise", "prototype"],
  1034. "%PromiseProto_then%": ["Promise", "prototype", "then"],
  1035. "%Promise_all%": ["Promise", "all"],
  1036. "%Promise_reject%": ["Promise", "reject"],
  1037. "%Promise_resolve%": ["Promise", "resolve"],
  1038. "%RangeErrorPrototype%": ["RangeError", "prototype"],
  1039. "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  1040. "%RegExpPrototype%": ["RegExp", "prototype"],
  1041. "%SetPrototype%": ["Set", "prototype"],
  1042. "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  1043. "%StringPrototype%": ["String", "prototype"],
  1044. "%SymbolPrototype%": ["Symbol", "prototype"],
  1045. "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  1046. "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  1047. "%TypeErrorPrototype%": ["TypeError", "prototype"],
  1048. "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  1049. "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  1050. "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  1051. "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  1052. "%URIErrorPrototype%": ["URIError", "prototype"],
  1053. "%WeakMapPrototype%": ["WeakMap", "prototype"],
  1054. "%WeakSetPrototype%": ["WeakSet", "prototype"]
  1055. };
  1056. var bind = require_function_bind();
  1057. var hasOwn = require_hasown();
  1058. var $concat = bind.call(Function.call, Array.prototype.concat);
  1059. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  1060. var $replace = bind.call(Function.call, String.prototype.replace);
  1061. var $strSlice = bind.call(Function.call, String.prototype.slice);
  1062. var $exec = bind.call(Function.call, RegExp.prototype.exec);
  1063. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  1064. var reEscapeChar = /\\(\\)?/g;
  1065. var stringToPath = function stringToPath2(string) {
  1066. var first = $strSlice(string, 0, 1);
  1067. var last = $strSlice(string, -1);
  1068. if (first === "%" && last !== "%") {
  1069. throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
  1070. } else if (last === "%" && first !== "%") {
  1071. throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
  1072. }
  1073. var result = [];
  1074. $replace(string, rePropName, function(match, number, quote, subString) {
  1075. result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
  1076. });
  1077. return result;
  1078. };
  1079. var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
  1080. var intrinsicName = name;
  1081. var alias;
  1082. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  1083. alias = LEGACY_ALIASES[intrinsicName];
  1084. intrinsicName = "%" + alias[0] + "%";
  1085. }
  1086. if (hasOwn(INTRINSICS, intrinsicName)) {
  1087. var value = INTRINSICS[intrinsicName];
  1088. if (value === needsEval) {
  1089. value = doEval(intrinsicName);
  1090. }
  1091. if (typeof value === "undefined" && !allowMissing) {
  1092. throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
  1093. }
  1094. return {
  1095. alias,
  1096. name: intrinsicName,
  1097. value
  1098. };
  1099. }
  1100. throw new $SyntaxError("intrinsic " + name + " does not exist!");
  1101. };
  1102. module.exports = function GetIntrinsic(name, allowMissing) {
  1103. if (typeof name !== "string" || name.length === 0) {
  1104. throw new $TypeError("intrinsic name must be a non-empty string");
  1105. }
  1106. if (arguments.length > 1 && typeof allowMissing !== "boolean") {
  1107. throw new $TypeError('"allowMissing" argument must be a boolean');
  1108. }
  1109. if ($exec(/^%?[^%]*%?$/, name) === null) {
  1110. throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  1111. }
  1112. var parts = stringToPath(name);
  1113. var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
  1114. var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
  1115. var intrinsicRealName = intrinsic.name;
  1116. var value = intrinsic.value;
  1117. var skipFurtherCaching = false;
  1118. var alias = intrinsic.alias;
  1119. if (alias) {
  1120. intrinsicBaseName = alias[0];
  1121. $spliceApply(parts, $concat([0, 1], alias));
  1122. }
  1123. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  1124. var part = parts[i];
  1125. var first = $strSlice(part, 0, 1);
  1126. var last = $strSlice(part, -1);
  1127. if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
  1128. throw new $SyntaxError("property names with quotes must have matching quotes");
  1129. }
  1130. if (part === "constructor" || !isOwn) {
  1131. skipFurtherCaching = true;
  1132. }
  1133. intrinsicBaseName += "." + part;
  1134. intrinsicRealName = "%" + intrinsicBaseName + "%";
  1135. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  1136. value = INTRINSICS[intrinsicRealName];
  1137. } else if (value != null) {
  1138. if (!(part in value)) {
  1139. if (!allowMissing) {
  1140. throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
  1141. }
  1142. return void 0;
  1143. }
  1144. if ($gOPD && i + 1 >= parts.length) {
  1145. var desc = $gOPD(value, part);
  1146. isOwn = !!desc;
  1147. if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
  1148. value = desc.get;
  1149. } else {
  1150. value = value[part];
  1151. }
  1152. } else {
  1153. isOwn = hasOwn(value, part);
  1154. value = value[part];
  1155. }
  1156. if (isOwn && !skipFurtherCaching) {
  1157. INTRINSICS[intrinsicRealName] = value;
  1158. }
  1159. }
  1160. }
  1161. return value;
  1162. };
  1163. }
  1164. });
  1165. // node_modules/es-define-property/index.js
  1166. var require_es_define_property = __commonJS({
  1167. "node_modules/es-define-property/index.js"(exports, module) {
  1168. "use strict";
  1169. var GetIntrinsic = require_get_intrinsic3();
  1170. var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
  1171. if ($defineProperty) {
  1172. try {
  1173. $defineProperty({}, "a", { value: 1 });
  1174. } catch (e) {
  1175. $defineProperty = false;
  1176. }
  1177. }
  1178. module.exports = $defineProperty;
  1179. }
  1180. });
  1181. // node_modules/gopd/index.js
  1182. var require_gopd = __commonJS({
  1183. "node_modules/gopd/index.js"(exports, module) {
  1184. "use strict";
  1185. var GetIntrinsic = require_get_intrinsic();
  1186. var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
  1187. if ($gOPD) {
  1188. try {
  1189. $gOPD([], "length");
  1190. } catch (e) {
  1191. $gOPD = null;
  1192. }
  1193. }
  1194. module.exports = $gOPD;
  1195. }
  1196. });
  1197. // node_modules/define-data-property/index.js
  1198. var require_define_data_property = __commonJS({
  1199. "node_modules/define-data-property/index.js"(exports, module) {
  1200. "use strict";
  1201. var $defineProperty = require_es_define_property();
  1202. var $SyntaxError = require_syntax();
  1203. var $TypeError = require_type();
  1204. var gopd = require_gopd();
  1205. module.exports = function defineDataProperty(obj, property, value) {
  1206. if (!obj || typeof obj !== "object" && typeof obj !== "function") {
  1207. throw new $TypeError("`obj` must be an object or a function`");
  1208. }
  1209. if (typeof property !== "string" && typeof property !== "symbol") {
  1210. throw new $TypeError("`property` must be a string or a symbol`");
  1211. }
  1212. if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
  1213. throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
  1214. }
  1215. if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
  1216. throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
  1217. }
  1218. if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
  1219. throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
  1220. }
  1221. if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
  1222. throw new $TypeError("`loose`, if provided, must be a boolean");
  1223. }
  1224. var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
  1225. var nonWritable = arguments.length > 4 ? arguments[4] : null;
  1226. var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
  1227. var loose = arguments.length > 6 ? arguments[6] : false;
  1228. var desc = !!gopd && gopd(obj, property);
  1229. if ($defineProperty) {
  1230. $defineProperty(obj, property, {
  1231. configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
  1232. enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
  1233. value,
  1234. writable: nonWritable === null && desc ? desc.writable : !nonWritable
  1235. });
  1236. } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
  1237. obj[property] = value;
  1238. } else {
  1239. throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
  1240. }
  1241. };
  1242. }
  1243. });
  1244. // node_modules/has-property-descriptors/index.js
  1245. var require_has_property_descriptors = __commonJS({
  1246. "node_modules/has-property-descriptors/index.js"(exports, module) {
  1247. "use strict";
  1248. var $defineProperty = require_es_define_property();
  1249. var hasPropertyDescriptors = function hasPropertyDescriptors2() {
  1250. return !!$defineProperty;
  1251. };
  1252. hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
  1253. if (!$defineProperty) {
  1254. return null;
  1255. }
  1256. try {
  1257. return $defineProperty([], "length", { value: 1 }).length !== 1;
  1258. } catch (e) {
  1259. return true;
  1260. }
  1261. };
  1262. module.exports = hasPropertyDescriptors;
  1263. }
  1264. });
  1265. // node_modules/set-function-length/index.js
  1266. var require_set_function_length = __commonJS({
  1267. "node_modules/set-function-length/index.js"(exports, module) {
  1268. "use strict";
  1269. var GetIntrinsic = require_get_intrinsic2();
  1270. var define = require_define_data_property();
  1271. var hasDescriptors = require_has_property_descriptors()();
  1272. var gOPD = require_gopd();
  1273. var $TypeError = require_type();
  1274. var $floor = GetIntrinsic("%Math.floor%");
  1275. module.exports = function setFunctionLength(fn, length) {
  1276. if (typeof fn !== "function") {
  1277. throw new $TypeError("`fn` is not a function");
  1278. }
  1279. if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
  1280. throw new $TypeError("`length` must be a positive 32-bit integer");
  1281. }
  1282. var loose = arguments.length > 2 && !!arguments[2];
  1283. var functionLengthIsConfigurable = true;
  1284. var functionLengthIsWritable = true;
  1285. if ("length" in fn && gOPD) {
  1286. var desc = gOPD(fn, "length");
  1287. if (desc && !desc.configurable) {
  1288. functionLengthIsConfigurable = false;
  1289. }
  1290. if (desc && !desc.writable) {
  1291. functionLengthIsWritable = false;
  1292. }
  1293. }
  1294. if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
  1295. if (hasDescriptors) {
  1296. define(
  1297. /** @type {Parameters<define>[0]} */
  1298. fn,
  1299. "length",
  1300. length,
  1301. true,
  1302. true
  1303. );
  1304. } else {
  1305. define(
  1306. /** @type {Parameters<define>[0]} */
  1307. fn,
  1308. "length",
  1309. length
  1310. );
  1311. }
  1312. }
  1313. return fn;
  1314. };
  1315. }
  1316. });
  1317. // node_modules/call-bind/index.js
  1318. var require_call_bind = __commonJS({
  1319. "node_modules/call-bind/index.js"(exports, module) {
  1320. "use strict";
  1321. var bind = require_function_bind();
  1322. var GetIntrinsic = require_get_intrinsic();
  1323. var setFunctionLength = require_set_function_length();
  1324. var $TypeError = GetIntrinsic("%TypeError%");
  1325. var $apply = GetIntrinsic("%Function.prototype.apply%");
  1326. var $call = GetIntrinsic("%Function.prototype.call%");
  1327. var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
  1328. var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
  1329. var $max = GetIntrinsic("%Math.max%");
  1330. if ($defineProperty) {
  1331. try {
  1332. $defineProperty({}, "a", { value: 1 });
  1333. } catch (e) {
  1334. $defineProperty = null;
  1335. }
  1336. }
  1337. module.exports = function callBind(originalFunction) {
  1338. if (typeof originalFunction !== "function") {
  1339. throw new $TypeError("a function is required");
  1340. }
  1341. var func = $reflectApply(bind, $call, arguments);
  1342. return setFunctionLength(
  1343. func,
  1344. 1 + $max(0, originalFunction.length - (arguments.length - 1)),
  1345. true
  1346. );
  1347. };
  1348. var applyBind = function applyBind2() {
  1349. return $reflectApply(bind, $apply, arguments);
  1350. };
  1351. if ($defineProperty) {
  1352. $defineProperty(module.exports, "apply", { value: applyBind });
  1353. } else {
  1354. module.exports.apply = applyBind;
  1355. }
  1356. }
  1357. });
  1358. // node_modules/call-bind/callBound.js
  1359. var require_callBound = __commonJS({
  1360. "node_modules/call-bind/callBound.js"(exports, module) {
  1361. "use strict";
  1362. var GetIntrinsic = require_get_intrinsic();
  1363. var callBind = require_call_bind();
  1364. var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
  1365. module.exports = function callBoundIntrinsic(name, allowMissing) {
  1366. var intrinsic = GetIntrinsic(name, !!allowMissing);
  1367. if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
  1368. return callBind(intrinsic);
  1369. }
  1370. return intrinsic;
  1371. };
  1372. }
  1373. });
  1374. // (disabled):node_modules/object-inspect/util.inspect
  1375. var require_util = __commonJS({
  1376. "(disabled):node_modules/object-inspect/util.inspect"() {
  1377. }
  1378. });
  1379. // node_modules/object-inspect/index.js
  1380. var require_object_inspect = __commonJS({
  1381. "node_modules/object-inspect/index.js"(exports, module) {
  1382. var hasMap = typeof Map === "function" && Map.prototype;
  1383. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
  1384. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
  1385. var mapForEach = hasMap && Map.prototype.forEach;
  1386. var hasSet = typeof Set === "function" && Set.prototype;
  1387. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
  1388. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
  1389. var setForEach = hasSet && Set.prototype.forEach;
  1390. var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
  1391. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  1392. var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
  1393. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  1394. var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
  1395. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  1396. var booleanValueOf = Boolean.prototype.valueOf;
  1397. var objectToString = Object.prototype.toString;
  1398. var functionToString = Function.prototype.toString;
  1399. var $match = String.prototype.match;
  1400. var $slice = String.prototype.slice;
  1401. var $replace = String.prototype.replace;
  1402. var $toUpperCase = String.prototype.toUpperCase;
  1403. var $toLowerCase = String.prototype.toLowerCase;
  1404. var $test = RegExp.prototype.test;
  1405. var $concat = Array.prototype.concat;
  1406. var $join = Array.prototype.join;
  1407. var $arrSlice = Array.prototype.slice;
  1408. var $floor = Math.floor;
  1409. var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
  1410. var gOPS = Object.getOwnPropertySymbols;
  1411. var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
  1412. var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
  1413. var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
  1414. var isEnumerable = Object.prototype.propertyIsEnumerable;
  1415. var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
  1416. return O.__proto__;
  1417. } : null);
  1418. function addNumericSeparator(num, str) {
  1419. if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
  1420. return str;
  1421. }
  1422. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  1423. if (typeof num === "number") {
  1424. var int = num < 0 ? -$floor(-num) : $floor(num);
  1425. if (int !== num) {
  1426. var intStr = String(int);
  1427. var dec = $slice.call(str, intStr.length + 1);
  1428. return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
  1429. }
  1430. }
  1431. return $replace.call(str, sepRegex, "$&_");
  1432. }
  1433. var utilInspect = require_util();
  1434. var inspectCustom = utilInspect.custom;
  1435. var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  1436. module.exports = function inspect_(obj, options, depth, seen) {
  1437. var opts = options || {};
  1438. if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
  1439. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  1440. }
  1441. if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
  1442. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  1443. }
  1444. var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
  1445. if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
  1446. throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
  1447. }
  1448. if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
  1449. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  1450. }
  1451. if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
  1452. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  1453. }
  1454. var numericSeparator = opts.numericSeparator;
  1455. if (typeof obj === "undefined") {
  1456. return "undefined";
  1457. }
  1458. if (obj === null) {
  1459. return "null";
  1460. }
  1461. if (typeof obj === "boolean") {
  1462. return obj ? "true" : "false";
  1463. }
  1464. if (typeof obj === "string") {
  1465. return inspectString(obj, opts);
  1466. }
  1467. if (typeof obj === "number") {
  1468. if (obj === 0) {
  1469. return Infinity / obj > 0 ? "0" : "-0";
  1470. }
  1471. var str = String(obj);
  1472. return numericSeparator ? addNumericSeparator(obj, str) : str;
  1473. }
  1474. if (typeof obj === "bigint") {
  1475. var bigIntStr = String(obj) + "n";
  1476. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  1477. }
  1478. var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
  1479. if (typeof depth === "undefined") {
  1480. depth = 0;
  1481. }
  1482. if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
  1483. return isArray(obj) ? "[Array]" : "[Object]";
  1484. }
  1485. var indent = getIndent(opts, depth);
  1486. if (typeof seen === "undefined") {
  1487. seen = [];
  1488. } else if (indexOf(seen, obj) >= 0) {
  1489. return "[Circular]";
  1490. }
  1491. function inspect(value, from, noIndent) {
  1492. if (from) {
  1493. seen = $arrSlice.call(seen);
  1494. seen.push(from);
  1495. }
  1496. if (noIndent) {
  1497. var newOpts = {
  1498. depth: opts.depth
  1499. };
  1500. if (has(opts, "quoteStyle")) {
  1501. newOpts.quoteStyle = opts.quoteStyle;
  1502. }
  1503. return inspect_(value, newOpts, depth + 1, seen);
  1504. }
  1505. return inspect_(value, opts, depth + 1, seen);
  1506. }
  1507. if (typeof obj === "function" && !isRegExp(obj)) {
  1508. var name = nameOf(obj);
  1509. var keys = arrObjKeys(obj, inspect);
  1510. return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
  1511. }
  1512. if (isSymbol(obj)) {
  1513. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
  1514. return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
  1515. }
  1516. if (isElement(obj)) {
  1517. var s = "<" + $toLowerCase.call(String(obj.nodeName));
  1518. var attrs = obj.attributes || [];
  1519. for (var i = 0; i < attrs.length; i++) {
  1520. s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
  1521. }
  1522. s += ">";
  1523. if (obj.childNodes && obj.childNodes.length) {
  1524. s += "...";
  1525. }
  1526. s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
  1527. return s;
  1528. }
  1529. if (isArray(obj)) {
  1530. if (obj.length === 0) {
  1531. return "[]";
  1532. }
  1533. var xs = arrObjKeys(obj, inspect);
  1534. if (indent && !singleLineValues(xs)) {
  1535. return "[" + indentedJoin(xs, indent) + "]";
  1536. }
  1537. return "[ " + $join.call(xs, ", ") + " ]";
  1538. }
  1539. if (isError(obj)) {
  1540. var parts = arrObjKeys(obj, inspect);
  1541. if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
  1542. return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
  1543. }
  1544. if (parts.length === 0) {
  1545. return "[" + String(obj) + "]";
  1546. }
  1547. return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
  1548. }
  1549. if (typeof obj === "object" && customInspect) {
  1550. if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
  1551. return utilInspect(obj, { depth: maxDepth - depth });
  1552. } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
  1553. return obj.inspect();
  1554. }
  1555. }
  1556. if (isMap(obj)) {
  1557. var mapParts = [];
  1558. if (mapForEach) {
  1559. mapForEach.call(obj, function(value, key) {
  1560. mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
  1561. });
  1562. }
  1563. return collectionOf("Map", mapSize.call(obj), mapParts, indent);
  1564. }
  1565. if (isSet(obj)) {
  1566. var setParts = [];
  1567. if (setForEach) {
  1568. setForEach.call(obj, function(value) {
  1569. setParts.push(inspect(value, obj));
  1570. });
  1571. }
  1572. return collectionOf("Set", setSize.call(obj), setParts, indent);
  1573. }
  1574. if (isWeakMap(obj)) {
  1575. return weakCollectionOf("WeakMap");
  1576. }
  1577. if (isWeakSet(obj)) {
  1578. return weakCollectionOf("WeakSet");
  1579. }
  1580. if (isWeakRef(obj)) {
  1581. return weakCollectionOf("WeakRef");
  1582. }
  1583. if (isNumber(obj)) {
  1584. return markBoxed(inspect(Number(obj)));
  1585. }
  1586. if (isBigInt(obj)) {
  1587. return markBoxed(inspect(bigIntValueOf.call(obj)));
  1588. }
  1589. if (isBoolean(obj)) {
  1590. return markBoxed(booleanValueOf.call(obj));
  1591. }
  1592. if (isString(obj)) {
  1593. return markBoxed(inspect(String(obj)));
  1594. }
  1595. if (typeof window !== "undefined" && obj === window) {
  1596. return "{ [object Window] }";
  1597. }
  1598. if (obj === global) {
  1599. return "{ [object globalThis] }";
  1600. }
  1601. if (!isDate(obj) && !isRegExp(obj)) {
  1602. var ys = arrObjKeys(obj, inspect);
  1603. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  1604. var protoTag = obj instanceof Object ? "" : "null prototype";
  1605. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
  1606. var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
  1607. var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
  1608. if (ys.length === 0) {
  1609. return tag + "{}";
  1610. }
  1611. if (indent) {
  1612. return tag + "{" + indentedJoin(ys, indent) + "}";
  1613. }
  1614. return tag + "{ " + $join.call(ys, ", ") + " }";
  1615. }
  1616. return String(obj);
  1617. };
  1618. function wrapQuotes(s, defaultStyle, opts) {
  1619. var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
  1620. return quoteChar + s + quoteChar;
  1621. }
  1622. function quote(s) {
  1623. return $replace.call(String(s), /"/g, "&quot;");
  1624. }
  1625. function isArray(obj) {
  1626. return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1627. }
  1628. function isDate(obj) {
  1629. return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1630. }
  1631. function isRegExp(obj) {
  1632. return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1633. }
  1634. function isError(obj) {
  1635. return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1636. }
  1637. function isString(obj) {
  1638. return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1639. }
  1640. function isNumber(obj) {
  1641. return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1642. }
  1643. function isBoolean(obj) {
  1644. return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
  1645. }
  1646. function isSymbol(obj) {
  1647. if (hasShammedSymbols) {
  1648. return obj && typeof obj === "object" && obj instanceof Symbol;
  1649. }
  1650. if (typeof obj === "symbol") {
  1651. return true;
  1652. }
  1653. if (!obj || typeof obj !== "object" || !symToString) {
  1654. return false;
  1655. }
  1656. try {
  1657. symToString.call(obj);
  1658. return true;
  1659. } catch (e) {
  1660. }
  1661. return false;
  1662. }
  1663. function isBigInt(obj) {
  1664. if (!obj || typeof obj !== "object" || !bigIntValueOf) {
  1665. return false;
  1666. }
  1667. try {
  1668. bigIntValueOf.call(obj);
  1669. return true;
  1670. } catch (e) {
  1671. }
  1672. return false;
  1673. }
  1674. var hasOwn = Object.prototype.hasOwnProperty || function(key) {
  1675. return key in this;
  1676. };
  1677. function has(obj, key) {
  1678. return hasOwn.call(obj, key);
  1679. }
  1680. function toStr(obj) {
  1681. return objectToString.call(obj);
  1682. }
  1683. function nameOf(f) {
  1684. if (f.name) {
  1685. return f.name;
  1686. }
  1687. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  1688. if (m) {
  1689. return m[1];
  1690. }
  1691. return null;
  1692. }
  1693. function indexOf(xs, x) {
  1694. if (xs.indexOf) {
  1695. return xs.indexOf(x);
  1696. }
  1697. for (var i = 0, l = xs.length; i < l; i++) {
  1698. if (xs[i] === x) {
  1699. return i;
  1700. }
  1701. }
  1702. return -1;
  1703. }
  1704. function isMap(x) {
  1705. if (!mapSize || !x || typeof x !== "object") {
  1706. return false;
  1707. }
  1708. try {
  1709. mapSize.call(x);
  1710. try {
  1711. setSize.call(x);
  1712. } catch (s) {
  1713. return true;
  1714. }
  1715. return x instanceof Map;
  1716. } catch (e) {
  1717. }
  1718. return false;
  1719. }
  1720. function isWeakMap(x) {
  1721. if (!weakMapHas || !x || typeof x !== "object") {
  1722. return false;
  1723. }
  1724. try {
  1725. weakMapHas.call(x, weakMapHas);
  1726. try {
  1727. weakSetHas.call(x, weakSetHas);
  1728. } catch (s) {
  1729. return true;
  1730. }
  1731. return x instanceof WeakMap;
  1732. } catch (e) {
  1733. }
  1734. return false;
  1735. }
  1736. function isWeakRef(x) {
  1737. if (!weakRefDeref || !x || typeof x !== "object") {
  1738. return false;
  1739. }
  1740. try {
  1741. weakRefDeref.call(x);
  1742. return true;
  1743. } catch (e) {
  1744. }
  1745. return false;
  1746. }
  1747. function isSet(x) {
  1748. if (!setSize || !x || typeof x !== "object") {
  1749. return false;
  1750. }
  1751. try {
  1752. setSize.call(x);
  1753. try {
  1754. mapSize.call(x);
  1755. } catch (m) {
  1756. return true;
  1757. }
  1758. return x instanceof Set;
  1759. } catch (e) {
  1760. }
  1761. return false;
  1762. }
  1763. function isWeakSet(x) {
  1764. if (!weakSetHas || !x || typeof x !== "object") {
  1765. return false;
  1766. }
  1767. try {
  1768. weakSetHas.call(x, weakSetHas);
  1769. try {
  1770. weakMapHas.call(x, weakMapHas);
  1771. } catch (s) {
  1772. return true;
  1773. }
  1774. return x instanceof WeakSet;
  1775. } catch (e) {
  1776. }
  1777. return false;
  1778. }
  1779. function isElement(x) {
  1780. if (!x || typeof x !== "object") {
  1781. return false;
  1782. }
  1783. if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
  1784. return true;
  1785. }
  1786. return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
  1787. }
  1788. function inspectString(str, opts) {
  1789. if (str.length > opts.maxStringLength) {
  1790. var remaining = str.length - opts.maxStringLength;
  1791. var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
  1792. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  1793. }
  1794. var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
  1795. return wrapQuotes(s, "single", opts);
  1796. }
  1797. function lowbyte(c) {
  1798. var n = c.charCodeAt(0);
  1799. var x = {
  1800. 8: "b",
  1801. 9: "t",
  1802. 10: "n",
  1803. 12: "f",
  1804. 13: "r"
  1805. }[n];
  1806. if (x) {
  1807. return "\\" + x;
  1808. }
  1809. return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
  1810. }
  1811. function markBoxed(str) {
  1812. return "Object(" + str + ")";
  1813. }
  1814. function weakCollectionOf(type) {
  1815. return type + " { ? }";
  1816. }
  1817. function collectionOf(type, size, entries, indent) {
  1818. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
  1819. return type + " (" + size + ") {" + joinedEntries + "}";
  1820. }
  1821. function singleLineValues(xs) {
  1822. for (var i = 0; i < xs.length; i++) {
  1823. if (indexOf(xs[i], "\n") >= 0) {
  1824. return false;
  1825. }
  1826. }
  1827. return true;
  1828. }
  1829. function getIndent(opts, depth) {
  1830. var baseIndent;
  1831. if (opts.indent === " ") {
  1832. baseIndent = " ";
  1833. } else if (typeof opts.indent === "number" && opts.indent > 0) {
  1834. baseIndent = $join.call(Array(opts.indent + 1), " ");
  1835. } else {
  1836. return null;
  1837. }
  1838. return {
  1839. base: baseIndent,
  1840. prev: $join.call(Array(depth + 1), baseIndent)
  1841. };
  1842. }
  1843. function indentedJoin(xs, indent) {
  1844. if (xs.length === 0) {
  1845. return "";
  1846. }
  1847. var lineJoiner = "\n" + indent.prev + indent.base;
  1848. return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
  1849. }
  1850. function arrObjKeys(obj, inspect) {
  1851. var isArr = isArray(obj);
  1852. var xs = [];
  1853. if (isArr) {
  1854. xs.length = obj.length;
  1855. for (var i = 0; i < obj.length; i++) {
  1856. xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
  1857. }
  1858. }
  1859. var syms = typeof gOPS === "function" ? gOPS(obj) : [];
  1860. var symMap;
  1861. if (hasShammedSymbols) {
  1862. symMap = {};
  1863. for (var k = 0; k < syms.length; k++) {
  1864. symMap["$" + syms[k]] = syms[k];
  1865. }
  1866. }
  1867. for (var key in obj) {
  1868. if (!has(obj, key)) {
  1869. continue;
  1870. }
  1871. if (isArr && String(Number(key)) === key && key < obj.length) {
  1872. continue;
  1873. }
  1874. if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
  1875. continue;
  1876. } else if ($test.call(/[^\w$]/, key)) {
  1877. xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
  1878. } else {
  1879. xs.push(key + ": " + inspect(obj[key], obj));
  1880. }
  1881. }
  1882. if (typeof gOPS === "function") {
  1883. for (var j = 0; j < syms.length; j++) {
  1884. if (isEnumerable.call(obj, syms[j])) {
  1885. xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
  1886. }
  1887. }
  1888. }
  1889. return xs;
  1890. }
  1891. }
  1892. });
  1893. // node_modules/side-channel/index.js
  1894. var require_side_channel = __commonJS({
  1895. "node_modules/side-channel/index.js"(exports, module) {
  1896. "use strict";
  1897. var GetIntrinsic = require_get_intrinsic();
  1898. var callBound = require_callBound();
  1899. var inspect = require_object_inspect();
  1900. var $TypeError = GetIntrinsic("%TypeError%");
  1901. var $WeakMap = GetIntrinsic("%WeakMap%", true);
  1902. var $Map = GetIntrinsic("%Map%", true);
  1903. var $weakMapGet = callBound("WeakMap.prototype.get", true);
  1904. var $weakMapSet = callBound("WeakMap.prototype.set", true);
  1905. var $weakMapHas = callBound("WeakMap.prototype.has", true);
  1906. var $mapGet = callBound("Map.prototype.get", true);
  1907. var $mapSet = callBound("Map.prototype.set", true);
  1908. var $mapHas = callBound("Map.prototype.has", true);
  1909. var listGetNode = function(list, key) {
  1910. for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
  1911. if (curr.key === key) {
  1912. prev.next = curr.next;
  1913. curr.next = list.next;
  1914. list.next = curr;
  1915. return curr;
  1916. }
  1917. }
  1918. };
  1919. var listGet = function(objects, key) {
  1920. var node = listGetNode(objects, key);
  1921. return node && node.value;
  1922. };
  1923. var listSet = function(objects, key, value) {
  1924. var node = listGetNode(objects, key);
  1925. if (node) {
  1926. node.value = value;
  1927. } else {
  1928. objects.next = {
  1929. // eslint-disable-line no-param-reassign
  1930. key,
  1931. next: objects.next,
  1932. value
  1933. };
  1934. }
  1935. };
  1936. var listHas = function(objects, key) {
  1937. return !!listGetNode(objects, key);
  1938. };
  1939. module.exports = function getSideChannel() {
  1940. var $wm;
  1941. var $m;
  1942. var $o;
  1943. var channel = {
  1944. assert: function(key) {
  1945. if (!channel.has(key)) {
  1946. throw new $TypeError("Side channel does not contain " + inspect(key));
  1947. }
  1948. },
  1949. get: function(key) {
  1950. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1951. if ($wm) {
  1952. return $weakMapGet($wm, key);
  1953. }
  1954. } else if ($Map) {
  1955. if ($m) {
  1956. return $mapGet($m, key);
  1957. }
  1958. } else {
  1959. if ($o) {
  1960. return listGet($o, key);
  1961. }
  1962. }
  1963. },
  1964. has: function(key) {
  1965. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1966. if ($wm) {
  1967. return $weakMapHas($wm, key);
  1968. }
  1969. } else if ($Map) {
  1970. if ($m) {
  1971. return $mapHas($m, key);
  1972. }
  1973. } else {
  1974. if ($o) {
  1975. return listHas($o, key);
  1976. }
  1977. }
  1978. return false;
  1979. },
  1980. set: function(key, value) {
  1981. if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
  1982. if (!$wm) {
  1983. $wm = new $WeakMap();
  1984. }
  1985. $weakMapSet($wm, key, value);
  1986. } else if ($Map) {
  1987. if (!$m) {
  1988. $m = new $Map();
  1989. }
  1990. $mapSet($m, key, value);
  1991. } else {
  1992. if (!$o) {
  1993. $o = { key: {}, next: null };
  1994. }
  1995. listSet($o, key, value);
  1996. }
  1997. }
  1998. };
  1999. return channel;
  2000. };
  2001. }
  2002. });
  2003. // node_modules/qs/lib/formats.js
  2004. var require_formats = __commonJS({
  2005. "node_modules/qs/lib/formats.js"(exports, module) {
  2006. "use strict";
  2007. var replace = String.prototype.replace;
  2008. var percentTwenties = /%20/g;
  2009. var Format = {
  2010. RFC1738: "RFC1738",
  2011. RFC3986: "RFC3986"
  2012. };
  2013. module.exports = {
  2014. "default": Format.RFC3986,
  2015. formatters: {
  2016. RFC1738: function(value) {
  2017. return replace.call(value, percentTwenties, "+");
  2018. },
  2019. RFC3986: function(value) {
  2020. return String(value);
  2021. }
  2022. },
  2023. RFC1738: Format.RFC1738,
  2024. RFC3986: Format.RFC3986
  2025. };
  2026. }
  2027. });
  2028. // node_modules/qs/lib/utils.js
  2029. var require_utils = __commonJS({
  2030. "node_modules/qs/lib/utils.js"(exports, module) {
  2031. "use strict";
  2032. var formats = require_formats();
  2033. var has = Object.prototype.hasOwnProperty;
  2034. var isArray = Array.isArray;
  2035. var hexTable = function() {
  2036. var array = [];
  2037. for (var i = 0; i < 256; ++i) {
  2038. array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
  2039. }
  2040. return array;
  2041. }();
  2042. var compactQueue = function compactQueue2(queue) {
  2043. while (queue.length > 1) {
  2044. var item = queue.pop();
  2045. var obj = item.obj[item.prop];
  2046. if (isArray(obj)) {
  2047. var compacted = [];
  2048. for (var j = 0; j < obj.length; ++j) {
  2049. if (typeof obj[j] !== "undefined") {
  2050. compacted.push(obj[j]);
  2051. }
  2052. }
  2053. item.obj[item.prop] = compacted;
  2054. }
  2055. }
  2056. };
  2057. var arrayToObject = function arrayToObject2(source, options) {
  2058. var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2059. for (var i = 0; i < source.length; ++i) {
  2060. if (typeof source[i] !== "undefined") {
  2061. obj[i] = source[i];
  2062. }
  2063. }
  2064. return obj;
  2065. };
  2066. var merge = function merge2(target, source, options) {
  2067. if (!source) {
  2068. return target;
  2069. }
  2070. if (typeof source !== "object") {
  2071. if (isArray(target)) {
  2072. target.push(source);
  2073. } else if (target && typeof target === "object") {
  2074. if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
  2075. target[source] = true;
  2076. }
  2077. } else {
  2078. return [target, source];
  2079. }
  2080. return target;
  2081. }
  2082. if (!target || typeof target !== "object") {
  2083. return [target].concat(source);
  2084. }
  2085. var mergeTarget = target;
  2086. if (isArray(target) && !isArray(source)) {
  2087. mergeTarget = arrayToObject(target, options);
  2088. }
  2089. if (isArray(target) && isArray(source)) {
  2090. source.forEach(function(item, i) {
  2091. if (has.call(target, i)) {
  2092. var targetItem = target[i];
  2093. if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
  2094. target[i] = merge2(targetItem, item, options);
  2095. } else {
  2096. target.push(item);
  2097. }
  2098. } else {
  2099. target[i] = item;
  2100. }
  2101. });
  2102. return target;
  2103. }
  2104. return Object.keys(source).reduce(function(acc, key) {
  2105. var value = source[key];
  2106. if (has.call(acc, key)) {
  2107. acc[key] = merge2(acc[key], value, options);
  2108. } else {
  2109. acc[key] = value;
  2110. }
  2111. return acc;
  2112. }, mergeTarget);
  2113. };
  2114. var assign = function assignSingleSource(target, source) {
  2115. return Object.keys(source).reduce(function(acc, key) {
  2116. acc[key] = source[key];
  2117. return acc;
  2118. }, target);
  2119. };
  2120. var decode = function(str, decoder, charset) {
  2121. var strWithoutPlus = str.replace(/\+/g, " ");
  2122. if (charset === "iso-8859-1") {
  2123. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  2124. }
  2125. try {
  2126. return decodeURIComponent(strWithoutPlus);
  2127. } catch (e) {
  2128. return strWithoutPlus;
  2129. }
  2130. };
  2131. var encode = function encode2(str, defaultEncoder, charset, kind, format) {
  2132. if (str.length === 0) {
  2133. return str;
  2134. }
  2135. var string = str;
  2136. if (typeof str === "symbol") {
  2137. string = Symbol.prototype.toString.call(str);
  2138. } else if (typeof str !== "string") {
  2139. string = String(str);
  2140. }
  2141. if (charset === "iso-8859-1") {
  2142. return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
  2143. return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
  2144. });
  2145. }
  2146. var out = "";
  2147. for (var i = 0; i < string.length; ++i) {
  2148. var c = string.charCodeAt(i);
  2149. if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
  2150. out += string.charAt(i);
  2151. continue;
  2152. }
  2153. if (c < 128) {
  2154. out = out + hexTable[c];
  2155. continue;
  2156. }
  2157. if (c < 2048) {
  2158. out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
  2159. continue;
  2160. }
  2161. if (c < 55296 || c >= 57344) {
  2162. out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
  2163. continue;
  2164. }
  2165. i += 1;
  2166. c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
  2167. out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
  2168. }
  2169. return out;
  2170. };
  2171. var compact = function compact2(value) {
  2172. var queue = [{ obj: { o: value }, prop: "o" }];
  2173. var refs = [];
  2174. for (var i = 0; i < queue.length; ++i) {
  2175. var item = queue[i];
  2176. var obj = item.obj[item.prop];
  2177. var keys = Object.keys(obj);
  2178. for (var j = 0; j < keys.length; ++j) {
  2179. var key = keys[j];
  2180. var val = obj[key];
  2181. if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
  2182. queue.push({ obj, prop: key });
  2183. refs.push(val);
  2184. }
  2185. }
  2186. }
  2187. compactQueue(queue);
  2188. return value;
  2189. };
  2190. var isRegExp = function isRegExp2(obj) {
  2191. return Object.prototype.toString.call(obj) === "[object RegExp]";
  2192. };
  2193. var isBuffer = function isBuffer2(obj) {
  2194. if (!obj || typeof obj !== "object") {
  2195. return false;
  2196. }
  2197. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  2198. };
  2199. var combine = function combine2(a, b) {
  2200. return [].concat(a, b);
  2201. };
  2202. var maybeMap = function maybeMap2(val, fn) {
  2203. if (isArray(val)) {
  2204. var mapped = [];
  2205. for (var i = 0; i < val.length; i += 1) {
  2206. mapped.push(fn(val[i]));
  2207. }
  2208. return mapped;
  2209. }
  2210. return fn(val);
  2211. };
  2212. module.exports = {
  2213. arrayToObject,
  2214. assign,
  2215. combine,
  2216. compact,
  2217. decode,
  2218. encode,
  2219. isBuffer,
  2220. isRegExp,
  2221. maybeMap,
  2222. merge
  2223. };
  2224. }
  2225. });
  2226. // node_modules/qs/lib/stringify.js
  2227. var require_stringify = __commonJS({
  2228. "node_modules/qs/lib/stringify.js"(exports, module) {
  2229. "use strict";
  2230. var getSideChannel = require_side_channel();
  2231. var utils = require_utils();
  2232. var formats = require_formats();
  2233. var has = Object.prototype.hasOwnProperty;
  2234. var arrayPrefixGenerators = {
  2235. brackets: function brackets(prefix) {
  2236. return prefix + "[]";
  2237. },
  2238. comma: "comma",
  2239. indices: function indices(prefix, key) {
  2240. return prefix + "[" + key + "]";
  2241. },
  2242. repeat: function repeat(prefix) {
  2243. return prefix;
  2244. }
  2245. };
  2246. var isArray = Array.isArray;
  2247. var push = Array.prototype.push;
  2248. var pushToArray = function(arr, valueOrArray) {
  2249. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  2250. };
  2251. var toISO = Date.prototype.toISOString;
  2252. var defaultFormat = formats["default"];
  2253. var defaults = {
  2254. addQueryPrefix: false,
  2255. allowDots: false,
  2256. charset: "utf-8",
  2257. charsetSentinel: false,
  2258. delimiter: "&",
  2259. encode: true,
  2260. encoder: utils.encode,
  2261. encodeValuesOnly: false,
  2262. format: defaultFormat,
  2263. formatter: formats.formatters[defaultFormat],
  2264. // deprecated
  2265. indices: false,
  2266. serializeDate: function serializeDate(date) {
  2267. return toISO.call(date);
  2268. },
  2269. skipNulls: false,
  2270. strictNullHandling: false
  2271. };
  2272. var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
  2273. return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
  2274. };
  2275. var sentinel = {};
  2276. var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
  2277. var obj = object;
  2278. var tmpSc = sideChannel;
  2279. var step = 0;
  2280. var findFlag = false;
  2281. while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
  2282. var pos = tmpSc.get(object);
  2283. step += 1;
  2284. if (typeof pos !== "undefined") {
  2285. if (pos === step) {
  2286. throw new RangeError("Cyclic object value");
  2287. } else {
  2288. findFlag = true;
  2289. }
  2290. }
  2291. if (typeof tmpSc.get(sentinel) === "undefined") {
  2292. step = 0;
  2293. }
  2294. }
  2295. if (typeof filter === "function") {
  2296. obj = filter(prefix, obj);
  2297. } else if (obj instanceof Date) {
  2298. obj = serializeDate(obj);
  2299. } else if (generateArrayPrefix === "comma" && isArray(obj)) {
  2300. obj = utils.maybeMap(obj, function(value2) {
  2301. if (value2 instanceof Date) {
  2302. return serializeDate(value2);
  2303. }
  2304. return value2;
  2305. });
  2306. }
  2307. if (obj === null) {
  2308. if (strictNullHandling) {
  2309. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
  2310. }
  2311. obj = "";
  2312. }
  2313. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  2314. if (encoder) {
  2315. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
  2316. return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
  2317. }
  2318. return [formatter(prefix) + "=" + formatter(String(obj))];
  2319. }
  2320. var values = [];
  2321. if (typeof obj === "undefined") {
  2322. return values;
  2323. }
  2324. var objKeys;
  2325. if (generateArrayPrefix === "comma" && isArray(obj)) {
  2326. if (encodeValuesOnly && encoder) {
  2327. obj = utils.maybeMap(obj, encoder);
  2328. }
  2329. objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
  2330. } else if (isArray(filter)) {
  2331. objKeys = filter;
  2332. } else {
  2333. var keys = Object.keys(obj);
  2334. objKeys = sort ? keys.sort(sort) : keys;
  2335. }
  2336. var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + "[]" : prefix;
  2337. for (var j = 0; j < objKeys.length; ++j) {
  2338. var key = objKeys[j];
  2339. var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
  2340. if (skipNulls && value === null) {
  2341. continue;
  2342. }
  2343. var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]");
  2344. sideChannel.set(object, step);
  2345. var valueSideChannel = getSideChannel();
  2346. valueSideChannel.set(sentinel, sideChannel);
  2347. pushToArray(values, stringify2(
  2348. value,
  2349. keyPrefix,
  2350. generateArrayPrefix,
  2351. commaRoundTrip,
  2352. strictNullHandling,
  2353. skipNulls,
  2354. generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
  2355. filter,
  2356. sort,
  2357. allowDots,
  2358. serializeDate,
  2359. format,
  2360. formatter,
  2361. encodeValuesOnly,
  2362. charset,
  2363. valueSideChannel
  2364. ));
  2365. }
  2366. return values;
  2367. };
  2368. var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
  2369. if (!opts) {
  2370. return defaults;
  2371. }
  2372. if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
  2373. throw new TypeError("Encoder has to be a function.");
  2374. }
  2375. var charset = opts.charset || defaults.charset;
  2376. if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
  2377. throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  2378. }
  2379. var format = formats["default"];
  2380. if (typeof opts.format !== "undefined") {
  2381. if (!has.call(formats.formatters, opts.format)) {
  2382. throw new TypeError("Unknown format option provided.");
  2383. }
  2384. format = opts.format;
  2385. }
  2386. var formatter = formats.formatters[format];
  2387. var filter = defaults.filter;
  2388. if (typeof opts.filter === "function" || isArray(opts.filter)) {
  2389. filter = opts.filter;
  2390. }
  2391. return {
  2392. addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
  2393. allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
  2394. charset,
  2395. charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
  2396. delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
  2397. encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
  2398. encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
  2399. encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  2400. filter,
  2401. format,
  2402. formatter,
  2403. serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
  2404. skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
  2405. sort: typeof opts.sort === "function" ? opts.sort : null,
  2406. strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
  2407. };
  2408. };
  2409. module.exports = function(object, opts) {
  2410. var obj = object;
  2411. var options = normalizeStringifyOptions(opts);
  2412. var objKeys;
  2413. var filter;
  2414. if (typeof options.filter === "function") {
  2415. filter = options.filter;
  2416. obj = filter("", obj);
  2417. } else if (isArray(options.filter)) {
  2418. filter = options.filter;
  2419. objKeys = filter;
  2420. }
  2421. var keys = [];
  2422. if (typeof obj !== "object" || obj === null) {
  2423. return "";
  2424. }
  2425. var arrayFormat;
  2426. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  2427. arrayFormat = opts.arrayFormat;
  2428. } else if (opts && "indices" in opts) {
  2429. arrayFormat = opts.indices ? "indices" : "repeat";
  2430. } else {
  2431. arrayFormat = "indices";
  2432. }
  2433. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  2434. if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
  2435. throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
  2436. }
  2437. var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
  2438. if (!objKeys) {
  2439. objKeys = Object.keys(obj);
  2440. }
  2441. if (options.sort) {
  2442. objKeys.sort(options.sort);
  2443. }
  2444. var sideChannel = getSideChannel();
  2445. for (var i = 0; i < objKeys.length; ++i) {
  2446. var key = objKeys[i];
  2447. if (options.skipNulls && obj[key] === null) {
  2448. continue;
  2449. }
  2450. pushToArray(keys, stringify(
  2451. obj[key],
  2452. key,
  2453. generateArrayPrefix,
  2454. commaRoundTrip,
  2455. options.strictNullHandling,
  2456. options.skipNulls,
  2457. options.encode ? options.encoder : null,
  2458. options.filter,
  2459. options.sort,
  2460. options.allowDots,
  2461. options.serializeDate,
  2462. options.format,
  2463. options.formatter,
  2464. options.encodeValuesOnly,
  2465. options.charset,
  2466. sideChannel
  2467. ));
  2468. }
  2469. var joined = keys.join(options.delimiter);
  2470. var prefix = options.addQueryPrefix === true ? "?" : "";
  2471. if (options.charsetSentinel) {
  2472. if (options.charset === "iso-8859-1") {
  2473. prefix += "utf8=%26%2310003%3B&";
  2474. } else {
  2475. prefix += "utf8=%E2%9C%93&";
  2476. }
  2477. }
  2478. return joined.length > 0 ? prefix + joined : "";
  2479. };
  2480. }
  2481. });
  2482. // node_modules/qs/lib/parse.js
  2483. var require_parse = __commonJS({
  2484. "node_modules/qs/lib/parse.js"(exports, module) {
  2485. "use strict";
  2486. var utils = require_utils();
  2487. var has = Object.prototype.hasOwnProperty;
  2488. var isArray = Array.isArray;
  2489. var defaults = {
  2490. allowDots: false,
  2491. allowPrototypes: false,
  2492. allowSparse: false,
  2493. arrayLimit: 20,
  2494. charset: "utf-8",
  2495. charsetSentinel: false,
  2496. comma: false,
  2497. decoder: utils.decode,
  2498. delimiter: "&",
  2499. depth: 5,
  2500. ignoreQueryPrefix: false,
  2501. interpretNumericEntities: false,
  2502. parameterLimit: 1e3,
  2503. parseArrays: true,
  2504. plainObjects: false,
  2505. strictNullHandling: false
  2506. };
  2507. var interpretNumericEntities = function(str) {
  2508. return str.replace(/&#(\d+);/g, function($0, numberStr) {
  2509. return String.fromCharCode(parseInt(numberStr, 10));
  2510. });
  2511. };
  2512. var parseArrayValue = function(val, options) {
  2513. if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
  2514. return val.split(",");
  2515. }
  2516. return val;
  2517. };
  2518. var isoSentinel = "utf8=%26%2310003%3B";
  2519. var charsetSentinel = "utf8=%E2%9C%93";
  2520. var parseValues = function parseQueryStringValues(str, options) {
  2521. var obj = { __proto__: null };
  2522. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
  2523. var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
  2524. var parts = cleanStr.split(options.delimiter, limit);
  2525. var skipIndex = -1;
  2526. var i;
  2527. var charset = options.charset;
  2528. if (options.charsetSentinel) {
  2529. for (i = 0; i < parts.length; ++i) {
  2530. if (parts[i].indexOf("utf8=") === 0) {
  2531. if (parts[i] === charsetSentinel) {
  2532. charset = "utf-8";
  2533. } else if (parts[i] === isoSentinel) {
  2534. charset = "iso-8859-1";
  2535. }
  2536. skipIndex = i;
  2537. i = parts.length;
  2538. }
  2539. }
  2540. }
  2541. for (i = 0; i < parts.length; ++i) {
  2542. if (i === skipIndex) {
  2543. continue;
  2544. }
  2545. var part = parts[i];
  2546. var bracketEqualsPos = part.indexOf("]=");
  2547. var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
  2548. var key, val;
  2549. if (pos === -1) {
  2550. key = options.decoder(part, defaults.decoder, charset, "key");
  2551. val = options.strictNullHandling ? null : "";
  2552. } else {
  2553. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
  2554. val = utils.maybeMap(
  2555. parseArrayValue(part.slice(pos + 1), options),
  2556. function(encodedVal) {
  2557. return options.decoder(encodedVal, defaults.decoder, charset, "value");
  2558. }
  2559. );
  2560. }
  2561. if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
  2562. val = interpretNumericEntities(val);
  2563. }
  2564. if (part.indexOf("[]=") > -1) {
  2565. val = isArray(val) ? [val] : val;
  2566. }
  2567. if (has.call(obj, key)) {
  2568. obj[key] = utils.combine(obj[key], val);
  2569. } else {
  2570. obj[key] = val;
  2571. }
  2572. }
  2573. return obj;
  2574. };
  2575. var parseObject = function(chain, val, options, valuesParsed) {
  2576. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  2577. for (var i = chain.length - 1; i >= 0; --i) {
  2578. var obj;
  2579. var root = chain[i];
  2580. if (root === "[]" && options.parseArrays) {
  2581. obj = [].concat(leaf);
  2582. } else {
  2583. obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2584. var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
  2585. var index = parseInt(cleanRoot, 10);
  2586. if (!options.parseArrays && cleanRoot === "") {
  2587. obj = { 0: leaf };
  2588. } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
  2589. obj = [];
  2590. obj[index] = leaf;
  2591. } else if (cleanRoot !== "__proto__") {
  2592. obj[cleanRoot] = leaf;
  2593. }
  2594. }
  2595. leaf = obj;
  2596. }
  2597. return leaf;
  2598. };
  2599. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  2600. if (!givenKey) {
  2601. return;
  2602. }
  2603. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
  2604. var brackets = /(\[[^[\]]*])/;
  2605. var child = /(\[[^[\]]*])/g;
  2606. var segment = options.depth > 0 && brackets.exec(key);
  2607. var parent = segment ? key.slice(0, segment.index) : key;
  2608. var keys = [];
  2609. if (parent) {
  2610. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  2611. if (!options.allowPrototypes) {
  2612. return;
  2613. }
  2614. }
  2615. keys.push(parent);
  2616. }
  2617. var i = 0;
  2618. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  2619. i += 1;
  2620. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  2621. if (!options.allowPrototypes) {
  2622. return;
  2623. }
  2624. }
  2625. keys.push(segment[1]);
  2626. }
  2627. if (segment) {
  2628. keys.push("[" + key.slice(segment.index) + "]");
  2629. }
  2630. return parseObject(keys, val, options, valuesParsed);
  2631. };
  2632. var normalizeParseOptions = function normalizeParseOptions2(opts) {
  2633. if (!opts) {
  2634. return defaults;
  2635. }
  2636. if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
  2637. throw new TypeError("Decoder has to be a function.");
  2638. }
  2639. if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
  2640. throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  2641. }
  2642. var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
  2643. return {
  2644. allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
  2645. allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
  2646. allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
  2647. arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
  2648. charset,
  2649. charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
  2650. comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
  2651. decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
  2652. delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  2653. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  2654. depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
  2655. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  2656. interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  2657. parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
  2658. parseArrays: opts.parseArrays !== false,
  2659. plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
  2660. strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
  2661. };
  2662. };
  2663. module.exports = function(str, opts) {
  2664. var options = normalizeParseOptions(opts);
  2665. if (str === "" || str === null || typeof str === "undefined") {
  2666. return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2667. }
  2668. var tempObj = typeof str === "string" ? parseValues(str, options) : str;
  2669. var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  2670. var keys = Object.keys(tempObj);
  2671. for (var i = 0; i < keys.length; ++i) {
  2672. var key = keys[i];
  2673. var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
  2674. obj = utils.merge(obj, newObj, options);
  2675. }
  2676. if (options.allowSparse === true) {
  2677. return obj;
  2678. }
  2679. return utils.compact(obj);
  2680. };
  2681. }
  2682. });
  2683. // node_modules/qs/lib/index.js
  2684. var require_lib = __commonJS({
  2685. "node_modules/qs/lib/index.js"(exports, module) {
  2686. var stringify = require_stringify();
  2687. var parse = require_parse();
  2688. var formats = require_formats();
  2689. module.exports = {
  2690. formats,
  2691. parse,
  2692. stringify
  2693. };
  2694. }
  2695. });
  2696. export default require_lib();
  2697. //# sourceMappingURL=qs.js.map