/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as e,pointFromPolygonVertex as o}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as r}from"../support/executorUtils.js";import{getPaths as i}from"../../../../geometry/support/curves/curveUtils.js";function p({templatePart:p,shape:a,edits:l,relationships:n,mode:m,xyTolerance:u,associationFeaturesByTemplate:c}){if(!s(a))return;let f=0;const h=i(a);for(let s=0;s<h.length;s++){const i=h[s],u=i.length,g=0===s?1:0,d=e(i)?u-1:u;for(let e=g;e<d&&!("digitizing"===m&&l.length>r);e++){const r=o(a,s,e);t({templatePart:p,shape:r,edits:l,relationships:n,mode:m,associationFeaturesByTemplate:c},`V${(f+e).toString()}`)}f+=u}}const a=!1;export{p as execute,a as isAsync};
