/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{isSubtypeGroupLayer as r,isLinkChartLayer as e,isKnowledgeGraphLayer as o,isKnowledgeGraphSublayer as a}from"../layers/support/layerUtils.js";function t(r){return r&&"layer"in r?r.layer:void 0}function u(u){let i=t(u.origin);return r(i)?i=i.findSublayerForFeature(u):(e(i)||o(i))&&a(u.sourceLayer)&&(i=u.sourceLayer),i??u.sourceLayer??u.layer}export{u as getGraphicLayer,t as getGraphicOriginLayer};
