define(["./when-54c2dc71","./Check-6c0211bc","./Math-fc8cecf5","./Cartesian2-bddc1162","./Transforms-ec27f304","./RuntimeError-2109023a","./WebGLConstants-76bb35d1","./ComponentDatatype-6d99a1ee","./GeometryAttribute-44fb48f1","./GeometryAttributes-4fcfcf40","./AttributeCompression-9fc99391","./GeometryPipeline-b49b2e59","./EncodedCartesian3-e9c71cf0","./IndexDatatype-53503fee","./IntersectionTests-2626c9e9","./Plane-231f1723","./GeometryInstance-11f9a3bd","./arrayRemoveDuplicates-ebc732b0","./EllipsoidTangentPlane-ed172748","./OrientedBoundingBox-c9ad91c4","./CoplanarPolygonGeometryLibrary-dc8e954f","./ArcType-dc1c5aee","./EllipsoidRhumbLine-c704bf4c","./PolygonPipeline-ff364b47","./PolygonGeometryLibrary-29b9a52e"],function(i,e,t,l,p,r,n,s,u,d,o,f,a,m,y,c,g,b,h,P,G,v,L,C,T){"use strict";function E(e){var t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=T.PolygonGeometryLibrary.computeHierarchyPackedLength(t)+1}E.fromPositions=function(e){return new E({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},E.pack=function(e,t,r){return r=i.defaultValue(r,0),t[r=T.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,r)]=e.packedLength,t};var k={polygonHierarchy:{}};return E.unpack=function(e,t,r){t=i.defaultValue(t,0);var n=T.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var o=e[t];return i.defined(r)||(r=new E(k)),r._polygonHierarchy=n,r.packedLength=o,r},E.createGeometry=function(e){var t=e._polygonHierarchy,r=t.positions;if(!((r=b.arrayRemoveDuplicates(r,l.Cartesian3.equalsEpsilon,!0)).length<3)&&G.CoplanarPolygonGeometryLibrary.validOutline(r)){var n=T.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(t,!1);if(0!==n.length){for(var o=[],i=0;i