{"version":3,"sources":["node_modules/@arcgis/core/rest/utils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport r from \"../config.js\";\nimport { id as t } from \"../kernel.js\";\nimport { clone as o } from \"../core/lang.js\";\nimport { urlToObject as n } from \"../core/urlUtils.js\";\nimport { isApiKeyApplicable as e } from \"../support/apiKeyUtils.js\";\nfunction i(r, t) {\n return t ? {\n ...t,\n query: {\n ...(r ?? {}),\n ...t.query\n }\n } : {\n query: r\n };\n}\nfunction f(r) {\n return \"string\" == typeof r ? n(r) : o(r);\n}\nfunction s(r, t, o) {\n const n = {};\n for (const e in r) {\n if (\"declaredClass\" === e) continue;\n const i = r[e];\n if (null != i && \"function\" != typeof i) if (Array.isArray(i)) n[e] = i.map(r => s(r));else if (\"object\" == typeof i) {\n if (i.toJSON) {\n const r = i.toJSON(o?.[e]);\n n[e] = t ? r : JSON.stringify(r);\n } else n[e] = t ? i : JSON.stringify(i);\n } else n[e] = i;\n }\n return n;\n}\nfunction u(o, n) {\n return o ? e(o, n) ? n || r.apiKey : t?.findCredential(o)?.token : null;\n}\nexport { i as asValidOptions, s as encode, u as getToken, f as parseUrl };"],"mappings":"+HASA,SAASA,EAAEC,EAAGC,EAAG,CACf,OAAOA,EAAIC,EAAAC,EAAA,GACNF,GADM,CAET,MAAOE,IAAA,GACDH,GAAK,CAAC,GACPC,EAAE,MAET,GAAI,CACF,MAAOD,CACT,CACF,CACA,SAASI,EAAEJ,EAAG,CACZ,OAAmB,OAAOA,GAAnB,SAAuBK,EAAEL,CAAC,EAAI,EAAEA,CAAC,CAC1C,CACA,SAASM,EAAEN,EAAGC,EAAGM,EAAG,CAClB,IAAMC,EAAI,CAAC,EACX,QAAWC,KAAKT,EAAG,CACjB,GAAwBS,IAApB,gBAAuB,SAC3B,IAAMV,EAAIC,EAAES,CAAC,EACb,GAAYV,GAAR,MAA2B,OAAOA,GAArB,WAAwB,GAAI,MAAM,QAAQA,CAAC,EAAGS,EAAEC,CAAC,EAAIV,EAAE,IAAIC,GAAKM,EAAEN,CAAC,CAAC,UAAuB,OAAOD,GAAnB,SAC9F,GAAIA,EAAE,OAAQ,CACZ,IAAMC,EAAID,EAAE,OAAOQ,IAAIE,CAAC,CAAC,EACzBD,EAAEC,CAAC,EAAIR,EAAID,EAAI,KAAK,UAAUA,CAAC,CACjC,MAAOQ,EAAEC,CAAC,EAAIR,EAAIF,EAAI,KAAK,UAAUA,CAAC,OACjCS,EAAEC,CAAC,EAAIV,CAChB,CACA,OAAOS,CACT","names":["i","r","t","__spreadProps","__spreadValues","f","I","s","o","n","e"],"x_google_ignoreList":[0]}