/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../request","../../networks/support/typeUtils","../utils","./support/QueryAssociationsResult"],(function(e,t,n,o,s,r){"use strict";function i(e){const{returnDeletes:t,elements:n,gdbVersion:s,moment:r}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map((e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId})))),types:JSON.stringify(e.associationTypes.map((e=>o.associationTypeKebabDict.toJSON(e)))),gdbVersion:s,moment:r}}function u(e,t,n){return l.apply(this,arguments)}function l(){return(l=t._asyncToGenerator((function*(e,t,o){const u=s.parseUrl(e),l={...i(t),f:"json"},a=s.encode({...u.query,...l}),p=s.asValidOptions(a,{...o,method:"post"}),c=`${u.path}/associations/query`,{data:d}=yield n(c,p);if(!d)return null;return r.fromJSON(d)}))).apply(this,arguments)}e.queryAssociations=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
