/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../core/lang","../core/urlUtils"],(function(e,t,n){"use strict";function o(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function r(e){return"string"==typeof e?n.urlToObject(e):t.clone(e)}function i(e,t,n){const o={};for(const r in e){if("declaredClass"===r)continue;const s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){o[r]=[];for(let e=0;e<s.length;e++)o[r][e]=i(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n&&n[r]);o[r]=t?e:JSON.stringify(e)}else o[r]=t?s:JSON.stringify(s);else o[r]=s}return o}e.asValidOptions=o,e.encode=i,e.parseUrl=r,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
