@mlightcad/dxf-json-converter 1.10.6 → 1.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(ie,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("@mlightcad/data-model")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/data-model"],r):(ie=typeof globalThis<"u"?globalThis:ie||self,r(ie["dxf-json-converter"]={},ie.dataModel))})(this,function(ie,r){"use strict";var C,be,E,S,me,B,re,G,N,W,k,ae,se,le,R,Y,Pe,Ne,ce,de,Oe,ye,Re,x,j,I,ue,xe,f,O,we,y,_e,z,D,X,Me,fe,U,Fe,Ye,Ve,$,K,ve,Be,Z,Ae,De,ke,Ie,q,pe,b,J,w,Te,_,Q,m,ee,M,ge,Ue,he,F,te,V,ne,je,Ee,v;(C={})[C.None=0]="None",C[C.Anonymous=1]="Anonymous",C[C.NonConstant=2]="NonConstant",C[C.Xref=4]="Xref",C[C.XrefOverlay=8]="XrefOverlay",C[C.ExternallyDependent=16]="ExternallyDependent",C[C.ResolvedOrDependent=32]="ResolvedOrDependent",C[C.ReferencedXref=64]="ReferencedXref",(be={})[be.BYBLOCK=0]="BYBLOCK",be[be.BYLAYER=256]="BYLAYER",(E={})[E.Rotated=0]="Rotated",E[E.Aligned=1]="Aligned",E[E.Angular=2]="Angular",E[E.Diameter=3]="Diameter",E[E.Radius=4]="Radius",E[E.Angular3Point=5]="Angular3Point",E[E.Ordinate=6]="Ordinate",E[E.ReferenceIsExclusive=32]="ReferenceIsExclusive",E[E.IsOrdinateXTypeFlag=64]="IsOrdinateXTypeFlag",E[E.IsCustomTextPositionFlag=128]="IsCustomTextPositionFlag",(S={})[S.TopLeft=1]="TopLeft",S[S.TopCenter=2]="TopCenter",S[S.TopRight=3]="TopRight",S[S.MiddleLeft=4]="MiddleLeft",S[S.MiddleCenter=5]="MiddleCenter",S[S.MiddleRight=6]="MiddleRight",S[S.BottomLeft=7]="BottomLeft",S[S.BottomCenter=8]="BottomCenter",S[S.BottomRight=9]="BottomRight",(me={})[me.AtLeast=1]="AtLeast",me[me.Exact=2]="Exact";var Xe=((B={})[B.Center=0]="Center",B[B.Above=1]="Above",B[B.Outside=2]="Outside",B[B.JIS=3]="JIS",B[B.Below=4]="Below",B);(re={})[re.WithDimension=0]="WithDimension",re[re.AddLeader=1]="AddLeader",re[re.Independent=2]="Independent",(G={})[G.BothOutside=0]="BothOutside",G[G.ArrowFirst=1]="ArrowFirst",G[G.TextFirst=2]="TextFirst",G[G.Auto=3]="Auto";var Le=((N={})[N.Feet=0]="Feet",N[N.None=1]="None",N[N.Inch=2]="Inch",N[N.FeetAndInch=3]="FeetAndInch",N[N.Leading=4]="Leading",N[N.Trailing=8]="Trailing",N[N.LeadingAndTrailing=12]="LeadingAndTrailing",N),qe=((W={})[W.None=0]="None",W[W.Leading=1]="Leading",W[W.Trailing=2]="Trailing",W[W.LeadingAndTrailing=3]="LeadingAndTrailing",W),Je=((k={})[k.Center=0]="Center",k[k.First=1]="First",k[k.Second=2]="Second",k[k.OverFirst=3]="OverFirst",k[k.OverSecond=4]="OverSecond",k),Qe=((ae={})[ae.Bottom=0]="Bottom",ae[ae.Center=1]="Center",ae[ae.Top=2]="Top",ae);(se={})[se.None=0]="None",se[se.UseDrawingBackground=1]="UseDrawingBackground",se[se.Custom=2]="Custom",(le={})[le.Horizontal=0]="Horizontal",le[le.Diagonal=1]="Diagonal",le[le.NotStacked=2]="NotStacked",(R={})[R.Scientific=1]="Scientific",R[R.Decimal=2]="Decimal",R[R.Engineering=3]="Engineering",R[R.Architectural=4]="Architectural",R[R.Fractional=5]="Fractional",R[R.WindowDesktop=6]="WindowDesktop",(Y={})[Y.Decimal=0]="Decimal",Y[Y.DegreesMinutesSecond=1]="DegreesMinutesSecond",Y[Y.Gradian=2]="Gradian",Y[Y.Radian=3]="Radian";var et=((Pe={})[Pe.PatternFill=0]="PatternFill",Pe[Pe.SolidFill=1]="SolidFill",Pe);(Ne={})[Ne.NonAssociative=0]="NonAssociative",Ne[Ne.Associative=1]="Associative",(ce={})[ce.Normal=0]="Normal",ce[ce.Outer=1]="Outer",ce[ce.Ignore=2]="Ignore",(de={})[de.UserDefined=0]="UserDefined",de[de.Predefined=1]="Predefined",de[de.Custom=2]="Custom",(Oe={})[Oe.NotAnnotated=0]="NotAnnotated",Oe[Oe.Annotated=1]="Annotated",(ye={})[ye.Solid=0]="Solid",ye[ye.Gradient=1]="Gradient",(Re={})[Re.TwoColor=0]="TwoColor",Re[Re.OneColor=1]="OneColor",(x={})[x.Default=0]="Default",x[x.External=1]="External",x[x.Polyline=2]="Polyline",x[x.Derived=4]="Derived",x[x.Textbox=8]="Textbox",x[x.Outermost=16]="Outermost",(j={})[j.Line=1]="Line",j[j.Circular=2]="Circular",j[j.Elliptic=3]="Elliptic",j[j.Spline=4]="Spline";var tt=((I={})[I.Off=0]="Off",I[I.Solid=1]="Solid",I[I.Dashed=2]="Dashed",I[I.Dotted=3]="Dotted",I[I.ShotDash=4]="ShotDash",I[I.MediumDash=5]="MediumDash",I[I.LongDash=6]="LongDash",I[I.DoubleShortDash=7]="DoubleShortDash",I[I.DoubleMediumDash=8]="DoubleMediumDash",I[I.DoubleLongDash=9]="DoubleLongDash",I[I.DoubleMediumLongDash=10]="DoubleMediumLongDash",I[I.SparseDot=11]="SparseDot",I);tt.Off,(ue={})[ue.Standard=-3]="Standard",ue[ue.ByLayer=-2]="ByLayer",ue[ue.ByBlock=-1]="ByBlock",(xe={})[xe.English=0]="English",xe[xe.Metric=1]="Metric",(f={})[f.PERSPECTIVE_MODE=1]="PERSPECTIVE_MODE",f[f.FRONT_CLIPPING=2]="FRONT_CLIPPING",f[f.BACK_CLIPPING=4]="BACK_CLIPPING",f[f.UCS_FOLLOW=8]="UCS_FOLLOW",f[f.FRONT_CLIP_NOT_AT_EYE=16]="FRONT_CLIP_NOT_AT_EYE",f[f.UCS_ICON_VISIBILITY=32]="UCS_ICON_VISIBILITY",f[f.UCS_ICON_AT_ORIGIN=64]="UCS_ICON_AT_ORIGIN",f[f.FAST_ZOOM=128]="FAST_ZOOM",f[f.SNAP_MODE=256]="SNAP_MODE",f[f.GRID_MODE=512]="GRID_MODE",f[f.ISOMETRIC_SNAP_STYLE=1024]="ISOMETRIC_SNAP_STYLE",f[f.HIDE_PLOT_MODE=2048]="HIDE_PLOT_MODE",f[f.K_ISO_PAIR_TOP=4096]="K_ISO_PAIR_TOP",f[f.K_ISO_PAIR_RIGHT=8192]="K_ISO_PAIR_RIGHT",f[f.VIEWPORT_ZOOM_LOCKING=16384]="VIEWPORT_ZOOM_LOCKING",f[f.UNUSED=32768]="UNUSED",f[f.NON_RECTANGULAR_CLIPPING=65536]="NON_RECTANGULAR_CLIPPING",f[f.VIEWPORT_OFF=131072]="VIEWPORT_OFF",f[f.GRID_BEYOND_DRAWING_LIMITS=262144]="GRID_BEYOND_DRAWING_LIMITS",f[f.ADAPTIVE_GRID_DISPLAY=524288]="ADAPTIVE_GRID_DISPLAY",f[f.SUBDIVISION_BELOW_SPACING=1048576]="SUBDIVISION_BELOW_SPACING",f[f.GRID_FOLLOWS_WORKPLANE=2097152]="GRID_FOLLOWS_WORKPLANE",(O={})[O.OPTIMIZED_2D=0]="OPTIMIZED_2D",O[O.WIREFRAME=1]="WIREFRAME",O[O.HIDDEN_LINE=2]="HIDDEN_LINE",O[O.FLAT_SHADED=3]="FLAT_SHADED",O[O.GOURAUD_SHADED=4]="GOURAUD_SHADED",O[O.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",O[O.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME",(we={})[we.UCS_UNCHANGED=0]="UCS_UNCHANGED",we[we.HAS_OWN_UCS=1]="HAS_OWN_UCS",(y={})[y.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",y[y.TOP=1]="TOP",y[y.BOTTOM=2]="BOTTOM",y[y.FRONT=3]="FRONT",y[y.BACK=4]="BACK",y[y.LEFT=5]="LEFT",y[y.RIGHT=6]="RIGHT",(_e={})[_e.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",_e[_e.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS",(z={})[z.ByLayer=0]="ByLayer",z[z.ByBlock=1]="ByBlock",z[z.ByDictionaryDefault=2]="ByDictionaryDefault",z[z.ByObject=3]="ByObject",(D={})[D.NotAllowed=0]="NotAllowed",D[D.AllowErase=1]="AllowErase",D[D.AllowTransform=2]="AllowTransform",D[D.AllowChangeColor=4]="AllowChangeColor",D[D.AllowChangeLayer=8]="AllowChangeLayer",D[D.AllowChangeLinetype=16]="AllowChangeLinetype",D[D.AllowChangeLinetypeScale=32]="AllowChangeLinetypeScale",D[D.AllowChangeVisibility=64]="AllowChangeVisibility",D[D.AllowClone=128]="AllowClone",D[D.AllowChangeLineweight=256]="AllowChangeLineweight",D[D.AllowChangePlotStyleName=512]="AllowChangePlotStyleName",D[D.AllowAllExceptClone=895]="AllowAllExceptClone",D[D.AllowAll=1023]="AllowAll",D[D.DisableProxyWarning=1024]="DisableProxyWarning",D[D.R13FormatProxy=32768]="R13FormatProxy",(X={})[X.CAST_AND_RECEIVE=0]="CAST_AND_RECEIVE",X[X.CAST=1]="CAST",X[X.RECEIVE=2]="RECEIVE",X[X.IGNORE=3]="IGNORE",(Me={})[Me.RayTrace=0]="RayTrace",Me[Me.ShadowMap=1]="ShadowMap",(fe={})[fe.BeforeText=0]="BeforeText",fe[fe.AboveText=1]="AboveText",fe[fe.None=2]="None",(U={})[U.NONE=0]="NONE",U[U.INVISIBLE=1]="INVISIBLE",U[U.CONSTANT=2]="CONSTANT",U[U.VERIFICATION_REQUIRED=4]="VERIFICATION_REQUIRED",U[U.PRESET=8]="PRESET",(Fe={})[Fe.MULTILINE=2]="MULTILINE",Fe[Fe.CONSTANT_MULTILINE=4]="CONSTANT_MULTILINE",(Ye={})[Ye.ProxyEntity=498]="ProxyEntity",(Ve={})[Ve.Dwg=0]="Dwg",Ve[Ve.Dxf=1]="Dxf",($={})[$.First=1]="First",$[$.Second=2]="Second",$[$.Third=4]="Third",$[$.Fourth=8]="Fourth",(K={})[K.ShowImage=1]="ShowImage",K[K.ShowImageWhenNotAlignedWithScreen=2]="ShowImageWhenNotAlignedWithScreen",K[K.UseClippingBoundary=4]="UseClippingBoundary",K[K.TransparencyIsOn=8]="TransparencyIsOn",(ve={})[ve.Rectangular=1]="Rectangular",ve[ve.Polygonal=2]="Polygonal",(Be={})[Be.Outside=0]="Outside",Be[Be.Inside=1]="Inside",(Z={})[Z.TextAnnotation=0]="TextAnnotation",Z[Z.ToleranceAnnotation=1]="ToleranceAnnotation",Z[Z.BlockReferenceAnnotation=2]="BlockReferenceAnnotation",Z[Z.NoAnnotation=3]="NoAnnotation",(Ae={})[Ae.Distant=1]="Distant",Ae[Ae.Point=2]="Point",Ae[Ae.Spot=3]="Spot",(De={})[De.None=0]="None",De[De.InverseLinear=1]="InverseLinear",De[De.InverseSquare=2]="InverseSquare",(ke={})[ke.IS_CLOSED=1]="IS_CLOSED",ke[ke.PLINE_GEN=128]="PLINE_GEN",(Ie={})[Ie.Top=0]="Top",Ie[Ie.Zero=1]="Zero",Ie[Ie.Bottom=2]="Bottom",(q={})[q.HasVertex=1]="HasVertex",q[q.Closed=2]="Closed",q[q.SuppressStartCaps=4]="SuppressStartCaps",q[q.SuppressEndCaps=8]="SuppressEndCaps",(pe={})[pe.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",pe[pe.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",pe[pe.BY_STYLE=5]="BY_STYLE",(b={})[b.CLOSED_POLYLINE=1]="CLOSED_POLYLINE",b[b.CURVE_FIT=2]="CURVE_FIT",b[b.SPLINE_FIT=4]="SPLINE_FIT",b[b.POLYLINE_3D=8]="POLYLINE_3D",b[b.POLYGON_3D=16]="POLYGON_3D",b[b.CLOSED_POLYGON=32]="CLOSED_POLYGON",b[b.POLYFACE=64]="POLYFACE",b[b.CONTINUOUS=128]="CONTINUOUS";var He=((J={})[J.NONE=0]="NONE",J[J.QUADRATIC=5]="QUADRATIC",J[J.CUBIC=6]="CUBIC",J[J.BEZIER=8]="BEZIER",J);(w={})[w.NONE=0]="NONE",w[w.CLOSED=1]="CLOSED",w[w.PERIODIC=2]="PERIODIC",w[w.RATIONAL=4]="RATIONAL",w[w.PLANAR=8]="PLANAR",w[w.LINEAR=16]="LINEAR",(Te={})[Te.NONE=0]="NONE",Te[Te.MIRRORED_X=2]="MIRRORED_X",Te[Te.MIRRORED_Y=4]="MIRRORED_Y",(_={})[_.LEFT=0]="LEFT",_[_.CENTER=1]="CENTER",_[_.RIGHT=2]="RIGHT",_[_.ALIGNED=3]="ALIGNED",_[_.MIDDLE=4]="MIDDLE",_[_.FIT=5]="FIT",(Q={})[Q.BASELINE=0]="BASELINE",Q[Q.BOTTOM=1]="BOTTOM",Q[Q.MIDDLE=2]="MIDDLE",Q[Q.TOP=3]="TOP";var nt=((m={})[m.CREATED_BY_CURVE_FIT=1]="CREATED_BY_CURVE_FIT",m[m.TANGENT_DEFINED=2]="TANGENT_DEFINED",m[m.NOT_USED=4]="NOT_USED",m[m.CREATED_BY_SPLINE_FIT=8]="CREATED_BY_SPLINE_FIT",m[m.SPLINE_CONTROL_POINT=16]="SPLINE_CONTROL_POINT",m[m.FOR_POLYLINE=32]="FOR_POLYLINE",m[m.FOR_POLYGON=64]="FOR_POLYGON",m[m.POLYFACE=128]="POLYFACE",m);(ee={})[ee.ShowImage=1]="ShowImage",ee[ee.ShowImageWhenNotAligned=2]="ShowImageWhenNotAligned",ee[ee.UseClippingBoundary=4]="UseClippingBoundary",ee[ee.Transparency=8]="Transparency",(M={})[M.NOT_APPLICABLE=0]="NOT_APPLICABLE",M[M.KEEP_EXISTING=1]="KEEP_EXISTING",M[M.USE_CLONE=2]="USE_CLONE",M[M.XREF_VALUE_NAME=3]="XREF_VALUE_NAME",M[M.VALUE_NAME=4]="VALUE_NAME",M[M.UNMANGLE_NAME=5]="UNMANGLE_NAME",(ge={})[ge.NOUNIT=0]="NOUNIT",ge[ge.CENTIMETERS=2]="CENTIMETERS",ge[ge.INCH=5]="INCH",(Ue={})[Ue.PSLTSCALE=1]="PSLTSCALE",Ue[Ue.LIMCHECK=2]="LIMCHECK",(he={})[he.INCHES=0]="INCHES",he[he.MILLIMETERS=1]="MILLIMETERS",he[he.PIXELS=2]="PIXELS",(F={})[F.LAST_SCREEN_DISPLAY=0]="LAST_SCREEN_DISPLAY",F[F.DRAWING_EXTENTS=1]="DRAWING_EXTENTS",F[F.DRAWING_LIMITS=2]="DRAWING_LIMITS",F[F.VIEW_SPECIFIED=3]="VIEW_SPECIFIED",F[F.WINDOW_SPECIFIED=4]="WINDOW_SPECIFIED",F[F.LAYOUT_INFORMATION=5]="LAYOUT_INFORMATION",(te={})[te.AS_DISPLAYED=0]="AS_DISPLAYED",te[te.WIREFRAME=1]="WIREFRAME",te[te.HIDDEN=2]="HIDDEN",te[te.RENDERED=3]="RENDERED",(V={})[V.DRAFT=0]="DRAFT",V[V.PREVIEW=1]="PREVIEW",V[V.NORMAL=2]="NORMAL",V[V.PRESENTATION=3]="PRESENTATION",V[V.MAXIMUM=4]="MAXIMUM",V[V.CUSTOM=5]="CUSTOM",Xe.Above,Xe.Center,Le.Trailing,Le.Feet,qe.None,Je.Center,Qe.Center,Le.Trailing,Le.Feet,Le.Trailing,Le.Trailing,(ne={})[ne.NONE=0]="NONE",ne[ne.AbsoluteRotation=1]="AbsoluteRotation",ne[ne.TextEmbedded=2]="TextEmbedded",ne[ne.ShapeEmbedded=4]="ShapeEmbedded",(je={})[je.PaperSpace=1]="PaperSpace",(Ee={})[Ee.XrefDependent=16]="XrefDependent",Ee[Ee.XrefResolved=32]="XrefResolved",Ee[Ee.Referenced=64]="Referenced",(v={})[v.Off=0]="Off",v[v.Perspective=1]="Perspective",v[v.ClipFront=2]="ClipFront",v[v.ClipBack=4]="ClipBack",v[v.UcsFollow=8]="UcsFollow",v[v.ClipFrontByFrontZ=16]="ClipFrontByFrontZ";const ot=new Set(["ACSH_SWEEP_CLASS","ACSH_BREP_CLASS","ACSH_EXTRUSION_CLASS","ACSH_REVOLVE_CLASS","ACSH_LOFT_CLASS"]);function it(u,e){if(!u||!e)return"";const t=e[Ge(u)];if(!t||t.name!=="ACSH_HISTORY_CLASS")return"";const n=t.evalGraphHardId;if(!n)return"";const i=e[Ge(n)];if(!i||i.name!=="ACAD_EVALUATION_GRAPH")return"";const a=i.nodeObjectHardIds??[];let o="";for(const d of a){const A=e[Ge(d)];if(!A)continue;const c=rt(A);c&&(o=c)}if(o)return o;const s=[];for(const d of a){const A=e[Ge(d)];A&&s.push(...at(A))}return s.length===0?"":lt(s)}function rt(u){return ot.has(u.name)?u.acisData??"":""}function at(u){switch(u.name){case"ACSH_BOX_CLASS":return $e(u);case"ACSH_CYLINDER_CLASS":return ze(u,e=>{const t=Math.max(e.minorRadius??0,e.majorRadius??0,e.topMajorRadius??0),n=e.height??e.topMajorRadius??0;return{length:t*2,width:t*2,height:n}});case"ACSH_CONE_CLASS":return ze(u,e=>{const t=Math.max(e.baseRadius??0,e.minorRadius??0,e.topRadius??0,e.majorRadius??0),n=e.height??e.topMajorRadius??0;return{length:t*2,width:t*2,height:n}});case"ACSH_WEDGE_CLASS":return ze(u,e=>({length:e.length??0,width:e.width??0,height:e.height??0}));default:return[]}}function ze(u,e){const{length:t,width:n,height:i}=e(u);return t<=0||n<=0||i<=0?[]:$e({name:"ACSH_BOX_CLASS",handle:"",ownerObjectId:"0",length:t,width:n,height:i,transform:u.transform})}function Ge(u){return String(u).trim().toUpperCase()}function $e(u){const e=u.length??0,t=u.width??0,n=u.height??0;if(e<=0||t<=0||n<=0)return[];const i=e/2,a=t/2,o=n/2,s=[{x:-i,y:-a,z:-o},{x:i,y:-a,z:-o},{x:i,y:a,z:-o},{x:-i,y:a,z:-o},{x:-i,y:-a,z:o},{x:i,y:-a,z:o},{x:i,y:a,z:o},{x:-i,y:a,z:o}],d=u.transform;return!d||d.length!==16?s:s.map(A=>st(d,A))}function st(u,e){const t=e.x,n=e.y,i=e.z,a=u[12]*t+u[13]*n+u[14]*i+u[15],o=a!==0&&a!==1?1/a:1;return{x:(u[0]*t+u[1]*n+u[2]*i+u[3])*o,y:(u[4]*t+u[5]*n+u[6]*i+u[7])*o,z:(u[8]*t+u[9]*n+u[10]*i+u[11])*o}}function lt(u){const e=u.map(t=>`point $-1 ${t.x} ${t.y} ${t.z} #`);return e.push("End-of-ACIS-data"),e.join(`
|
|
2
|
-
`)}function ct(u){if(u){if(u instanceof Uint8Array)return u;if(Array.isArray(u))return Uint8Array.from(u);if(typeof u=="object"){const e=u,t=Object.keys(e).filter(n=>/^\d+$/.test(n));if(t.length>0)return Uint8Array.from(t.sort((n,i)=>Number(n)-Number(i)).map(n=>e[n]))}}}class Ke{constructor(){this.objectByHandle={},this.acdsDataByHandle={}}setObjectByHandle(e){this.objectByHandle=e}setAcdsDataByHandle(e={}){this.acdsDataByHandle=e}convert(e){const t=this.createEntity(e);return t&&this.processCommonAttrs(e,t),t}createEntity(e){return e.type=="3DFACE"?this.convertFace(e):e.type=="ARC"?this.convertArc(e):e.type=="ATTDEF"?this.convertAttributeDefinition(e):e.type=="ATTRIB"?this.convertAttribute(e):e.type=="CIRCLE"?this.convertCirle(e):e.type=="DIMENSION"?this.convertDimension(e):e.type=="ELLIPSE"?this.convertEllipse(e):e.type=="HATCH"?this.convertHatch(e):e.type=="IMAGE"?this.convertImage(e):e.type=="LEADER"?this.convertLeader(e):e.type=="LINE"?this.convertLine(e):e.type=="LWPOLYLINE"?this.convertLWPolyline(e):e.type=="MTEXT"?this.convertMText(e):e.type=="MLINE"?this.convertMLine(e):e.type=="MULTILEADER"||e.type=="MLEADER"?this.convertMLeader(e):e.type=="POLYLINE"?this.convertPolyline(e):e.type=="POINT"?this.convertPoint(e):e.type=="RAY"?this.convertRay(e):e.type=="SPLINE"?this.convertSpline(e):e.type=="ACAD_TABLE"?this.convertTable(e):e.type=="TEXT"?this.convertText(e):e.type=="TOLERANCE"?this.convertTolerance(e):e.type=="SHAPE"?this.convertShape(e):e.type=="SOLID"?this.convertSolid(e):e.type=="3DSOLID"?this.convert3dSolid(e):e.type=="VIEWPORT"?this.convertViewport(e):e.type=="WIPEOUT"?this.convertWipeout(e):e.type=="XLINE"?this.convertXline(e):e.type=="INSERT"?this.convertBlockReference(e):e.type=="ACAD_PROXY_ENTITY"?this.convertProxyEntity(e):null}convertProxyEntity(e){const t=new r.AcDbProxyEntity;if(t.proxyEntityClassId=e.proxyEntityClassId,e.originalDxfName&&(t.originalDxfName=e.originalDxfName),e.applicationEntityClassId!=null&&(t.applicationEntityClassId=e.applicationEntityClassId),e.objectDrawingFormat!=null&&(t.objectDrawingFormat=e.objectDrawingFormat),e.originalDataFormat!=null&&(t.originalDataFormat=e.originalDataFormat),e.graphicsData){const n=r.hexStringsToBytes([e.graphicsData]),i=e.graphicsDataSize??n.length;t.setProxyGraphic(n.subarray(0,i))}return t}convertFace(e){const t=new r.AcDbFace;return e.vertices.forEach((n,i)=>t.setVertexAt(i,n)),t}convertArc(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbArc(r.transformOcsPointToWcs(e.center,t),e.radius,r.AcGeMathUtil.degToRad(e.startAngle),r.AcGeMathUtil.degToRad(e.endAngle),t)}convertAttributeCommon(e,t){t.textString=e.text,t.height=e.textHeight,t.position.copy(e.startPoint);const n=e.alignmentPoint,i=!n||n.x===0&&n.y===0&&(n.z??0)===0;n&&!i?t.alignmentPoint.copy(n):t.alignmentPoint.copy(e.startPoint),t.rotation=e.rotation,t.oblique=e.obliqueAngle??0,t.thickness=e.thickness,t.tag=e.tag,t.fieldLength=0,t.isInvisible=(e.attributeFlag&r.AcDbAttributeFlags.Invisible)!==0,t.isConst=(e.attributeFlag&r.AcDbAttributeFlags.Const)!==0,t.isVerifiable=(e.attributeFlag&r.AcDbAttributeFlags.Verifiable)!==0,t.isPreset=(e.attributeFlag&r.AcDbAttributeFlags.Preset)!==0,t.isReallyLocked=!!e.isReallyLocked,t.isMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.MultiLine)!==0,t.isConstMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.ConstMultiLine)!==0}convertAttribute(e){const t=new r.AcDbAttribute;return this.convertAttributeCommon(e,t),t.styleName=e.textStyle,t.horizontalMode=e.horizontalJustification,t.verticalMode=e.verticalJustification,t.widthFactor=e.scale??1,t.lockPositionInBlock=e.lockPositionFlag,t}convertAttributeDefinition(e){const t=new r.AcDbAttributeDefinition;return this.convertAttributeCommon(e,t),t.styleName=e.styleName,t.horizontalMode=e.halign,t.verticalMode=e.valign,t.widthFactor=e.xScale??1,t.prompt=e.prompt,t}convertCirle(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbCircle(r.transformOcsPointToWcs(e.center,t),e.radius,t)}convertEllipse(e){const t=new r.AcGeVector3d(e.majorAxisEndPoint),n=t.length();return new r.AcDbEllipse(e.center,e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t,n,n*e.axisRatio,e.startAngle,e.endAngle)}convertLine(e){const t=e.startPoint,n=e.endPoint;return new r.AcDbLine(new r.AcGePoint3d(t.x,t.y,t.z||0),new r.AcGePoint3d(n.x,n.y,n.z||0))}convertSpline(e){return r.AcDbSpline.fromDwgSpline(e)}convertPoint(e){const t=new r.AcDbPoint;return t.position=e.position,t}convertShape(e){var o;const t=new r.AcDbShape;t.position.copy(e.insertionPoint),t.size=e.size;const n=((o=e.shapeName)==null?void 0:o.trim())??"",i=Number(n);n!==""&&Number.isInteger(i)&&i!==0&&String(i)===n?t.shapeNumber=i:t.name=n;const a=e.styleName;return a&&(t.styleName=a),t.rotation=r.AcGeMathUtil.degToRad(e.rotation||0),t.widthFactor=e.xScale??1,t.oblique=r.AcGeMathUtil.degToRad(e.obliqueAngle||0),t.thickness=e.thickness??0,t.normal.copy(e.extrusionDirection??{x:0,y:0,z:1}),t}convertSolid(e){const t=new r.AcDbSolid;return(e.points??[]).forEach((i,a)=>t.setPointAt(a,i)),t.thickness=e.thickness??0,t}convert3dSolid(e){const t=e.handle?String(e.handle).trim().toUpperCase():"",n=t?ct(this.acdsDataByHandle[t]):void 0;let i=typeof e.data=="string"?e.data:"";return!n&&!i&&e.historyObjectSoftId&&(i=it(e.historyObjectSoftId,this.objectByHandle)),new r.AcDb3dSolid({sabBytes:n,satText:i,version:e.version})}convertPolyline(e){var c;const t=!!(e.flag&1),n=!!(e.flag&8),i=!!(e.flag&16),a=!!(e.flag&64),o=!!(e.flag&32),s=[],d=[],A=[];if((c=e.vertices)==null||c.map(l=>{l.flag&nt.SPLINE_CONTROL_POINT||(a&&l.flag&128?l.flag&64?(s.push({x:l.x,y:l.y,z:l.z}),d.push(l.bulge??0)):l.faces&&l.faces.length>=3&&A.push([...l.faces]):(s.push({x:l.x,y:l.y,z:l.z}),d.push(l.bulge??0)))}),i){const l=e.meshMVertexCount,g=e.meshNVertexCount;return new r.AcDbPolygonMesh(l,g,s,t,o)}else{if(a)return new r.AcDbPolyFaceMesh(s,A);if(n){let l=r.AcDbPoly3dType.SimplePoly;return e.flag&4&&(e.smoothType==He.CUBIC?l=r.AcDbPoly3dType.CubicSplinePoly:e.smoothType==He.QUADRATIC&&(l=r.AcDbPoly3dType.QuadSplinePoly)),new r.AcDb3dPolyline(l,s,t)}else{let l=r.AcDbPoly2dType.SimplePoly;return e.flag&2?l=r.AcDbPoly2dType.FitCurvePoly:e.flag&4&&(e.smoothType==He.CUBIC?l=r.AcDbPoly2dType.CubicSplinePoly:e.smoothType==He.QUADRATIC&&(l=r.AcDbPoly2dType.QuadSplinePoly)),new r.AcDb2dPolyline(l,s,0,t,e.startWidth,e.endWidth,d)}}}convertLWPolyline(e){var i;const t=new r.AcDbPolyline;t.closed=!!(e.flag&1);const n=e.constantWidth??-1;return(i=e.vertices)==null||i.forEach((a,o)=>{t.addVertexAt(o,new r.AcGePoint2d(a.x,a.y),a.bulge,a.startWidth??n,a.endWidth??n)}),t}convertHatch(e){var i;const t=new r.AcDbHatch;if((i=e.definitionLines)==null||i.forEach(a=>{t.definitionLines.push({angle:r.AcGeMathUtil.degToRad(a.angle||0),base:a.base,offset:a.offset,dashLengths:a.numberOfDashLengths>0?a.dashLengths:[]})}),t.isSolidFill=e.solidFill==et.SolidFill,t.hatchStyle=e.hatchStyle,t.patternName=e.patternName,t.patternType=e.patternType,t.patternAngle=e.patternAngle==null?0:r.AcGeMathUtil.degToRad(e.patternAngle),t.patternScale=e.patternScale==null?0:e.patternScale,e.boundaryPaths.forEach(a=>{if(a.boundaryPathTypeFlag&2){const s=a,d=new r.AcGePolyline2d;d.closed=s.isClosed,s.vertices.forEach((A,c)=>{d.addVertexAt(c,{x:A.x,y:A.y,bulge:A.bulge})}),t.add(d)}else{const s=a,d=[];s.edges.forEach(c=>{if(c.type==1){const l=c;d.push(new r.AcGeLine2d(l.start,l.end))}else if(c.type==2){const l=c;d.push(new r.AcGeCircArc2d(l.center,l.radius,r.AcGeMathUtil.degToRad(l.startAngle||0),r.AcGeMathUtil.degToRad(l.endAngle||0),!l.isCCW))}else if(c.type==3){const l=c;new r.AcGeVector2d().subVectors(l.end,l.center);const T=Math.sqrt(Math.pow(l.end.x,2)+Math.pow(l.end.y,2)),L=T*l.lengthOfMinorAxis;let p=r.AcGeMathUtil.degToRad(l.startAngle||0),P=r.AcGeMathUtil.degToRad(l.endAngle||0);const oe=Math.atan2(l.end.y,l.end.x);l.isCCW||(p=Math.PI*2-p,P=Math.PI*2-P),d.push(new r.AcGeEllipseArc2d({...l.center,z:0},T,L,p,P,!l.isCCW,oe))}else if(c.type==4){const l=r.AcGeSpline3d.fromDwgSplineEdge(c);l&&d.push(l)}});const A=r.AcGeLoop2d.buildFromEdges(d);A.length==0&&d.length>0?t.add(new r.AcGeLoop2d(d)):A.forEach(c=>t.add(c))}}),e.gradientFlag){const a=e;if(t.hatchObjectType=r.AcDbHatchObjectType.GradientObject,t.gradientName=a.gradientName,t.gradientAngle=a.gradientRotation??0,t.gradientShift=a.gradientDefinition??0,t.gradientOneColorMode=a.gradientColorFlag==1,t.shadeTintValue=a.colorTint??0,a.gradientColors){const o=a.gradientColors.length;o>1?(t.gradientStartColor=a.gradientColors[0].rgb,t.gradientEndColor=a.gradientColors[1].rgb):o>0&&(t.gradientStartColor=a.gradientColors[0].rgb)}}return t}convertTable(e){const t=new r.AcDbTable(e.name,e.rowCount,e.columnCount);return t.tableDataVersion=e.version,t.tableStyleId=e.tableStyleId,t.owningBlockRecordId=e.blockRecordHandle,e.directionVector&&(t.horizontalDirection=new r.AcGeVector3d(e.directionVector)),t.attachmentPoint=e.attachmentPoint,t.position.copy(e.startPoint),t.tableValueFlag=e.tableValue,t.tableOverrideFlag=e.overrideFlag,t.borderColorOverrideFlag=e.borderColorOverrideFlag,t.borderLineweightOverrideFlag=e.borderLineWeightOverrideFlag,t.borderVisibilityOverrideFlag=e.borderVisibilityOverrideFlag,e.columnWidthArr.forEach((n,i)=>t.setColumnWidth(i,n)),e.rowHeightArr.forEach((n,i)=>t.setRowHeight(i,n)),e.cells.forEach((n,i)=>{t.setCell(i,n)}),t}convertText(e){const t=new r.AcDbText;t.textString=e.text,t.styleName=e.styleName,t.height=e.textHeight,t.position.copy(e.startPoint);const n=e.endPoint,i=!n||n.x===0&&n.y===0&&(n.z??0)===0;return n&&!i?t.alignmentPoint.copy(n):t.alignmentPoint.copy(e.startPoint),t.rotation=r.AcGeMathUtil.degToRad(e.rotation||0),t.oblique=e.obliqueAngle??0,t.thickness=e.thickness,t.horizontalMode=e.halign,t.verticalMode=e.valign,t.widthFactor=e.xScale??1,t}convertTolerance(e){const t=new r.AcDbFcf;return t.location.copy(e.position),t.text=e.text,t.dimensionStyle=e.styleName??"",e.extrusionDirection&&t.normal.copy(e.extrusionDirection),e.xAxisDirection&&t.direction.copy(e.xAxisDirection),t}convertMText(e){const t=new r.AcDbMText;t.contents=e.text,e.styleName!=null&&(t.styleName=e.styleName),t.height=e.height,t.width=e.width,t.rotation=r.AcGeMathUtil.degToRad(e.rotation||0),t.location=e.insertionPoint,t.attachmentPoint=e.attachmentPoint,e.direction&&(t.direction=new r.AcGeVector3d(e.direction)),t.drawingDirection=e.drawingDirection;const n=this.readMTextExtentsWidth(e);return n!=null&&n>0&&(t.extentsWidth=n),t}readMTextExtentsWidth(e){const t=e;return t.extentsWidth??t.actualWidth}convertLeader(e){var n;const t=new r.AcDbLeader;return(n=e.vertices)==null||n.forEach(i=>{t.appendVertex(i)}),t.hasArrowHead=e.isArrowheadEnabled,t.hasHookLine=e.isHooklineExists,t.isHookLineSameDirection=e.isHooklineSameDirection,t.isSplined=e.isSpline,t.dimensionStyle=e.styleName??"",t.annoType=e.leaderCreationFlag,t.textHeight=e.textHeight??0,t.textWidth=e.textWidth??0,t.byBlockColor=e.byBlockColor,t.associatedAnnotation=e.associatedAnnotation??"",e.normal&&(t.normal=e.normal),e.horizontalDirection&&(t.horizontalDirection=e.horizontalDirection),e.offsetFromBlock&&(t.offsetFromBlock=e.offsetFromBlock),e.offsetFromAnnotation&&(t.offsetFromAnnotation=e.offsetFromAnnotation),t}convertMLine(e){const t=new r.AcDbMLine;return t.styleName=e.name||"STANDARD",t.styleObjectHandle=e.styleObjectHandle,t.scale=e.scale,t.justification=e.justification,t.flags=e.flags,t.styleCount=e.styleCount,t.startPosition=e.startPosition,t.normal=e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t.segments=(e.segments??[]).map(n=>{var i;return{position:n.position,direction:n.direction,miterDirection:n.miterDirection,elements:((i=n.elements)==null?void 0:i.map(a=>({parameterCount:a.parameterCount,parameters:a.parameters??[],fillCount:a.fillCount,fillParameters:a.fillParameters??[]})))??[]}}),t}convertMLeader(e){var H,Se;const t=new r.AcDbMLeader,n=e;t.version=e.version,t.leaderStyleId=e.leaderStyleId,e.leaderStyleId&&(t.mleaderStyleId=e.leaderStyleId),t.propertyOverrideFlag=e.propertyOverrideFlag,t.leaderLineType=e.leaderLineType??r.AcDbMLeaderLineType.StraightLeader,e.leaderLineColor!=null&&(t.leaderLineColor=r.decodeMLeaderStyleRawColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,t.leaderLineWeight=e.leaderLineWeight,t.landingEnabled=e.landingEnabled,t.doglegEnabled=e.doglegEnabled??!1,t.doglegLength=e.doglegLength??0,t.arrowheadId=e.arrowheadId,t.arrowheadSize=e.arrowheadSize,t.textStyleId=e.textStyleId,t.textLeftAttachmentType=e.textLeftAttachmentType,t.textRightAttachmentType=e.textRightAttachmentType,t.textAngleType=e.textAngleType,t.textAlignmentType=e.textAlignmentType,e.textColor!=null&&(t.textColor=r.decodeMLeaderStyleRawColor(e.textColor)),t.textFrameEnabled=e.textFrameEnabled,t.landingGap=e.landingGap,t.textAttachment=e.textAttachment,t.textFlowDirection=e.textFlowDirection,this.isValidHandleId(e.blockContentId)&&(t.blockContentId=e.blockContentId),e.blockContentColor!=null&&(t.blockContentColor=r.decodeMLeaderStyleRawColor(e.blockContentColor)),t.blockContentRotation=e.blockContentRotation,t.blockContentConnectionType=e.blockContentConnectionType,t.annotativeScaleEnabled=e.annotativeScaleEnabled,t.arrowheadOverrides=e.arrowheadOverrides?e.arrowheadOverrides.map(h=>({...h})):[],t.blockAttributes=e.blockAttributes?e.blockAttributes.map(h=>({...h})):[],t.textDirectionNegative=e.textDirectionNegative,t.textAlignInIPE=e.textAlignInIPE,t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection,t.topTextAttachmentDirection=e.topTextAttachmentDirection,t.contentScale=e.contentScale,t.textLineSpacingStyle=e.textLineSpacingStyle,e.textBackgroundColor!=null&&(t.textBackgroundColor=r.decodeMLeaderStyleRawColor(e.textBackgroundColor)),t.textBackgroundScaleFactor=e.textBackgroundScaleFactor,t.textBackgroundTransparency=e.textBackgroundTransparency,t.textBackgroundColorOn=e.textBackgroundColorOn,t.textFillOn=e.textFillOn,t.textColumnType=e.textColumnType,t.textUseAutoHeight=e.textUseAutoHeight,t.textColumnWidth=e.textColumnWidth,t.textColumnGutterWidth=e.textColumnGutterWidth,t.textColumnFlowReversed=e.textColumnFlowReversed,t.textColumnHeight=e.textColumnHeight,t.textUseWordBreak=e.textUseWordBreak,t.hasMText=e.hasMText,t.hasBlock=e.hasBlock,t.planeNormalReversed=e.planeNormalReversed,e.blockContentScale&&(t.blockContentScale=new r.AcGeVector3d(e.blockContentScale)),e.contentBasePosition&&(t.contentBasePosition=new r.AcGePoint3d().copy(e.contentBasePosition)),e.textAnchor&&(t.textAnchor=new r.AcGePoint3d().copy(e.textAnchor)),e.planeOrigin&&(t.planeOrigin=new r.AcGePoint3d().copy(e.planeOrigin)),e.planeXAxisDirection&&(t.planeXAxisDirection=new r.AcGeVector3d(e.planeXAxisDirection)),e.planeYAxisDirection&&(t.planeYAxisDirection=new r.AcGeVector3d(e.planeYAxisDirection));const i=n.textContent,a=i&&typeof i=="object"?i:void 0,o=typeof i=="string"&&i.length>0||this.readString(a??{},["text","contents"])!=null||this.readString(n,["text","contents","mtext"])!=null,s=e.contentType??(o?r.AcDbMLeaderContentType.MTextContent:e.blockContent?r.AcDbMLeaderContentType.BlockContent:r.AcDbMLeaderContentType.NoneContent);t.contentType=s;const d=this.readPoint(n,["normal","extrusionDirection"]);d&&(t.normal=d);const A=this.readString(a??{},["styleName","textStyleName","textStyle"])??this.readString(n,["textStyleName","textStyle","styleName"]);A&&(t.textStyleName=A);const c=this.readPositiveNumber(a??{},["textHeight","height"])??this.readPositiveNumber(n,["textHeight","mtextHeight","textContentHeight"])??this.readPositiveNumber(n,["arrowheadSize","contentScale"]);c!=null&&(t.textHeight=c);const l=this.readPositiveNumber(a??{},["textWidth","width"])??this.readPositiveNumber(n,["textWidth","mtextWidth","textContentWidth"]);l!=null&&(t.textWidth=l),t.textLineSpacingFactor=this.readNumber(a??{},["lineSpacingFactor","textLineSpacingFactor"])??this.readNumber(n,["textLineSpacingFactor"])??t.textLineSpacingFactor;const g=this.readNumber(a??{},["textRotation","rotation"])??this.readNumber(n,["textRotation","mtextRotation","textContentRotation"]);g!=null&&(t.textRotation=r.AcGeMathUtil.degToRad(g));const T=this.readPoint(n,["textDirection","mtextDirection","textDirectionVector"]);T&&(t.textDirection=T);const L=this.readNumber(n,["textAttachmentPoint","attachmentPoint"]);L!=null&&L!==0&&(t.textAttachmentPoint=L);const p=e.textAttachmentDirection;p!=null&&(t.textAttachmentDirection=p);const P=this.readNumber(n,["textDrawingDirection","drawingDirection"]);P!=null&&(t.textDrawingDirection=P);const oe=typeof i=="string"?i:this.readString(a??{},["text","contents"])??this.readString(n,["text","contents","mtext"]),Ce=this.readPoint(a??{},["anchorPoint","textAnchor","textLocation","textPosition","textAnchorPoint"])??this.readPoint(n,["textAnchor","textLocation","textPosition","textAnchorPoint","contentBasePosition"]);if(oe!=null&&Ce&&(t.mtextContent={text:oe,anchorPoint:Ce}),e.blockContent){const h=e.blockContent,We=e.blockContent.blockContentId;if(this.isValidHandleId(We)){const Ze=this.readNumber(h,["color"]);t.blockContent={blockContentId:We,normal:this.readPoint(h,["normal"]),position:e.blockContent.position,scale:this.readPoint(h,["scale"]),rotation:this.readNumber(h,["rotation"]),color:Ze!=null?r.decodeMLeaderStyleRawColor(Ze):void 0,transformationMatrix:Array.isArray(e.blockContent.transformationMatrix)?e.blockContent.transformationMatrix:[]}}}else this.isValidHandleId(e.blockContentId)&&(t.blockContent={blockContentId:e.blockContentId,scale:e.blockContentScale,rotation:e.blockContentRotation,color:t.blockContentColor,transformationMatrix:[]});return(H=this.readMLeaderLeaders(n))==null||H.forEach(h=>{t.addLeader({lastLeaderLinePoint:h.lastLeaderLinePoint,lastLeaderLinePointSet:h.lastLeaderLinePointSet,doglegVector:h.doglegVector,doglegVectorSet:h.doglegVectorSet,doglegLength:h.doglegLength??e.doglegLength,breaks:h.breaks,leaderBranchIndex:h.leaderBranchIndex,leaderLines:h.leaderLines})}),t.numberOfLeaders===0&&((Se=this.readLeaderLineArray(n))==null||Se.forEach(h=>{t.addLeader({doglegLength:e.doglegLength}),t.addLeaderLine(t.numberOfLeaders-1,h)})),t.numberOfLeaders===0&&e.contentBasePosition&&t.addLeader({lastLeaderLinePoint:e.contentBasePosition,lastLeaderLinePointSet:!0,doglegLength:e.doglegLength}),t}convertDimension(e){if(e.subclassMarker=="AcDbAlignedDimension"){const t=e,n=new r.AcDbAlignedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(n.dimBlockPosition={...t.insertionPoint,z:0}),n.rotation=r.AcGeMathUtil.degToRad(t.rotationAngle||0),this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDbRotatedDimension"){const t=e,n=new r.AcDbRotatedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(n.dimBlockPosition={...t.insertionPoint,z:0}),n.rotation=r.AcGeMathUtil.degToRad(t.rotationAngle||0),this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDb3PointAngularDimension"){const t=e,n=new r.AcDb3PointAngularDimension(t.centerPoint,t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDb2LineAngularDimension"){const t=e,n=t.centerPoint??t.subDefinitionPoint2??t.definitionPoint,i=t.definitionPoint??t.subDefinitionPoint2;if(!n||!t.subDefinitionPoint1||!t.subDefinitionPoint2||!i)return null;const a=new r.AcDb3PointAngularDimension(n,t.subDefinitionPoint1,t.subDefinitionPoint2,i);return this.processDimensionCommonAttrs(e,a),a}else if(e.subclassMarker=="AcDbOrdinateDimension"){const t=e,n=new r.AcDbOrdinateDimension(t.subDefinitionPoint1,t.subDefinitionPoint2);return this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDbRadialDimension"){const t=e,n=new r.AcDbRadialDimension(t.definitionPoint,t.subDefinitionPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDbDiametricDimension"){const t=e,n=new r.AcDbDiametricDimension(t.definitionPoint,t.subDefinitionPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,n),n}return null}processImage(e,t){t.position.copy(e.position),t.brightness=e.brightness,t.contrast=e.contrast,t.fade=e.fade,t.imageSize.copy(e.imageSize),t.isShownClipped=(e.flags|4)>0,t.isImageShown=(e.flags|3)>0,t.isImageTransparent=(e.flags|8)>0,t.imageDefId=e.imageDefHandle,t.isClipped=e.isClipped,e.clippingBoundaryPath.forEach(n=>{t.clipBoundary.push(new r.AcGePoint2d(n))}),t.width=Math.sqrt(e.uPixel.x**2+e.uPixel.y**2+e.uPixel.z**2)*e.imageSize.x,t.height=Math.sqrt(e.vPixel.x**2+e.vPixel.y**2+e.vPixel.z**2)*e.imageSize.y,t.rotation=Math.atan2(e.uPixel.y,e.uPixel.x)}convertImage(e){const t=new r.AcDbRasterImage;return this.processImage(e,t),t.clipBoundaryType=e.clippingBoundaryType,t}processWipeout(e,t){t.position.copy(e.position),t.brightness=e.brightness,t.contrast=e.contrast,t.fade=e.fade,t.imageSize.copy(e.imageSize),t.isShownClipped=(e.displayFlag|4)>0,t.isImageShown=(e.displayFlag|3)>0,t.isImageTransparent=(e.displayFlag|8)>0,t.imageDefId=e.imageDefHardId,t.isClipped=e.isClipping,e.boundary.forEach(n=>{t.clipBoundary.push(new r.AcGePoint2d(n))}),t.clipBoundaryType=e.boundaryType,t.width=Math.sqrt(e.uDirection.x**2+e.uDirection.y**2+e.uDirection.z**2)*e.imageSize.x,t.height=Math.sqrt(e.vDirection.x**2+e.vDirection.y**2+e.vDirection.z**2)*e.imageSize.y,t.rotation=Math.atan2(e.uDirection.y,e.uDirection.x)}convertWipeout(e){const t=new r.AcDbWipeout;return this.processWipeout(e,t),t}convertViewport(e){const t=new r.AcDbViewport;return t.number=e.viewportId,t.centerPoint.copy(e.viewportCenter),t.height=e.height,t.width=e.width,t.viewCenter.copy(e.displayCenter),t.viewHeight=e.viewHeight,t}convertRay(e){const t=new r.AcDbRay;return t.basePoint.copy(e.position),t.unitDir.copy(e.direction),t}convertXline(e){const t=new r.AcDbXline;return t.basePoint.copy(e.position),t.unitDir.copy(e.direction),t}convertBlockReference(e){const t=new r.AcDbBlockReference(e.name);return e.insertionPoint&&t.position.copy(e.insertionPoint),t.scaleFactors.x=e.xScale||1,t.scaleFactors.y=e.yScale||1,t.scaleFactors.z=e.zScale||1,t.rotation=e.rotation!=null?r.AcGeMathUtil.degToRad(e.rotation):0,t.normal.copy(e.extrusionDirection??{x:0,y:0,z:1}),t}processDimensionCommonAttrs(e,t){t.dimBlockId=e.name,t.textPosition.copy(e.textPoint),t.textRotation=e.textRotation||0,e.textLineSpacingFactor&&(t.textLineSpacingFactor=e.textLineSpacingFactor),e.textLineSpacingStyle&&(t.textLineSpacingStyle=e.textLineSpacingStyle),t.dimensionStyleName=e.styleName,t.dimensionText=e.text||"",t.measurement=e.measurement,t.normal.copy(e.extrusionDirection??{x:0,y:0,z:1})}processCommonAttrs(e,t){if(t.layer=e.layer||"0",e.handle&&(t.objectId=e.handle.toString()),t.ownerId=e.ownerBlockRecordSoftId||"",e.lineType!=null&&(t.lineType=e.lineType),e.lineweight!=null&&(t.lineWeight=e.lineweight),e.lineTypeScale!=null&&(t.linetypeScale=e.lineTypeScale),e.color!=null||e.colorIndex!=null||e.colorName){const n=new r.AcCmColor;e.color!=null&&n.setRGBValue(e.color),e.colorIndex!=null&&(n.colorIndex=e.colorIndex),e.colorName&&(n.colorName=e.colorName),t.color=n}e.isVisible!=null&&(t.visibility=!e.isVisible),e.transparency!=null&&(t.transparency=r.AcCmTransparency.deserialize(e.transparency))}isValidHandleId(e){return e!=null&&e!==""&&e!=="0"}readNumber(e,t){for(const n of t){const i=e[n];if(typeof i=="number"&&Number.isFinite(i))return i}}readPositiveNumber(e,t){const n=this.readNumber(e,t);return n!=null&&n>0?n:void 0}readString(e,t){for(const n of t){const i=e[n];if(typeof i=="string")return i}}readBoolean(e,t){for(const n of t){const i=e[n];if(typeof i=="boolean")return i;if(typeof i=="number")return i!==0}}readPoint(e,t){for(const n of t){const i=e[n];if(this.isPointLike(i))return i;if(Array.isArray(i)&&typeof i[0]=="number"&&typeof i[1]=="number")return{x:i[0],y:i[1],z:i[2]??0}}}readLeaderLineArray(e){const t=e.leaderLines;if(Array.isArray(t))return t.map(i=>{if(!i||typeof i!="object")return;const a=i.vertices;return Array.isArray(a)?a.filter(o=>this.isPointLike(o)):void 0}).filter(i=>!!i&&i.length>0);const n=e.vertices;if(Array.isArray(n)){const i=n.filter(a=>this.isPointLike(a));return i.length>0?[i]:void 0}}readMLeaderLeaders(e){const t=e.leaderSections;if(!Array.isArray(t))return;const n=[];return t.forEach(i=>{if(!i||typeof i!="object")return;const a=i,o=a.leaderLines,s=Array.isArray(o)?o.reduce((L,p)=>{const P=this.readMLeaderLine(p);return P&&L.push(P),L},[]):void 0,d={},A=this.readPoint(a,["lastLeaderLinePoint"]),c=this.readPoint(a,["doglegVector"]),l=this.readNumber(a,["doglegLength"]),g=this.readMLeaderBreaks(a.breaks),T=this.readNumber(a,["leaderBranchIndex"]);A&&(d.lastLeaderLinePoint=A),a.lastLeaderLinePointSet!=null&&(d.lastLeaderLinePointSet=this.readBoolean(a,["lastLeaderLinePointSet"])),c&&(d.doglegVector=c),a.doglegVectorSet!=null&&(d.doglegVectorSet=this.readBoolean(a,["doglegVectorSet"])),l!=null&&(d.doglegLength=l),g&&(d.breaks=g),T!=null&&(d.leaderBranchIndex=T),s&&(d.leaderLines=s),n.push(d)}),n}readMLeaderLine(e){if(!e||typeof e!="object")return;const t=e,n=t.vertices,i=Array.isArray(n)?n.filter(d=>this.isPointLike(d)):[],a=this.readMLeaderBreaks(t.breaks),o=Array.isArray(t.breakPointIndexes)?t.breakPointIndexes.filter(d=>typeof d=="number"):void 0,s=this.readNumber(t,["leaderLineIndex"]);return i.length>0||a&&a.length>0?{vertices:i,breakPointIndexes:o,leaderLineIndex:s,breaks:a}:void 0}readMLeaderBreaks(e){if(!Array.isArray(e))return;const t=e.map(n=>{if(!n||typeof n!="object")return;const i=n,a=this.readPoint(i,["start"]),o=this.readPoint(i,["end"]),s=this.readNumber(i,["index"]);if(!a||!o)return;const d={start:a,end:o};return s!=null&&(d.index=s),d}).filter(n=>!!n);return t.length>0?t:void 0}isPointLike(e){return!!e&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"}}class dt{convertLayout(e,t){var a,o;const n=new r.AcDbLayout;n.layoutName=e.layoutName,n.tabOrder=e.tabOrder,n.plotSettingsName=e.pageSetupName,n.plotCfgName=e.configName,n.canonicalMediaName=e.paperSize,n.plotViewName=e.plotViewName,n.currentStyleSheet=e.currentStyleSheet,n.plotPaperMargins={left:e.marginLeft,right:e.marginRight,top:e.marginTop,bottom:e.marginBottom},n.plotPaperSize.copy({x:e.paperWidth,y:e.paperHeight}),n.plotOrigin.copy({x:e.plotOriginX,y:e.plotOriginY}),n.plotWindowArea.min.copy({x:e.windowAreaXMin,y:e.windowAreaYMin}),n.plotWindowArea.max.copy({x:e.windowAreaXMax,y:e.windowAreaYMax}),n.customPrintScale={numerator:e.printScaleNumerator,denominator:e.printScaleDenominator},n.plotPaperUnits=e.plotPaperUnit,n.plotRotation=e.plotRotation,n.plotType=e.plotType,n.stdScaleType=e.standardScaleType,n.shadePlot=(()=>{switch(e.shadePlotMode){case 1:return r.AcDbPlotShadePlotType.kWireframe;case 2:return r.AcDbPlotShadePlotType.kHidden;case 3:return r.AcDbPlotShadePlotType.kRendered;default:return r.AcDbPlotShadePlotType.kAsDisplayed}})(),n.shadePlotResLevel=(()=>{switch(e.shadePlotResolution){case 1:return r.AcDbPlotShadePlotResLevel.kPreview;case 2:return r.AcDbPlotShadePlotResLevel.kNormal;case 3:return r.AcDbPlotShadePlotResLevel.kPresentation;case 4:return r.AcDbPlotShadePlotResLevel.kMaximum;case 5:return r.AcDbPlotShadePlotResLevel.kCustom;default:return r.AcDbPlotShadePlotResLevel.kDraft}})(),e.shadePlotCustomDPI!=null&&(n.shadePlotCustomDPI=e.shadePlotCustomDPI),e.shadePlotId&&(n.shadePlotId=e.shadePlotId);const i=e.layoutFlag??0;if(n.plotViewportBorders=(i&1)!==0,n.showPlotStyles=(i&2)!==0,n.plotCentered=(i&4)!==0,n.plotHidden=(i&8)!==0,n.useStandardScale=(i&16)!==0,n.plotPlotStyles=(i&32)!==0,n.scaleLineweights=(i&64)!==0,n.printLineweights=(i&128)!==0,n.drawViewportsFirst=(i&512)!==0,n.modelType=(i&1024)!==0,e.viewportId&&n.viewportArray.push(e.viewportId),e.layoutName==="Model"){const s=r.AcDbBlockTableRecord.MODEL_SPACE_NAME.toUpperCase();(a=t.tables.BLOCK_RECORD)==null||a.entries.some(d=>d.name.toUpperCase()===s?(n.blockTableRecordId=d.handle,!0):!1)}else(o=t.tables.BLOCK_RECORD)==null||o.entries.some(s=>s.layoutObjects===e.handle?(n.blockTableRecordId=s.handle,!0):!1),n.blockTableRecordId||(n.blockTableRecordId=e.paperSpaceTableId);return e.minLimit&&n.limits.min.copy(e.minLimit),e.maxLimit&&n.limits.max.copy(e.maxLimit),e.minExtent&&n.extents.min.copy(e.minExtent),e.maxExtent&&n.extents.max.copy(e.maxExtent),this.processCommonAttrs(e,n),n}convertImageDef(e){const t=new r.AcDbRasterImageDef;return t.sourceFileName=e.fileName,this.processCommonAttrs(e,t),t}convertMLeaderStyle(e){const t=new r.AcDbMLeaderStyle;return t.unknown1=e.unknown1,e.contentType!=null&&(t.contentType=e.contentType),e.drawMLeaderOrderType!=null&&(t.drawMLeaderOrderType=e.drawMLeaderOrderType),e.drawLeaderOrderType!=null&&(t.drawLeaderOrderType=e.drawLeaderOrderType),e.maxLeaderSegmentPoints!=null&&(t.maxLeaderSegmentPoints=e.maxLeaderSegmentPoints),e.firstSegmentAngleConstraint!=null&&(t.firstSegmentAngleConstraint=e.firstSegmentAngleConstraint),e.secondSegmentAngleConstraint!=null&&(t.secondSegmentAngleConstraint=e.secondSegmentAngleConstraint),e.leaderLineType!=null&&(t.leaderLineType=e.leaderLineType),e.leaderLineColor!=null&&(t.leaderLineColor=r.decodeMLeaderStyleRawColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,e.leaderLineWeight!=null&&(t.leaderLineWeight=e.leaderLineWeight),e.landingEnabled!=null&&(t.landingEnabled=e.landingEnabled),e.landingGap!=null&&(t.landingGap=e.landingGap),e.doglegEnabled!=null&&(t.doglegEnabled=e.doglegEnabled),e.doglegLength!=null&&(t.doglegLength=e.doglegLength),e.description!=null&&(t.description=e.description),t.arrowheadId=e.arrowheadId,e.arrowheadSize!=null&&(t.arrowheadSize=e.arrowheadSize),e.defaultMTextContents!=null&&(t.defaultMTextContents=e.defaultMTextContents),t.textStyleId=e.textStyleId,e.textLeftAttachmentType!=null&&(t.textLeftAttachmentType=e.textLeftAttachmentType),e.textAngleType!=null&&(t.textAngleType=e.textAngleType),e.textAlignmentType!=null&&(t.textAlignmentType=e.textAlignmentType),e.textRightAttachmentType!=null&&(t.textRightAttachmentType=e.textRightAttachmentType),e.textColor!=null&&(t.textColor=r.decodeMLeaderStyleRawColor(e.textColor)),e.textHeight!=null&&(t.textHeight=e.textHeight),e.textFrameEnabled!=null&&(t.textFrameEnabled=e.textFrameEnabled),e.textAlignAlwaysLeft!=null&&(t.textAlignAlwaysLeft=e.textAlignAlwaysLeft),e.alignSpace!=null&&(t.alignSpace=e.alignSpace),t.blockContentId=e.blockContentId,e.blockContentColor!=null&&(t.blockContentColor=r.decodeMLeaderStyleRawColor(e.blockContentColor)),e.blockContentScale&&(t.blockContentScale={x:e.blockContentScale.x,y:e.blockContentScale.y,z:e.blockContentScale.z??1}),e.blockContentScaleEnabled!=null&&(t.blockContentScaleEnabled=e.blockContentScaleEnabled),e.blockContentRotation!=null&&(t.blockContentRotation=e.blockContentRotation),e.blockContentRotationEnabled!=null&&(t.blockContentRotationEnabled=e.blockContentRotationEnabled),e.blockContentConnectionType!=null&&(t.blockContentConnectionType=e.blockContentConnectionType),e.scale!=null&&(t.scale=e.scale),e.overwritePropertyValue!=null&&(t.overwritePropertyValue=e.overwritePropertyValue),e.annotative!=null&&(t.annotative=e.annotative),e.breakGapSize!=null&&(t.breakGapSize=e.breakGapSize),e.textAttachmentDirection!=null&&(t.textAttachmentDirection=e.textAttachmentDirection),e.bottomTextAttachmentDirection!=null&&(t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection),e.topTextAttachmentDirection!=null&&(t.topTextAttachmentDirection=e.topTextAttachmentDirection),t.unknown2=e.unknown2,this.processCommonAttrs(e,t),t}convertMLineStyle(e){var i;const t=new r.AcDbMlineStyle;if(e.styleName!=null&&(t.styleName=e.styleName),e.flags!=null&&(t.flags=e.flags),e.description!=null&&(t.description=e.description),e.fillColor!=null)t.fillColor=new r.AcCmColor().setRGBValue(e.fillColor);else if(e.fillColorIndex!=null){const a=new r.AcCmColor;a.colorIndex=e.fillColorIndex,t.fillColor=a}e.startAngle!=null&&(t.startAngle=e.startAngle),e.endAngle!=null&&(t.endAngle=e.endAngle);const n=Math.max(e.elementCount??0,((i=e.elements)==null?void 0:i.length)??0);return n>0&&(t.elements=Array.from({length:n},(a,o)=>{var s,d,A,c;return{offset:((d=(s=e.elements)==null?void 0:s[o])==null?void 0:d.offset)??0,color:(()=>{var g,T,L,p;const l=new r.AcCmColor;return((T=(g=e.elements)==null?void 0:g[o])==null?void 0:T.color)!=null?l.setRGBValue(e.elements[o].color):l.colorIndex=((p=(L=e.elements)==null?void 0:L[o])==null?void 0:p.colorIndex)??256,l})(),lineType:((c=(A=e.elements)==null?void 0:A[o])==null?void 0:c.lineType)??"BYLAYER"}})),this.processCommonAttrs(e,t),t}processCommonAttrs(e,t){t.objectId=e.handle,e.ownerObjectId!=null&&(t.ownerId=e.ownerObjectId)}}class ut extends r.AcDbDatabaseConverter{constructor(e={}){super(e),this.config.parserWorkerUrl||(this.config.parserWorkerUrl="/assets/dxf-parser-worker.js")}async parse(e,t){const n=this.config,i=this.getParserWorkerTimeout(e,t);if(n.useWorker&&n.parserWorkerUrl){const a=r.createWorkerApi({workerUrl:n.parserWorkerUrl,timeout:i,maxConcurrentWorkers:1}),o=await a.execute(e);return a.destroy(),r.AcDbOpenDatabaseError.throwOnWorkerParseFailure(o),{model:o.data,data:{unknownEntityCount:0}}}else throw new Error("dxf converter can run in web worker only!")}getFonts(e){var a,o,s,d,A;const t=e.blocks??{},n=new Map;for(const c of((o=(a=e.tables)==null?void 0:a.DIMSTYLE)==null?void 0:o.entries)??[])n.set(c.name,c.DIMTXSTY||r.DEFAULT_TEXT_STYLE);const i=[...e.entities??[]];for(const c of Object.values(t))(s=c.entities)!=null&&s.length&&i.push(...c.entities);return new r.AcDbFontNameCollector({styles:((d=e.tables.STYLE)==null?void 0:d.entries)??[],textStyleVar:((A=e.header)==null?void 0:A.$TEXTSTYLE)||r.DEFAULT_TEXT_STYLE}).collect(i,{getEntityFontInfo:c=>{if(c.type=="MTEXT"){const l=c;return{styleName:l.styleName,formattedText:l.text,resolveStyle:!0}}if(c.type=="TEXT"||c.type=="ATTRIB"||c.type=="ATTDEF")return{styleName:c.styleName,resolveStyle:!0};if(c.type=="MULTILEADER"||c.type=="MLEADER"){const l=c,g=typeof l.textContent=="string"?l.textContent:"";return{styleName:typeof l.textStyleName=="string"?l.textStyleName:typeof l.styleName=="string"?l.styleName:void 0,formattedText:g,resolveStyle:!0}}if(c.type=="TOLERANCE"){const l=c;return{styleName:this.resolveDimStyleTextStyle(n,l.styleName),formattedText:l.text,resolveStyle:!0}}if(c.type=="INSERT")return{blockName:c.name};if(c.type=="DIMENSION"){const l=c;return l.name?{blockName:l.name}:null}return null},getBlockEntities:c=>{var l;return(l=t[c])==null?void 0:l.entities}})}resolveDimStyleTextStyle(e,t){const n=t==null?void 0:t.trim();if(!n)return;const i=e.get(n);if(i)return i;const a=n.toUpperCase();for(const[o,s]of e)if(o.toUpperCase()===a)return s}async processEntities(e,t,n,i,a){var g;const o=new Ke;o.setObjectByHandle(e.objects.byHandle??{}),o.setAcdsDataByHandle(((g=e.acdsData)==null?void 0:g.byOwnerHandle)??{});let s=e.entities;const d=s.length,A=new r.AcDbBatchProcessing(d,100-i.value,n);this.config.convertByEntityType&&(s=this.groupAndFlattenByType(s));const c=new Map;for(let T=0;T<d;T++){const L=s[T];if(L.type==="ATTRIB"){const p=o.convert(L);if(p&&p.ownerId&&p.ownerId!=="0"){let P=c.get(p==null?void 0:p.ownerId);P==null&&(P=[],c.set(p.ownerId,P)),P.push(p)}}}const l=t.tables.blockTable.modelSpace;await A.processChunk(async(T,L)=>{let p=[],P=T<L?s[T].type:"";for(let Ce=T;Ce<L;Ce++){const H=s[Ce];if(!(H.ownerBlockRecordSoftId&&H.ownerBlockRecordSoftId!==l.objectId)&&H.type!=="ATTRIB"){const Se=o.convert(H);if(Se){if(this.config.convertByEntityType&&H.type!==P&&(l.appendEntity(p),p=[],P=H.type),H.type==="INSERT"){const h=c.get(Se.objectId);h&&h.length>0&&h.forEach(We=>{Se.appendAttributes(We)})}p.push(Se)}}}l.appendEntity(p);let oe=i.value+L/d*(100-i.value);oe>100&&(oe=100),a&&await a(oe,"ENTITY","IN-PROGRESS")})}async processEntitiesInBlock(e,t,n=!1,i={},a={}){const o=new Ke;o.setObjectByHandle(i),o.setAcdsDataByHandle(a);const s=e.length,d=[],A=t.objectId,c=[];for(let l=0;l<s;l++){const g=e[l],T=o.convert(g);T&&(g.type==="ATTRIB"?c.push(T):(!n||g.ownerBlockRecordSoftId===A)&&d.push(T))}t.appendEntity(d),c.forEach(l=>{const g=t.getIdAt(l.ownerId);g&&g.appendAttributes(l)})}processBlocks(e,t){var i,a,o,s;const n=e.blocks;for(const[d,A]of Object.entries(n)){let c=t.tables.blockTable.getAt(A.name);c||(c=new r.AcDbBlockTableRecord,A.handle!=null&&(c.objectId=String(A.handle)),c.name=d,t.tables.blockTable.add(c)),c.origin.copy(A.position),A.entities?this.processEntitiesInBlock(A.entities,c,!1,((i=e.objects)==null?void 0:i.byHandle)??{},((a=e.acdsData)==null?void 0:a.byOwnerHandle)??{}):c.isPaperSapce&&this.processEntitiesInBlock(e.entities,c,!0,((o=e.objects)==null?void 0:o.byHandle)??{},((s=e.acdsData)==null?void 0:s.byOwnerHandle)??{})}}processClasses(e,t){var n;(n=e.classes)!=null&&n.length&&(t.classes=e.classes.map(i=>({name:i.name,cppClassName:i.cppClassName,appName:i.appName,proxyFlag:i.proxyFlag,instanceCount:i.instanceCount,wasProxy:i.wasProxy,isEntity:i.isEntity})))}processHeader(e,t){const n=e.header;n.$ACADVER&&(t.version=n.$ACADVER),t.cecolor.colorIndex=n.$CECOLOR||256,t.angbase=n.$ANGBASE||0,t.angdir=n.$ANGDIR||0,n.$AUNITS!=null&&(t.aunits=n.$AUNITS),n.$AUPREC!=null&&(t.auprec=n.$AUPREC),n.$LUNITS!=null&&(t.lunits=n.$LUNITS),n.$LUPREC!=null&&(t.luprec=n.$LUPREC),n.$UNITMODE!=null&&(t.unitmode=n.$UNITMODE),n.$MEASUREMENT!=null&&(t.measurement=n.$MEASUREMENT),t.celtype=n.$CELTYPE||r.ByLayer,r.AcDbSysVarManager.instance().setVar(r.AcDbSystemVariables.CETRANSPARENCY,n.$CETRANSPARENCY||"ByLayer",t),t.celtscale=n.$CELTSCALE||1;const i=this.normalizeHeaderStringValue(n.$CMLSTYLE)||this.normalizeHeaderStringValue(n.CMLSTYLE)||r.DEFAULT_MLINE_STYLE;t.cmlstyle=i;const a=n.$CMLSCALE??n.CMLSCALE;typeof a=="number"&&Number.isFinite(a)&&(t.cmlscale=a);const o=this.normalizeHeaderStringValue(n.$CMLEADERSTYLE)||this.normalizeHeaderStringValue(n.CMLEADERSTYLE)||r.DEFAULT_MLEADER_STYLE;t.cmleaderstyle=o,t.hplayer=this.normalizeHeaderStringValue(n.$HPLAYER)||this.normalizeHeaderStringValue(n.HPLAYER)||".",t.ltscale=n.$LTSCALE||1,n.$EXTMAX&&(t.extmax=n.$EXTMAX),n.$EXTMIN&&(t.extmin=n.$EXTMIN),n.$INSUNITS!=null&&(t.insunits=n.$INSUNITS),t.osmode=n.$OSMODE||0,t.orthomode=n.$ORTHOMODE||0,t.pdmode=n.$PDMODE||0,t.pdsize=n.$PDSIZE||0,t.textstyle=n.$TEXTSTYLE||r.DEFAULT_TEXT_STYLE,n.$HANDSEED!=null&&t.initializeHandleSeed(String(n.$HANDSEED))}processBlockTables(e,t){var i;const n=(i=e.tables.BLOCK_RECORD)==null?void 0:i.entries;n&&n.length>0&&(t.tables.blockTable.removeAll(),n.forEach(a=>{const o=new r.AcDbBlockTableRecord;o.objectId=a.handle,o.name=a.name,o.layoutId=a.layoutObjects,o.blockInsertUnits=a.insertionUnits,o.explodability=a.explodability,o.blockScaling=a.scalability,a.bmpPreview&&(o.bmpPreview=a.bmpPreview),t.tables.blockTable.add(o)}))}processObjects(e,t){const n=e.objects.byName,i=new dt;if("LAYOUT"in n){const a=t.objects.layout;n.LAYOUT.forEach(o=>{const s=i.convertLayout(o,e);a.setAt(s.layoutName,s)})}if("IMAGEDEF"in n){const a=t.objects.imageDefinition;n.IMAGEDEF.forEach(o=>{const s=i.convertImageDef(o);a.setAt(s.objectId,s)})}if("MLEADERSTYLE"in n){const a=t.objects.mleaderStyle;n.MLEADERSTYLE.forEach(o=>{const s=i.convertMLeaderStyle(o);a.setAt(s.objectId,s)})}if("MLINESTYLE"in n){const a=t.objects.mlineStyle;n.MLINESTYLE.forEach(o=>{const s=i.convertMLineStyle(o);a.setAt(s.styleName||s.objectId,s)})}}processViewports(e,t){var i;const n=(i=e.tables)==null?void 0:i.VPORT;if(n){this.processCommonTableAttrs(n,t.tables.viewportTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcDbViewportTableRecord;this.processCommonTableEntryAttrs(o,s),o.circleSides&&(s.circleSides=o.circleSides),s.standardFlag=o.standardFlag,s.center.copy(o.center??r.VPORT_FALLBACK_CENTER_2D),s.lowerLeftCorner.copy(o.lowerLeftCorner??r.VPORT_FALLBACK_LLC),s.upperRightCorner.copy(o.upperRightCorner??r.VPORT_FALLBACK_URC),o.snapBasePoint&&s.snapBase.copy(o.snapBasePoint),o.snapRotationAngle&&(s.snapAngle=o.snapRotationAngle),o.snapSpacing&&s.snapIncrements.copy(o.snapSpacing),o.majorGridLines&&(s.gridMajor=o.majorGridLines),o.gridSpacing&&s.gridIncrements.copy(o.gridSpacing),o.backgroundObjectId&&(s.backgroundObjectId=o.backgroundObjectId),s.gsView.center.copy(o.center??r.VPORT_FALLBACK_CENTER_2D),s.gsView.viewDirectionFromTarget.copy(o.viewDirectionFromTarget??r.VPORT_FALLBACK_VIEW_DIR),s.gsView.viewTarget.copy(o.viewTarget??r.VPORT_FALLBACK_VIEW_TARGET),o.lensLength&&(s.gsView.lensLength=o.lensLength),o.frontClippingPlane&&(s.gsView.frontClippingPlane=o.frontClippingPlane),o.backClippingPlane&&(s.gsView.backClippingPlane=o.backClippingPlane),o.viewHeight&&(s.gsView.viewHeight=o.viewHeight),o.aspectRatio!=null&&Number.isFinite(o.aspectRatio)&&o.aspectRatio>0&&(s.gsView.aspectRatio=o.aspectRatio),o.viewTwistAngle&&(s.gsView.viewTwistAngle=o.viewTwistAngle),o.frozenLayers&&(s.gsView.frozenLayers=o.frozenLayers),o.styleSheet&&(s.gsView.styleSheet=o.styleSheet),o.renderMode&&(s.gsView.renderMode=o.renderMode),o.viewMode&&(s.gsView.viewMode=o.viewMode),o.ucsIconSetting&&(s.gsView.ucsIconSetting=o.ucsIconSetting),o.ucsOrigin&&s.gsView.ucsOrigin.copy(o.ucsOrigin),o.ucsXAxis&&s.gsView.ucsXAxis.copy(o.ucsXAxis),o.ucsYAxis&&s.gsView.ucsYAxis.copy(o.ucsYAxis),o.orthographicType&&(s.gsView.orthographicType=o.orthographicType),o.shadePlotSetting&&(s.gsView.shadePlotSetting=o.shadePlotSetting),o.shadePlotObjectId&&(s.gsView.shadePlotObjectId=o.shadePlotObjectId),o.visualStyleObjectId&&(s.gsView.visualStyleObjectId=o.visualStyleObjectId),o.isDefaultLightingOn&&(s.gsView.isDefaultLightingOn=o.isDefaultLightingOn),o.defaultLightingType&&(s.gsView.defaultLightingType=o.defaultLightingType),o.brightness&&(s.gsView.brightness=o.brightness),o.contrast&&(s.gsView.contrast=o.contrast),o.ambientColor&&(s.gsView.ambientColor=o.ambientColor),t.tables.viewportTable.add(s)})}}processLayers(e,t){var i;const n=(i=e.tables)==null?void 0:i.LAYER;if(n){this.processCommonTableAttrs(n,t.tables.layerTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcCmColor;s.colorIndex=o.colorIndex;const d=new r.AcDbLayerTableRecord({name:o.name,standardFlags:o.standardFlag,linetype:o.lineType,lineWeight:o.lineweight,isOff:o.colorIndex<0,color:s,isPlottable:o.isPlotting});this.processCommonTableEntryAttrs(o,d),t.tables.layerTable.add(d)})}t.ensureTextStyleDefaults()}processLineTypes(e,t){var i;const n=(i=e.tables)==null?void 0:i.LTYPE;if(n){this.processCommonTableAttrs(n,t.tables.linetypeTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcDbLinetypeTableRecord({name:o.name,standardFlag:o.standardFlag,description:o.description,totalPatternLength:o.totalPatternLength,pattern:o.pattern});this.processCommonTableEntryAttrs(o,s),t.tables.linetypeTable.add(s)})}}processTextStyles(e,t){var i;const n=(i=e.tables)==null?void 0:i.STYLE;if(n){this.processCommonTableAttrs(n,t.tables.textStyleTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcDbTextStyleTableRecord({name:o.name,standardFlag:o.standardFlag,fixedTextHeight:o.fixedTextHeight,widthFactor:o.widthFactor,obliqueAngle:o.obliqueAngle,textGenerationFlag:o.textGenerationFlag,lastHeight:o.lastHeight,font:o.font,bigFont:o.bigFont,extendedFont:o.extendedFont});this.processCommonTableEntryAttrs(o,s),t.tables.textStyleTable.add(s)})}}processDimStyles(e,t){var i;const n=(i=e.tables)==null?void 0:i.DIMSTYLE;if(n){this.processCommonTableAttrs(n,t.tables.dimStyleTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s={name:o.name,ownerId:o.ownerObjectId,dimpost:o.DIMPOST||"",dimapost:o.DIMAPOST||"",dimscale:o.DIMSCALE,dimasz:o.DIMASZ,dimexo:o.DIMEXO,dimdli:o.DIMDLI,dimexe:o.DIMEXE,dimrnd:o.DIMRND,dimdle:o.DIMDLE,dimtp:o.DIMTP,dimtm:o.DIMTM,dimtxt:o.DIMTXT,dimcen:o.DIMCEN,dimtsz:o.DIMTSZ,dimaltf:o.DIMALTF,dimlfac:o.DIMLFAC,dimtvp:o.DIMTVP,dimtfac:o.DIMTFAC,dimgap:o.DIMGAP,dimaltrnd:o.DIMALTRND,dimtol:o.DIMTOL==null||o.DIMTOL==0?0:1,dimlim:o.DIMLIM==null||o.DIMLIM==0?0:1,dimtih:o.DIMTIH==null||o.DIMTIH==0?0:1,dimtoh:o.DIMTOH==null||o.DIMTOH==0?0:1,dimse1:o.DIMSE1==null||o.DIMSE1==0?0:1,dimse2:o.DIMSE2==null||o.DIMSE2==0?0:1,dimtad:o.DIMTAD,dimzin:o.DIMZIN,dimazin:o.DIMAZIN,dimalt:o.DIMALT,dimaltd:o.DIMALTD,dimtofl:o.DIMTOFL,dimsah:o.DIMSAH,dimtix:o.DIMTIX,dimsoxd:o.DIMSOXD,dimclrd:o.DIMCLRD,dimclre:o.DIMCLRE,dimclrt:o.DIMCLRT,dimadec:o.DIMADEC||0,dimunit:o.DIMUNIT||2,dimdec:o.DIMDEC,dimtdec:o.DIMTDEC,dimaltu:o.DIMALTU,dimalttd:o.DIMALTTD,dimaunit:o.DIMAUNIT,dimfrac:o.DIMFRAC,dimlunit:o.DIMLUNIT,dimdsep:o.DIMDSEP?o.DIMDSEP.toString():".",dimtmove:o.DIMTMOVE||0,dimjust:o.DIMJUST,dimsd1:o.DIMSD1,dimsd2:o.DIMSD2,dimtolj:o.DIMTOLJ,dimtzin:o.DIMTZIN,dimaltz:o.DIMALTZ,dimalttz:o.DIMALTTZ,dimfit:o.DIMFIT||0,dimupt:o.DIMUPT,dimatfit:o.DIMATFIT,dimtxsty:o.DIMTXSTY||r.DEFAULT_TEXT_STYLE,dimldrblk:o.DIMLDRBLK||"",dimblk:o.DIMBLK||"",dimblk1:o.DIMBLK1||"",dimblk2:o.DIMBLK2||"",dimlwd:o.DIMLWD,dimlwe:o.DIMLWE},d=new r.AcDbDimStyleTableRecord(s);this.processCommonTableEntryAttrs(o,d),t.tables.dimStyleTable.add(d)})}}processCommonTableAttrs(e,t,n){e.handle!=null&&n.adoptExternalHandle(t,e.handle),e.ownerObjectId!=null&&(t.ownerId=e.ownerObjectId)}processCommonTableEntryAttrs(e,t){t.name="name"in e?e.name:"",e.handle!=null&&(t.objectId=e.handle),e.ownerObjectId!=null&&(t.ownerId=e.ownerObjectId)}groupAndFlattenByType(e){const t={},n=[];for(const i of e)t[i.type]||(t[i.type]=[],n.push(i.type)),t[i.type].push(i);return n.flatMap(i=>t[i])}normalizeHeaderStringValue(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}}ie.AcDbDxfConverter=ut,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(ie,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("@mlightcad/data-model")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/data-model"],r):(ie=typeof globalThis<"u"?globalThis:ie||self,r(ie["dxf-json-converter"]={},ie.dataModel))})(this,function(ie,r){"use strict";var C,be,E,S,me,B,re,G,N,W,k,ae,se,le,R,Y,Pe,Ne,ce,de,Oe,ye,Re,x,j,I,ue,xe,f,O,we,y,_e,z,D,X,Me,fe,U,Fe,Ye,Ve,$,K,ve,Be,Z,Ae,De,ke,Ie,q,pe,b,J,w,ge,_,Q,m,ee,M,he,Ue,Te,F,te,V,ne,je,Ee,v;(C={})[C.None=0]="None",C[C.Anonymous=1]="Anonymous",C[C.NonConstant=2]="NonConstant",C[C.Xref=4]="Xref",C[C.XrefOverlay=8]="XrefOverlay",C[C.ExternallyDependent=16]="ExternallyDependent",C[C.ResolvedOrDependent=32]="ResolvedOrDependent",C[C.ReferencedXref=64]="ReferencedXref",(be={})[be.BYBLOCK=0]="BYBLOCK",be[be.BYLAYER=256]="BYLAYER",(E={})[E.Rotated=0]="Rotated",E[E.Aligned=1]="Aligned",E[E.Angular=2]="Angular",E[E.Diameter=3]="Diameter",E[E.Radius=4]="Radius",E[E.Angular3Point=5]="Angular3Point",E[E.Ordinate=6]="Ordinate",E[E.ReferenceIsExclusive=32]="ReferenceIsExclusive",E[E.IsOrdinateXTypeFlag=64]="IsOrdinateXTypeFlag",E[E.IsCustomTextPositionFlag=128]="IsCustomTextPositionFlag",(S={})[S.TopLeft=1]="TopLeft",S[S.TopCenter=2]="TopCenter",S[S.TopRight=3]="TopRight",S[S.MiddleLeft=4]="MiddleLeft",S[S.MiddleCenter=5]="MiddleCenter",S[S.MiddleRight=6]="MiddleRight",S[S.BottomLeft=7]="BottomLeft",S[S.BottomCenter=8]="BottomCenter",S[S.BottomRight=9]="BottomRight",(me={})[me.AtLeast=1]="AtLeast",me[me.Exact=2]="Exact";var Xe=((B={})[B.Center=0]="Center",B[B.Above=1]="Above",B[B.Outside=2]="Outside",B[B.JIS=3]="JIS",B[B.Below=4]="Below",B);(re={})[re.WithDimension=0]="WithDimension",re[re.AddLeader=1]="AddLeader",re[re.Independent=2]="Independent",(G={})[G.BothOutside=0]="BothOutside",G[G.ArrowFirst=1]="ArrowFirst",G[G.TextFirst=2]="TextFirst",G[G.Auto=3]="Auto";var Le=((N={})[N.Feet=0]="Feet",N[N.None=1]="None",N[N.Inch=2]="Inch",N[N.FeetAndInch=3]="FeetAndInch",N[N.Leading=4]="Leading",N[N.Trailing=8]="Trailing",N[N.LeadingAndTrailing=12]="LeadingAndTrailing",N),qe=((W={})[W.None=0]="None",W[W.Leading=1]="Leading",W[W.Trailing=2]="Trailing",W[W.LeadingAndTrailing=3]="LeadingAndTrailing",W),Je=((k={})[k.Center=0]="Center",k[k.First=1]="First",k[k.Second=2]="Second",k[k.OverFirst=3]="OverFirst",k[k.OverSecond=4]="OverSecond",k),Qe=((ae={})[ae.Bottom=0]="Bottom",ae[ae.Center=1]="Center",ae[ae.Top=2]="Top",ae);(se={})[se.None=0]="None",se[se.UseDrawingBackground=1]="UseDrawingBackground",se[se.Custom=2]="Custom",(le={})[le.Horizontal=0]="Horizontal",le[le.Diagonal=1]="Diagonal",le[le.NotStacked=2]="NotStacked",(R={})[R.Scientific=1]="Scientific",R[R.Decimal=2]="Decimal",R[R.Engineering=3]="Engineering",R[R.Architectural=4]="Architectural",R[R.Fractional=5]="Fractional",R[R.WindowDesktop=6]="WindowDesktop",(Y={})[Y.Decimal=0]="Decimal",Y[Y.DegreesMinutesSecond=1]="DegreesMinutesSecond",Y[Y.Gradian=2]="Gradian",Y[Y.Radian=3]="Radian";var et=((Pe={})[Pe.PatternFill=0]="PatternFill",Pe[Pe.SolidFill=1]="SolidFill",Pe);(Ne={})[Ne.NonAssociative=0]="NonAssociative",Ne[Ne.Associative=1]="Associative",(ce={})[ce.Normal=0]="Normal",ce[ce.Outer=1]="Outer",ce[ce.Ignore=2]="Ignore",(de={})[de.UserDefined=0]="UserDefined",de[de.Predefined=1]="Predefined",de[de.Custom=2]="Custom",(Oe={})[Oe.NotAnnotated=0]="NotAnnotated",Oe[Oe.Annotated=1]="Annotated",(ye={})[ye.Solid=0]="Solid",ye[ye.Gradient=1]="Gradient",(Re={})[Re.TwoColor=0]="TwoColor",Re[Re.OneColor=1]="OneColor",(x={})[x.Default=0]="Default",x[x.External=1]="External",x[x.Polyline=2]="Polyline",x[x.Derived=4]="Derived",x[x.Textbox=8]="Textbox",x[x.Outermost=16]="Outermost",(j={})[j.Line=1]="Line",j[j.Circular=2]="Circular",j[j.Elliptic=3]="Elliptic",j[j.Spline=4]="Spline";var tt=((I={})[I.Off=0]="Off",I[I.Solid=1]="Solid",I[I.Dashed=2]="Dashed",I[I.Dotted=3]="Dotted",I[I.ShotDash=4]="ShotDash",I[I.MediumDash=5]="MediumDash",I[I.LongDash=6]="LongDash",I[I.DoubleShortDash=7]="DoubleShortDash",I[I.DoubleMediumDash=8]="DoubleMediumDash",I[I.DoubleLongDash=9]="DoubleLongDash",I[I.DoubleMediumLongDash=10]="DoubleMediumLongDash",I[I.SparseDot=11]="SparseDot",I);tt.Off,(ue={})[ue.Standard=-3]="Standard",ue[ue.ByLayer=-2]="ByLayer",ue[ue.ByBlock=-1]="ByBlock",(xe={})[xe.English=0]="English",xe[xe.Metric=1]="Metric",(f={})[f.PERSPECTIVE_MODE=1]="PERSPECTIVE_MODE",f[f.FRONT_CLIPPING=2]="FRONT_CLIPPING",f[f.BACK_CLIPPING=4]="BACK_CLIPPING",f[f.UCS_FOLLOW=8]="UCS_FOLLOW",f[f.FRONT_CLIP_NOT_AT_EYE=16]="FRONT_CLIP_NOT_AT_EYE",f[f.UCS_ICON_VISIBILITY=32]="UCS_ICON_VISIBILITY",f[f.UCS_ICON_AT_ORIGIN=64]="UCS_ICON_AT_ORIGIN",f[f.FAST_ZOOM=128]="FAST_ZOOM",f[f.SNAP_MODE=256]="SNAP_MODE",f[f.GRID_MODE=512]="GRID_MODE",f[f.ISOMETRIC_SNAP_STYLE=1024]="ISOMETRIC_SNAP_STYLE",f[f.HIDE_PLOT_MODE=2048]="HIDE_PLOT_MODE",f[f.K_ISO_PAIR_TOP=4096]="K_ISO_PAIR_TOP",f[f.K_ISO_PAIR_RIGHT=8192]="K_ISO_PAIR_RIGHT",f[f.VIEWPORT_ZOOM_LOCKING=16384]="VIEWPORT_ZOOM_LOCKING",f[f.UNUSED=32768]="UNUSED",f[f.NON_RECTANGULAR_CLIPPING=65536]="NON_RECTANGULAR_CLIPPING",f[f.VIEWPORT_OFF=131072]="VIEWPORT_OFF",f[f.GRID_BEYOND_DRAWING_LIMITS=262144]="GRID_BEYOND_DRAWING_LIMITS",f[f.ADAPTIVE_GRID_DISPLAY=524288]="ADAPTIVE_GRID_DISPLAY",f[f.SUBDIVISION_BELOW_SPACING=1048576]="SUBDIVISION_BELOW_SPACING",f[f.GRID_FOLLOWS_WORKPLANE=2097152]="GRID_FOLLOWS_WORKPLANE",(O={})[O.OPTIMIZED_2D=0]="OPTIMIZED_2D",O[O.WIREFRAME=1]="WIREFRAME",O[O.HIDDEN_LINE=2]="HIDDEN_LINE",O[O.FLAT_SHADED=3]="FLAT_SHADED",O[O.GOURAUD_SHADED=4]="GOURAUD_SHADED",O[O.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",O[O.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME",(we={})[we.UCS_UNCHANGED=0]="UCS_UNCHANGED",we[we.HAS_OWN_UCS=1]="HAS_OWN_UCS",(y={})[y.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",y[y.TOP=1]="TOP",y[y.BOTTOM=2]="BOTTOM",y[y.FRONT=3]="FRONT",y[y.BACK=4]="BACK",y[y.LEFT=5]="LEFT",y[y.RIGHT=6]="RIGHT",(_e={})[_e.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",_e[_e.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS",(z={})[z.ByLayer=0]="ByLayer",z[z.ByBlock=1]="ByBlock",z[z.ByDictionaryDefault=2]="ByDictionaryDefault",z[z.ByObject=3]="ByObject",(D={})[D.NotAllowed=0]="NotAllowed",D[D.AllowErase=1]="AllowErase",D[D.AllowTransform=2]="AllowTransform",D[D.AllowChangeColor=4]="AllowChangeColor",D[D.AllowChangeLayer=8]="AllowChangeLayer",D[D.AllowChangeLinetype=16]="AllowChangeLinetype",D[D.AllowChangeLinetypeScale=32]="AllowChangeLinetypeScale",D[D.AllowChangeVisibility=64]="AllowChangeVisibility",D[D.AllowClone=128]="AllowClone",D[D.AllowChangeLineweight=256]="AllowChangeLineweight",D[D.AllowChangePlotStyleName=512]="AllowChangePlotStyleName",D[D.AllowAllExceptClone=895]="AllowAllExceptClone",D[D.AllowAll=1023]="AllowAll",D[D.DisableProxyWarning=1024]="DisableProxyWarning",D[D.R13FormatProxy=32768]="R13FormatProxy",(X={})[X.CAST_AND_RECEIVE=0]="CAST_AND_RECEIVE",X[X.CAST=1]="CAST",X[X.RECEIVE=2]="RECEIVE",X[X.IGNORE=3]="IGNORE",(Me={})[Me.RayTrace=0]="RayTrace",Me[Me.ShadowMap=1]="ShadowMap",(fe={})[fe.BeforeText=0]="BeforeText",fe[fe.AboveText=1]="AboveText",fe[fe.None=2]="None",(U={})[U.NONE=0]="NONE",U[U.INVISIBLE=1]="INVISIBLE",U[U.CONSTANT=2]="CONSTANT",U[U.VERIFICATION_REQUIRED=4]="VERIFICATION_REQUIRED",U[U.PRESET=8]="PRESET",(Fe={})[Fe.MULTILINE=2]="MULTILINE",Fe[Fe.CONSTANT_MULTILINE=4]="CONSTANT_MULTILINE",(Ye={})[Ye.ProxyEntity=498]="ProxyEntity",(Ve={})[Ve.Dwg=0]="Dwg",Ve[Ve.Dxf=1]="Dxf",($={})[$.First=1]="First",$[$.Second=2]="Second",$[$.Third=4]="Third",$[$.Fourth=8]="Fourth",(K={})[K.ShowImage=1]="ShowImage",K[K.ShowImageWhenNotAlignedWithScreen=2]="ShowImageWhenNotAlignedWithScreen",K[K.UseClippingBoundary=4]="UseClippingBoundary",K[K.TransparencyIsOn=8]="TransparencyIsOn",(ve={})[ve.Rectangular=1]="Rectangular",ve[ve.Polygonal=2]="Polygonal",(Be={})[Be.Outside=0]="Outside",Be[Be.Inside=1]="Inside",(Z={})[Z.TextAnnotation=0]="TextAnnotation",Z[Z.ToleranceAnnotation=1]="ToleranceAnnotation",Z[Z.BlockReferenceAnnotation=2]="BlockReferenceAnnotation",Z[Z.NoAnnotation=3]="NoAnnotation",(Ae={})[Ae.Distant=1]="Distant",Ae[Ae.Point=2]="Point",Ae[Ae.Spot=3]="Spot",(De={})[De.None=0]="None",De[De.InverseLinear=1]="InverseLinear",De[De.InverseSquare=2]="InverseSquare",(ke={})[ke.IS_CLOSED=1]="IS_CLOSED",ke[ke.PLINE_GEN=128]="PLINE_GEN",(Ie={})[Ie.Top=0]="Top",Ie[Ie.Zero=1]="Zero",Ie[Ie.Bottom=2]="Bottom",(q={})[q.HasVertex=1]="HasVertex",q[q.Closed=2]="Closed",q[q.SuppressStartCaps=4]="SuppressStartCaps",q[q.SuppressEndCaps=8]="SuppressEndCaps",(pe={})[pe.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",pe[pe.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",pe[pe.BY_STYLE=5]="BY_STYLE",(b={})[b.CLOSED_POLYLINE=1]="CLOSED_POLYLINE",b[b.CURVE_FIT=2]="CURVE_FIT",b[b.SPLINE_FIT=4]="SPLINE_FIT",b[b.POLYLINE_3D=8]="POLYLINE_3D",b[b.POLYGON_3D=16]="POLYGON_3D",b[b.CLOSED_POLYGON=32]="CLOSED_POLYGON",b[b.POLYFACE=64]="POLYFACE",b[b.CONTINUOUS=128]="CONTINUOUS";var He=((J={})[J.NONE=0]="NONE",J[J.QUADRATIC=5]="QUADRATIC",J[J.CUBIC=6]="CUBIC",J[J.BEZIER=8]="BEZIER",J);(w={})[w.NONE=0]="NONE",w[w.CLOSED=1]="CLOSED",w[w.PERIODIC=2]="PERIODIC",w[w.RATIONAL=4]="RATIONAL",w[w.PLANAR=8]="PLANAR",w[w.LINEAR=16]="LINEAR",(ge={})[ge.NONE=0]="NONE",ge[ge.MIRRORED_X=2]="MIRRORED_X",ge[ge.MIRRORED_Y=4]="MIRRORED_Y",(_={})[_.LEFT=0]="LEFT",_[_.CENTER=1]="CENTER",_[_.RIGHT=2]="RIGHT",_[_.ALIGNED=3]="ALIGNED",_[_.MIDDLE=4]="MIDDLE",_[_.FIT=5]="FIT",(Q={})[Q.BASELINE=0]="BASELINE",Q[Q.BOTTOM=1]="BOTTOM",Q[Q.MIDDLE=2]="MIDDLE",Q[Q.TOP=3]="TOP";var nt=((m={})[m.CREATED_BY_CURVE_FIT=1]="CREATED_BY_CURVE_FIT",m[m.TANGENT_DEFINED=2]="TANGENT_DEFINED",m[m.NOT_USED=4]="NOT_USED",m[m.CREATED_BY_SPLINE_FIT=8]="CREATED_BY_SPLINE_FIT",m[m.SPLINE_CONTROL_POINT=16]="SPLINE_CONTROL_POINT",m[m.FOR_POLYLINE=32]="FOR_POLYLINE",m[m.FOR_POLYGON=64]="FOR_POLYGON",m[m.POLYFACE=128]="POLYFACE",m);(ee={})[ee.ShowImage=1]="ShowImage",ee[ee.ShowImageWhenNotAligned=2]="ShowImageWhenNotAligned",ee[ee.UseClippingBoundary=4]="UseClippingBoundary",ee[ee.Transparency=8]="Transparency",(M={})[M.NOT_APPLICABLE=0]="NOT_APPLICABLE",M[M.KEEP_EXISTING=1]="KEEP_EXISTING",M[M.USE_CLONE=2]="USE_CLONE",M[M.XREF_VALUE_NAME=3]="XREF_VALUE_NAME",M[M.VALUE_NAME=4]="VALUE_NAME",M[M.UNMANGLE_NAME=5]="UNMANGLE_NAME",(he={})[he.NOUNIT=0]="NOUNIT",he[he.CENTIMETERS=2]="CENTIMETERS",he[he.INCH=5]="INCH",(Ue={})[Ue.PSLTSCALE=1]="PSLTSCALE",Ue[Ue.LIMCHECK=2]="LIMCHECK",(Te={})[Te.INCHES=0]="INCHES",Te[Te.MILLIMETERS=1]="MILLIMETERS",Te[Te.PIXELS=2]="PIXELS",(F={})[F.LAST_SCREEN_DISPLAY=0]="LAST_SCREEN_DISPLAY",F[F.DRAWING_EXTENTS=1]="DRAWING_EXTENTS",F[F.DRAWING_LIMITS=2]="DRAWING_LIMITS",F[F.VIEW_SPECIFIED=3]="VIEW_SPECIFIED",F[F.WINDOW_SPECIFIED=4]="WINDOW_SPECIFIED",F[F.LAYOUT_INFORMATION=5]="LAYOUT_INFORMATION",(te={})[te.AS_DISPLAYED=0]="AS_DISPLAYED",te[te.WIREFRAME=1]="WIREFRAME",te[te.HIDDEN=2]="HIDDEN",te[te.RENDERED=3]="RENDERED",(V={})[V.DRAFT=0]="DRAFT",V[V.PREVIEW=1]="PREVIEW",V[V.NORMAL=2]="NORMAL",V[V.PRESENTATION=3]="PRESENTATION",V[V.MAXIMUM=4]="MAXIMUM",V[V.CUSTOM=5]="CUSTOM",Xe.Above,Xe.Center,Le.Trailing,Le.Feet,qe.None,Je.Center,Qe.Center,Le.Trailing,Le.Feet,Le.Trailing,Le.Trailing,(ne={})[ne.NONE=0]="NONE",ne[ne.AbsoluteRotation=1]="AbsoluteRotation",ne[ne.TextEmbedded=2]="TextEmbedded",ne[ne.ShapeEmbedded=4]="ShapeEmbedded",(je={})[je.PaperSpace=1]="PaperSpace",(Ee={})[Ee.XrefDependent=16]="XrefDependent",Ee[Ee.XrefResolved=32]="XrefResolved",Ee[Ee.Referenced=64]="Referenced",(v={})[v.Off=0]="Off",v[v.Perspective=1]="Perspective",v[v.ClipFront=2]="ClipFront",v[v.ClipBack=4]="ClipBack",v[v.UcsFollow=8]="UcsFollow",v[v.ClipFrontByFrontZ=16]="ClipFrontByFrontZ";const ot=new Set(["ACSH_SWEEP_CLASS","ACSH_BREP_CLASS","ACSH_EXTRUSION_CLASS","ACSH_REVOLVE_CLASS","ACSH_LOFT_CLASS"]);function it(u,e){if(!u||!e)return"";const t=e[Ge(u)];if(!t||t.name!=="ACSH_HISTORY_CLASS")return"";const n=t.evalGraphHardId;if(!n)return"";const i=e[Ge(n)];if(!i||i.name!=="ACAD_EVALUATION_GRAPH")return"";const a=i.nodeObjectHardIds??[];let o="";for(const d of a){const A=e[Ge(d)];if(!A)continue;const c=rt(A);c&&(o=c)}if(o)return o;const s=[];for(const d of a){const A=e[Ge(d)];A&&s.push(...at(A))}return s.length===0?"":lt(s)}function rt(u){return ot.has(u.name)?u.acisData??"":""}function at(u){switch(u.name){case"ACSH_BOX_CLASS":return $e(u);case"ACSH_CYLINDER_CLASS":return ze(u,e=>{const t=Math.max(e.minorRadius??0,e.majorRadius??0,e.topMajorRadius??0),n=e.height??e.topMajorRadius??0;return{length:t*2,width:t*2,height:n}});case"ACSH_CONE_CLASS":return ze(u,e=>{const t=Math.max(e.baseRadius??0,e.minorRadius??0,e.topRadius??0,e.majorRadius??0),n=e.height??e.topMajorRadius??0;return{length:t*2,width:t*2,height:n}});case"ACSH_WEDGE_CLASS":return ze(u,e=>({length:e.length??0,width:e.width??0,height:e.height??0}));default:return[]}}function ze(u,e){const{length:t,width:n,height:i}=e(u);return t<=0||n<=0||i<=0?[]:$e({name:"ACSH_BOX_CLASS",handle:"",ownerObjectId:"0",length:t,width:n,height:i,transform:u.transform})}function Ge(u){return String(u).trim().toUpperCase()}function $e(u){const e=u.length??0,t=u.width??0,n=u.height??0;if(e<=0||t<=0||n<=0)return[];const i=e/2,a=t/2,o=n/2,s=[{x:-i,y:-a,z:-o},{x:i,y:-a,z:-o},{x:i,y:a,z:-o},{x:-i,y:a,z:-o},{x:-i,y:-a,z:o},{x:i,y:-a,z:o},{x:i,y:a,z:o},{x:-i,y:a,z:o}],d=u.transform;return!d||d.length!==16?s:s.map(A=>st(d,A))}function st(u,e){const t=e.x,n=e.y,i=e.z,a=u[12]*t+u[13]*n+u[14]*i+u[15],o=a!==0&&a!==1?1/a:1;return{x:(u[0]*t+u[1]*n+u[2]*i+u[3])*o,y:(u[4]*t+u[5]*n+u[6]*i+u[7])*o,z:(u[8]*t+u[9]*n+u[10]*i+u[11])*o}}function lt(u){const e=u.map(t=>`point $-1 ${t.x} ${t.y} ${t.z} #`);return e.push("End-of-ACIS-data"),e.join(`
|
|
2
|
+
`)}function ct(u){if(u){if(u instanceof Uint8Array)return u;if(Array.isArray(u))return Uint8Array.from(u);if(typeof u=="object"){const e=u,t=Object.keys(e).filter(n=>/^\d+$/.test(n));if(t.length>0)return Uint8Array.from(t.sort((n,i)=>Number(n)-Number(i)).map(n=>e[n]))}}}class Ke{constructor(){this.objectByHandle={},this.acdsDataByHandle={}}setObjectByHandle(e){this.objectByHandle=e}setAcdsDataByHandle(e={}){this.acdsDataByHandle=e}convert(e){const t=this.createEntity(e);return t&&this.processCommonAttrs(e,t),t}createEntity(e){return e.type=="3DFACE"?this.convertFace(e):e.type=="ARC"?this.convertArc(e):e.type=="ATTDEF"?this.convertAttributeDefinition(e):e.type=="ATTRIB"?this.convertAttribute(e):e.type=="CIRCLE"?this.convertCirle(e):e.type=="DIMENSION"?this.convertDimension(e):e.type=="ELLIPSE"?this.convertEllipse(e):e.type=="HATCH"?this.convertHatch(e):e.type=="IMAGE"?this.convertImage(e):e.type=="LEADER"?this.convertLeader(e):e.type=="LINE"?this.convertLine(e):e.type=="LWPOLYLINE"?this.convertLWPolyline(e):e.type=="MTEXT"?this.convertMText(e):e.type=="MLINE"?this.convertMLine(e):e.type=="MULTILEADER"||e.type=="MLEADER"?this.convertMLeader(e):e.type=="POLYLINE"?this.convertPolyline(e):e.type=="POINT"?this.convertPoint(e):e.type=="RAY"?this.convertRay(e):e.type=="SPLINE"?this.convertSpline(e):e.type=="ACAD_TABLE"?this.convertTable(e):e.type=="TEXT"?this.convertText(e):e.type=="TOLERANCE"?this.convertTolerance(e):e.type=="SHAPE"?this.convertShape(e):e.type=="SOLID"?this.convertSolid(e):e.type=="3DSOLID"?this.convert3dSolid(e):e.type=="VIEWPORT"?this.convertViewport(e):e.type=="WIPEOUT"?this.convertWipeout(e):e.type=="XLINE"?this.convertXline(e):e.type=="INSERT"?this.convertBlockReference(e):e.type=="ACAD_PROXY_ENTITY"?this.convertProxyEntity(e):null}convertProxyEntity(e){const t=new r.AcDbProxyEntity;if(t.proxyEntityClassId=e.proxyEntityClassId,e.originalDxfName&&(t.originalDxfName=e.originalDxfName),e.applicationEntityClassId!=null&&(t.applicationEntityClassId=e.applicationEntityClassId),e.objectDrawingFormat!=null&&(t.objectDrawingFormat=e.objectDrawingFormat),e.originalDataFormat!=null&&(t.originalDataFormat=e.originalDataFormat),e.graphicsData){const n=r.hexStringsToBytes([e.graphicsData]),i=e.graphicsDataSize??n.length;t.setProxyGraphic(n.subarray(0,i))}return t}convertFace(e){const t=new r.AcDbFace;return e.vertices.forEach((n,i)=>t.setVertexAt(i,n)),t}convertArc(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbArc(r.transformOcsPointToWcs(e.center,t),e.radius,r.AcGeMathUtil.degToRad(e.startAngle),r.AcGeMathUtil.degToRad(e.endAngle),t)}convertAttributeCommon(e,t){t.textString=e.text,t.height=e.textHeight,t.position.copy(e.startPoint);const n=e.alignmentPoint,i=!n||n.x===0&&n.y===0&&(n.z??0)===0;n&&!i?t.alignmentPoint.copy(n):t.alignmentPoint.copy(e.startPoint),t.rotation=e.rotation,t.oblique=e.obliqueAngle??0,t.thickness=e.thickness,t.tag=e.tag,t.fieldLength=0,t.isInvisible=(e.attributeFlag&r.AcDbAttributeFlags.Invisible)!==0,t.isConst=(e.attributeFlag&r.AcDbAttributeFlags.Const)!==0,t.isVerifiable=(e.attributeFlag&r.AcDbAttributeFlags.Verifiable)!==0,t.isPreset=(e.attributeFlag&r.AcDbAttributeFlags.Preset)!==0,t.isReallyLocked=!!e.isReallyLocked,t.isMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.MultiLine)!==0,t.isConstMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.ConstMultiLine)!==0}convertAttribute(e){const t=new r.AcDbAttribute;return this.convertAttributeCommon(e,t),t.styleName=e.textStyle,t.horizontalMode=e.horizontalJustification,t.verticalMode=e.verticalJustification,t.widthFactor=e.scale??1,t.lockPositionInBlock=e.lockPositionFlag,t}convertAttributeDefinition(e){const t=new r.AcDbAttributeDefinition;return this.convertAttributeCommon(e,t),t.styleName=e.styleName,t.horizontalMode=e.halign,t.verticalMode=e.valign,t.widthFactor=e.xScale??1,t.prompt=e.prompt,t}convertCirle(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbCircle(r.transformOcsPointToWcs(e.center,t),e.radius,t)}convertEllipse(e){const t=new r.AcGeVector3d(e.majorAxisEndPoint),n=t.length();return new r.AcDbEllipse(e.center,e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t,n,n*e.axisRatio,e.startAngle,e.endAngle)}convertLine(e){const t=e.startPoint,n=e.endPoint;return new r.AcDbLine(new r.AcGePoint3d(t.x,t.y,t.z||0),new r.AcGePoint3d(n.x,n.y,n.z||0))}convertSpline(e){return r.AcDbSpline.fromDwgSpline(e)}convertPoint(e){const t=new r.AcDbPoint;return t.position=e.position,t}convertShape(e){var o;const t=new r.AcDbShape;t.position.copy(e.insertionPoint),t.size=e.size;const n=((o=e.shapeName)==null?void 0:o.trim())??"",i=Number(n);n!==""&&Number.isInteger(i)&&i!==0&&String(i)===n?t.shapeNumber=i:t.name=n;const a=e.styleName;return a&&(t.styleName=a),t.rotation=r.AcGeMathUtil.degToRad(e.rotation||0),t.widthFactor=e.xScale??1,t.oblique=r.AcGeMathUtil.degToRad(e.obliqueAngle||0),t.thickness=e.thickness??0,t.normal.copy(e.extrusionDirection??{x:0,y:0,z:1}),t}convertSolid(e){const t=new r.AcDbSolid;return(e.points??[]).forEach((i,a)=>t.setPointAt(a,i)),t.thickness=e.thickness??0,t}convert3dSolid(e){const t=e.handle?String(e.handle).trim().toUpperCase():"",n=t?ct(this.acdsDataByHandle[t]):void 0;let i=typeof e.data=="string"?e.data:"";return!n&&!i&&e.historyObjectSoftId&&(i=it(e.historyObjectSoftId,this.objectByHandle)),new r.AcDb3dSolid({sabBytes:n,satText:i,version:e.version})}convertPolyline(e){var c;const t=!!(e.flag&1),n=!!(e.flag&8),i=!!(e.flag&16),a=!!(e.flag&64),o=!!(e.flag&32),s=[],d=[],A=[];if((c=e.vertices)==null||c.map(l=>{l.flag&nt.SPLINE_CONTROL_POINT||(a&&l.flag&128?l.flag&64?(s.push({x:l.x,y:l.y,z:l.z}),d.push(l.bulge??0)):l.faces&&l.faces.length>=3&&A.push([...l.faces]):(s.push({x:l.x,y:l.y,z:l.z}),d.push(l.bulge??0)))}),i){const l=e.meshMVertexCount,h=e.meshNVertexCount;return new r.AcDbPolygonMesh(l,h,s,t,o)}else{if(a)return new r.AcDbPolyFaceMesh(s,A);if(n){let l=r.AcDbPoly3dType.SimplePoly;return e.flag&4&&(e.smoothType==He.CUBIC?l=r.AcDbPoly3dType.CubicSplinePoly:e.smoothType==He.QUADRATIC&&(l=r.AcDbPoly3dType.QuadSplinePoly)),new r.AcDb3dPolyline(l,s,t)}else{let l=r.AcDbPoly2dType.SimplePoly;return e.flag&2?l=r.AcDbPoly2dType.FitCurvePoly:e.flag&4&&(e.smoothType==He.CUBIC?l=r.AcDbPoly2dType.CubicSplinePoly:e.smoothType==He.QUADRATIC&&(l=r.AcDbPoly2dType.QuadSplinePoly)),new r.AcDb2dPolyline(l,s,0,t,e.startWidth,e.endWidth,d)}}}convertLWPolyline(e){var i;const t=new r.AcDbPolyline;t.closed=!!(e.flag&1);const n=e.constantWidth??-1;return(i=e.vertices)==null||i.forEach((a,o)=>{t.addVertexAt(o,new r.AcGePoint2d(a.x,a.y),a.bulge,a.startWidth??n,a.endWidth??n)}),t}convertHatch(e){var i;const t=new r.AcDbHatch;if((i=e.definitionLines)==null||i.forEach(a=>{t.definitionLines.push({angle:r.AcGeMathUtil.degToRad(a.angle||0),base:a.base,offset:a.offset,dashLengths:a.numberOfDashLengths>0?a.dashLengths:[]})}),t.isSolidFill=e.solidFill==et.SolidFill,t.hatchStyle=e.hatchStyle,t.patternName=e.patternName,t.patternType=e.patternType,t.patternAngle=e.patternAngle==null?0:r.AcGeMathUtil.degToRad(e.patternAngle),t.patternScale=e.patternScale==null?0:e.patternScale,e.boundaryPaths.forEach(a=>{if(a.boundaryPathTypeFlag&2){const s=a,d=new r.AcGePolyline2d;d.closed=s.isClosed,s.vertices.forEach((A,c)=>{d.addVertexAt(c,{x:A.x,y:A.y,bulge:A.bulge})}),t.add(d)}else{const s=a,d=[];s.edges.forEach(c=>{if(c.type==1){const l=c;d.push(new r.AcGeLine2d(l.start,l.end))}else if(c.type==2){const l=c;d.push(new r.AcGeCircArc2d(l.center,l.radius,r.AcGeMathUtil.degToRad(l.startAngle||0),r.AcGeMathUtil.degToRad(l.endAngle||0),!l.isCCW))}else if(c.type==3){const l=c;new r.AcGeVector2d().subVectors(l.end,l.center);const g=Math.sqrt(Math.pow(l.end.x,2)+Math.pow(l.end.y,2)),L=g*l.lengthOfMinorAxis;let p=r.AcGeMathUtil.degToRad(l.startAngle||0),P=r.AcGeMathUtil.degToRad(l.endAngle||0);const oe=Math.atan2(l.end.y,l.end.x);l.isCCW||(p=Math.PI*2-p,P=Math.PI*2-P),d.push(new r.AcGeEllipseArc2d({...l.center,z:0},g,L,p,P,!l.isCCW,oe))}else if(c.type==4){const l=r.AcGeSpline3d.fromDwgSplineEdge(c);l&&d.push(l)}});const A=r.AcGeLoop2d.buildFromEdges(d);A.length==0&&d.length>0?t.add(new r.AcGeLoop2d(d)):A.forEach(c=>t.add(c))}}),e.gradientFlag){const a=e;if(t.hatchObjectType=r.AcDbHatchObjectType.GradientObject,t.gradientName=a.gradientName,t.gradientAngle=a.gradientRotation??0,t.gradientShift=a.gradientDefinition??0,t.gradientOneColorMode=a.gradientColorFlag==1,t.shadeTintValue=a.colorTint??0,a.gradientColors){const o=a.gradientColors.length;o>1?(t.gradientStartColor=a.gradientColors[0].rgb,t.gradientEndColor=a.gradientColors[1].rgb):o>0&&(t.gradientStartColor=a.gradientColors[0].rgb)}}return t}convertTable(e){const t=new r.AcDbTable(e.name,e.rowCount,e.columnCount);return t.tableDataVersion=e.version,t.tableStyleId=e.tableStyleId,t.owningBlockRecordId=e.blockRecordHandle,e.directionVector&&(t.horizontalDirection=new r.AcGeVector3d(e.directionVector)),t.attachmentPoint=e.attachmentPoint,t.position.copy(e.startPoint),t.tableValueFlag=e.tableValue,t.tableOverrideFlag=e.overrideFlag,t.borderColorOverrideFlag=e.borderColorOverrideFlag,t.borderLineweightOverrideFlag=e.borderLineWeightOverrideFlag,t.borderVisibilityOverrideFlag=e.borderVisibilityOverrideFlag,e.columnWidthArr.forEach((n,i)=>t.setColumnWidth(i,n)),e.rowHeightArr.forEach((n,i)=>t.setRowHeight(i,n)),e.cells.forEach((n,i)=>{t.setCell(i,n)}),t}convertText(e){const t=new r.AcDbText;t.textString=e.text,t.styleName=e.styleName,t.height=e.textHeight,t.position.copy(e.startPoint);const n=e.endPoint,i=!n||n.x===0&&n.y===0&&(n.z??0)===0;return n&&!i?t.alignmentPoint.copy(n):t.alignmentPoint.copy(e.startPoint),t.rotation=r.AcGeMathUtil.degToRad(e.rotation||0),t.oblique=e.obliqueAngle??0,t.thickness=e.thickness,t.horizontalMode=e.halign,t.verticalMode=e.valign,t.widthFactor=e.xScale??1,t}convertTolerance(e){const t=new r.AcDbFcf;return t.location.copy(e.position),t.text=e.text,t.dimensionStyle=e.styleName??"",e.extrusionDirection&&t.normal.copy(e.extrusionDirection),e.xAxisDirection&&t.direction.copy(e.xAxisDirection),t}convertMText(e){const t=new r.AcDbMText;t.contents=e.text,e.styleName!=null&&(t.styleName=e.styleName),t.height=e.height,t.width=e.width,t.rotation=r.AcGeMathUtil.degToRad(e.rotation||0),t.location=e.insertionPoint,t.attachmentPoint=e.attachmentPoint,e.direction&&(t.direction=new r.AcGeVector3d(e.direction)),t.drawingDirection=e.drawingDirection;const n=this.readMTextExtentsWidth(e);return n!=null&&n>0&&(t.extentsWidth=n),t}readMTextExtentsWidth(e){const t=e;return t.extentsWidth??t.actualWidth}convertLeader(e){var n;const t=new r.AcDbLeader;return(n=e.vertices)==null||n.forEach(i=>{t.appendVertex(i)}),t.hasArrowHead=e.isArrowheadEnabled,t.hasHookLine=e.isHooklineExists,t.isHookLineSameDirection=e.isHooklineSameDirection,t.isSplined=e.isSpline,t.dimensionStyle=e.styleName??"",t.annoType=e.leaderCreationFlag,t.textHeight=e.textHeight??0,t.textWidth=e.textWidth??0,t.byBlockColor=e.byBlockColor,t.associatedAnnotation=e.associatedAnnotation??"",e.normal&&(t.normal=e.normal),e.horizontalDirection&&(t.horizontalDirection=e.horizontalDirection),e.offsetFromBlock&&(t.offsetFromBlock=e.offsetFromBlock),e.offsetFromAnnotation&&(t.offsetFromAnnotation=e.offsetFromAnnotation),t}convertMLine(e){const t=new r.AcDbMLine;return t.styleName=e.name||"STANDARD",t.styleObjectHandle=e.styleObjectHandle,t.scale=e.scale,t.justification=e.justification,t.flags=e.flags,t.styleCount=e.styleCount,t.startPosition=e.startPosition,t.normal=e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t.segments=(e.segments??[]).map(n=>{var i;return{position:n.position,direction:n.direction,miterDirection:n.miterDirection,elements:((i=n.elements)==null?void 0:i.map(a=>({parameterCount:a.parameterCount,parameters:a.parameters??[],fillCount:a.fillCount,fillParameters:a.fillParameters??[]})))??[]}}),t}convertMLeader(e){var H,Se;const t=new r.AcDbMLeader,n=e;t.version=e.version,t.leaderStyleId=e.leaderStyleId,e.leaderStyleId&&(t.mleaderStyleId=e.leaderStyleId),t.propertyOverrideFlag=e.propertyOverrideFlag,t.leaderLineType=e.leaderLineType??r.AcDbMLeaderLineType.StraightLeader,e.leaderLineColor!=null&&(t.leaderLineColor=r.decodeMLeaderStyleRawColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,t.leaderLineWeight=e.leaderLineWeight,t.landingEnabled=e.landingEnabled,t.doglegEnabled=e.doglegEnabled??!1,t.doglegLength=e.doglegLength??0,t.arrowheadId=e.arrowheadId,t.arrowheadSize=e.arrowheadSize,t.textStyleId=e.textStyleId,t.textLeftAttachmentType=e.textLeftAttachmentType,t.textRightAttachmentType=e.textRightAttachmentType,t.textAngleType=e.textAngleType,t.textAlignmentType=e.textAlignmentType,e.textColor!=null&&(t.textColor=r.decodeMLeaderStyleRawColor(e.textColor)),t.textFrameEnabled=e.textFrameEnabled,t.landingGap=e.landingGap,t.textAttachment=e.textAttachment,t.textFlowDirection=e.textFlowDirection,this.isValidHandleId(e.blockContentId)&&(t.blockContentId=e.blockContentId),e.blockContentColor!=null&&(t.blockContentColor=r.decodeMLeaderStyleRawColor(e.blockContentColor)),t.blockContentRotation=e.blockContentRotation,t.blockContentConnectionType=e.blockContentConnectionType,t.annotativeScaleEnabled=e.annotativeScaleEnabled,t.arrowheadOverrides=e.arrowheadOverrides?e.arrowheadOverrides.map(T=>({...T})):[],t.blockAttributes=e.blockAttributes?e.blockAttributes.map(T=>({...T})):[],t.textDirectionNegative=e.textDirectionNegative,t.textAlignInIPE=e.textAlignInIPE,t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection,t.topTextAttachmentDirection=e.topTextAttachmentDirection,t.contentScale=e.contentScale,t.textLineSpacingStyle=e.textLineSpacingStyle,e.textBackgroundColor!=null&&(t.textBackgroundColor=r.decodeMLeaderStyleRawColor(e.textBackgroundColor)),t.textBackgroundScaleFactor=e.textBackgroundScaleFactor,t.textBackgroundTransparency=e.textBackgroundTransparency,t.textBackgroundColorOn=e.textBackgroundColorOn,t.textFillOn=e.textFillOn,t.textColumnType=e.textColumnType,t.textUseAutoHeight=e.textUseAutoHeight,t.textColumnWidth=e.textColumnWidth,t.textColumnGutterWidth=e.textColumnGutterWidth,t.textColumnFlowReversed=e.textColumnFlowReversed,t.textColumnHeight=e.textColumnHeight,t.textUseWordBreak=e.textUseWordBreak,t.hasMText=e.hasMText,t.hasBlock=e.hasBlock,t.planeNormalReversed=e.planeNormalReversed,e.blockContentScale&&(t.blockContentScale=new r.AcGeVector3d(e.blockContentScale)),e.contentBasePosition&&(t.contentBasePosition=new r.AcGePoint3d().copy(e.contentBasePosition)),e.textAnchor&&(t.textAnchor=new r.AcGePoint3d().copy(e.textAnchor)),e.planeOrigin&&(t.planeOrigin=new r.AcGePoint3d().copy(e.planeOrigin)),e.planeXAxisDirection&&(t.planeXAxisDirection=new r.AcGeVector3d(e.planeXAxisDirection)),e.planeYAxisDirection&&(t.planeYAxisDirection=new r.AcGeVector3d(e.planeYAxisDirection));const i=n.textContent,a=i&&typeof i=="object"?i:void 0,o=typeof i=="string"&&i.length>0||this.readString(a??{},["text","contents"])!=null||this.readString(n,["text","contents","mtext"])!=null,s=e.contentType??(o?r.AcDbMLeaderContentType.MTextContent:e.blockContent?r.AcDbMLeaderContentType.BlockContent:r.AcDbMLeaderContentType.NoneContent);t.contentType=s;const d=this.readPoint(n,["normal","extrusionDirection"]);d&&(t.normal=d);const A=this.readString(a??{},["styleName","textStyleName","textStyle"])??this.readString(n,["textStyleName","textStyle","styleName"]);A&&(t.textStyleName=A);const c=this.readPositiveNumber(a??{},["textHeight","height"])??this.readPositiveNumber(n,["textHeight","mtextHeight","textContentHeight"])??this.readPositiveNumber(n,["arrowheadSize","contentScale"]);c!=null&&(t.textHeight=c);const l=this.readPositiveNumber(a??{},["textWidth","width"])??this.readPositiveNumber(n,["textWidth","mtextWidth","textContentWidth"]);l!=null&&(t.textWidth=l),t.textLineSpacingFactor=this.readNumber(a??{},["lineSpacingFactor","textLineSpacingFactor"])??this.readNumber(n,["textLineSpacingFactor"])??t.textLineSpacingFactor;const h=this.readNumber(a??{},["textRotation","rotation"])??this.readNumber(n,["textRotation","mtextRotation","textContentRotation"]);h!=null&&(t.textRotation=r.AcGeMathUtil.degToRad(h));const g=this.readPoint(n,["textDirection","mtextDirection","textDirectionVector"]);g&&(t.textDirection=g);const L=this.readNumber(n,["textAttachmentPoint","attachmentPoint"]);L!=null&&L!==0&&(t.textAttachmentPoint=L);const p=e.textAttachmentDirection;p!=null&&(t.textAttachmentDirection=p);const P=this.readNumber(n,["textDrawingDirection","drawingDirection"]);P!=null&&(t.textDrawingDirection=P);const oe=typeof i=="string"?i:this.readString(a??{},["text","contents"])??this.readString(n,["text","contents","mtext"]),Ce=this.readPoint(a??{},["anchorPoint","textAnchor","textLocation","textPosition","textAnchorPoint"])??this.readPoint(n,["textAnchor","textLocation","textPosition","textAnchorPoint","contentBasePosition"]);if(oe!=null&&Ce&&(t.mtextContent={text:oe,anchorPoint:Ce}),e.blockContent){const T=e.blockContent,We=e.blockContent.blockContentId;if(this.isValidHandleId(We)){const Ze=this.readNumber(T,["color"]);t.blockContent={blockContentId:We,normal:this.readPoint(T,["normal"]),position:e.blockContent.position,scale:this.readPoint(T,["scale"]),rotation:this.readNumber(T,["rotation"]),color:Ze!=null?r.decodeMLeaderStyleRawColor(Ze):void 0,transformationMatrix:Array.isArray(e.blockContent.transformationMatrix)?e.blockContent.transformationMatrix:[]}}}else this.isValidHandleId(e.blockContentId)&&(t.blockContent={blockContentId:e.blockContentId,scale:e.blockContentScale,rotation:e.blockContentRotation,color:t.blockContentColor,transformationMatrix:[]});return(H=this.readMLeaderLeaders(n))==null||H.forEach(T=>{t.addLeader({lastLeaderLinePoint:T.lastLeaderLinePoint,lastLeaderLinePointSet:T.lastLeaderLinePointSet,doglegVector:T.doglegVector,doglegVectorSet:T.doglegVectorSet,doglegLength:T.doglegLength??e.doglegLength,breaks:T.breaks,leaderBranchIndex:T.leaderBranchIndex,leaderLines:T.leaderLines})}),t.numberOfLeaders===0&&((Se=this.readLeaderLineArray(n))==null||Se.forEach(T=>{t.addLeader({doglegLength:e.doglegLength}),t.addLeaderLine(t.numberOfLeaders-1,T)})),t.numberOfLeaders===0&&e.contentBasePosition&&t.addLeader({lastLeaderLinePoint:e.contentBasePosition,lastLeaderLinePointSet:!0,doglegLength:e.doglegLength}),t}convertDimension(e){if(e.subclassMarker=="AcDbAlignedDimension"){const t=e,n=new r.AcDbAlignedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(n.dimBlockPosition={...t.insertionPoint,z:0}),n.rotation=r.AcGeMathUtil.degToRad(t.rotationAngle||0),this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDbRotatedDimension"){const t=e,n=new r.AcDbRotatedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(n.dimBlockPosition={...t.insertionPoint,z:0}),n.rotation=r.AcGeMathUtil.degToRad(t.rotationAngle||0),this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDb3PointAngularDimension"){const t=e,n=new r.AcDb3PointAngularDimension(t.centerPoint,t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDb2LineAngularDimension"){const t=e,n=t.centerPoint??t.subDefinitionPoint2??t.definitionPoint,i=t.definitionPoint??t.subDefinitionPoint2;if(!n||!t.subDefinitionPoint1||!t.subDefinitionPoint2||!i)return null;const a=new r.AcDb3PointAngularDimension(n,t.subDefinitionPoint1,t.subDefinitionPoint2,i);return this.processDimensionCommonAttrs(e,a),a}else if(e.subclassMarker=="AcDbOrdinateDimension"){const t=e,n=new r.AcDbOrdinateDimension(t.subDefinitionPoint1,t.subDefinitionPoint2);return this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDbRadialDimension"){const t=e,n=new r.AcDbRadialDimension(t.definitionPoint,t.subDefinitionPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,n),n}else if(e.subclassMarker=="AcDbDiametricDimension"){const t=e,n=new r.AcDbDiametricDimension(t.definitionPoint,t.subDefinitionPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,n),n}return null}processImage(e,t){t.position.copy(e.position),t.brightness=e.brightness,t.contrast=e.contrast,t.fade=e.fade,t.imageSize.copy(e.imageSize),t.isShownClipped=(e.flags|4)>0,t.isImageShown=(e.flags|3)>0,t.isImageTransparent=(e.flags|8)>0,t.imageDefId=e.imageDefHandle,t.isClipped=e.isClipped,e.clippingBoundaryPath.forEach(n=>{t.clipBoundary.push(new r.AcGePoint2d(n))}),t.width=Math.sqrt(e.uPixel.x**2+e.uPixel.y**2+e.uPixel.z**2)*e.imageSize.x,t.height=Math.sqrt(e.vPixel.x**2+e.vPixel.y**2+e.vPixel.z**2)*e.imageSize.y,t.rotation=Math.atan2(e.uPixel.y,e.uPixel.x)}convertImage(e){const t=new r.AcDbRasterImage;return this.processImage(e,t),t.clipBoundaryType=e.clippingBoundaryType,t}processWipeout(e,t){t.position.copy(e.position),t.brightness=e.brightness,t.contrast=e.contrast,t.fade=e.fade,t.imageSize.copy(e.imageSize),t.isShownClipped=(e.displayFlag|4)>0,t.isImageShown=(e.displayFlag|3)>0,t.isImageTransparent=(e.displayFlag|8)>0,t.imageDefId=e.imageDefHardId,t.isClipped=e.isClipping,e.boundary.forEach(n=>{t.clipBoundary.push(new r.AcGePoint2d(n))}),t.clipBoundaryType=e.boundaryType,t.width=Math.sqrt(e.uDirection.x**2+e.uDirection.y**2+e.uDirection.z**2)*e.imageSize.x,t.height=Math.sqrt(e.vDirection.x**2+e.vDirection.y**2+e.vDirection.z**2)*e.imageSize.y,t.rotation=Math.atan2(e.uDirection.y,e.uDirection.x)}convertWipeout(e){const t=new r.AcDbWipeout;return this.processWipeout(e,t),t}convertViewport(e){const t=new r.AcDbViewport;return t.number=e.viewportId,t.centerPoint.copy(e.viewportCenter),t.height=e.height,t.width=e.width,t.viewCenter.copy(e.displayCenter),t.viewHeight=e.viewHeight,t}convertRay(e){const t=new r.AcDbRay;return t.basePoint.copy(e.position),t.unitDir.copy(e.direction),t}convertXline(e){const t=new r.AcDbXline;return t.basePoint.copy(e.position),t.unitDir.copy(e.direction),t}convertBlockReference(e){const t=new r.AcDbBlockReference(e.name);return e.insertionPoint&&t.position.copy(e.insertionPoint),t.scaleFactors.x=e.xScale||1,t.scaleFactors.y=e.yScale||1,t.scaleFactors.z=e.zScale||1,t.rotation=e.rotation!=null?r.AcGeMathUtil.degToRad(e.rotation):0,t.normal.copy(e.extrusionDirection??{x:0,y:0,z:1}),t}processDimensionCommonAttrs(e,t){t.dimBlockId=e.name,t.textPosition.copy(e.textPoint),t.textRotation=e.textRotation||0,e.textLineSpacingFactor&&(t.textLineSpacingFactor=e.textLineSpacingFactor),e.textLineSpacingStyle&&(t.textLineSpacingStyle=e.textLineSpacingStyle),t.dimensionStyleName=e.styleName,t.dimensionText=e.text||"",t.measurement=e.measurement,t.normal.copy(e.extrusionDirection??{x:0,y:0,z:1})}processCommonAttrs(e,t){if(t.layer=e.layer||"0",e.handle&&(t.objectId=e.handle.toString()),t.ownerId=e.ownerBlockRecordSoftId||"",e.lineType!=null&&(t.lineType=e.lineType),e.lineweight!=null&&(t.lineWeight=e.lineweight),e.lineTypeScale!=null&&(t.linetypeScale=e.lineTypeScale),e.color!=null||e.colorIndex!=null||e.colorName){const n=new r.AcCmColor;e.color!=null&&n.setRGBValue(e.color),e.colorIndex!=null&&(n.colorIndex=e.colorIndex),e.colorName&&(n.colorName=e.colorName),t.color=n}e.isVisible!=null&&(t.visibility=!e.isVisible),e.transparency!=null&&(t.transparency=r.AcCmTransparency.deserialize(e.transparency))}isValidHandleId(e){return e!=null&&e!==""&&e!=="0"}readNumber(e,t){for(const n of t){const i=e[n];if(typeof i=="number"&&Number.isFinite(i))return i}}readPositiveNumber(e,t){const n=this.readNumber(e,t);return n!=null&&n>0?n:void 0}readString(e,t){for(const n of t){const i=e[n];if(typeof i=="string")return i}}readBoolean(e,t){for(const n of t){const i=e[n];if(typeof i=="boolean")return i;if(typeof i=="number")return i!==0}}readPoint(e,t){for(const n of t){const i=e[n];if(this.isPointLike(i))return i;if(Array.isArray(i)&&typeof i[0]=="number"&&typeof i[1]=="number")return{x:i[0],y:i[1],z:i[2]??0}}}readLeaderLineArray(e){const t=e.leaderLines;if(Array.isArray(t))return t.map(i=>{if(!i||typeof i!="object")return;const a=i.vertices;return Array.isArray(a)?a.filter(o=>this.isPointLike(o)):void 0}).filter(i=>!!i&&i.length>0);const n=e.vertices;if(Array.isArray(n)){const i=n.filter(a=>this.isPointLike(a));return i.length>0?[i]:void 0}}readMLeaderLeaders(e){const t=e.leaderSections;if(!Array.isArray(t))return;const n=[];return t.forEach(i=>{if(!i||typeof i!="object")return;const a=i,o=a.leaderLines,s=Array.isArray(o)?o.reduce((L,p)=>{const P=this.readMLeaderLine(p);return P&&L.push(P),L},[]):void 0,d={},A=this.readPoint(a,["lastLeaderLinePoint"]),c=this.readPoint(a,["doglegVector"]),l=this.readNumber(a,["doglegLength"]),h=this.readMLeaderBreaks(a.breaks),g=this.readNumber(a,["leaderBranchIndex"]);A&&(d.lastLeaderLinePoint=A),a.lastLeaderLinePointSet!=null&&(d.lastLeaderLinePointSet=this.readBoolean(a,["lastLeaderLinePointSet"])),c&&(d.doglegVector=c),a.doglegVectorSet!=null&&(d.doglegVectorSet=this.readBoolean(a,["doglegVectorSet"])),l!=null&&(d.doglegLength=l),h&&(d.breaks=h),g!=null&&(d.leaderBranchIndex=g),s&&(d.leaderLines=s),n.push(d)}),n}readMLeaderLine(e){if(!e||typeof e!="object")return;const t=e,n=t.vertices,i=Array.isArray(n)?n.filter(d=>this.isPointLike(d)):[],a=this.readMLeaderBreaks(t.breaks),o=Array.isArray(t.breakPointIndexes)?t.breakPointIndexes.filter(d=>typeof d=="number"):void 0,s=this.readNumber(t,["leaderLineIndex"]);return i.length>0||a&&a.length>0?{vertices:i,breakPointIndexes:o,leaderLineIndex:s,breaks:a}:void 0}readMLeaderBreaks(e){if(!Array.isArray(e))return;const t=e.map(n=>{if(!n||typeof n!="object")return;const i=n,a=this.readPoint(i,["start"]),o=this.readPoint(i,["end"]),s=this.readNumber(i,["index"]);if(!a||!o)return;const d={start:a,end:o};return s!=null&&(d.index=s),d}).filter(n=>!!n);return t.length>0?t:void 0}isPointLike(e){return!!e&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"}}class dt{convertLayout(e,t){var a,o;const n=new r.AcDbLayout;n.layoutName=e.layoutName,n.tabOrder=e.tabOrder,n.plotSettingsName=e.pageSetupName,n.plotCfgName=e.configName,n.canonicalMediaName=e.paperSize,n.plotViewName=e.plotViewName,n.currentStyleSheet=e.currentStyleSheet,n.plotPaperMargins={left:e.marginLeft,right:e.marginRight,top:e.marginTop,bottom:e.marginBottom},n.plotPaperSize.copy({x:e.paperWidth,y:e.paperHeight}),n.plotOrigin.copy({x:e.plotOriginX,y:e.plotOriginY}),n.plotWindowArea.min.copy({x:e.windowAreaXMin,y:e.windowAreaYMin}),n.plotWindowArea.max.copy({x:e.windowAreaXMax,y:e.windowAreaYMax}),n.customPrintScale={numerator:e.printScaleNumerator,denominator:e.printScaleDenominator},n.plotPaperUnits=e.plotPaperUnit,n.plotRotation=e.plotRotation,n.plotType=e.plotType,n.stdScaleType=e.standardScaleType,n.shadePlot=(()=>{switch(e.shadePlotMode){case 1:return r.AcDbPlotShadePlotType.kWireframe;case 2:return r.AcDbPlotShadePlotType.kHidden;case 3:return r.AcDbPlotShadePlotType.kRendered;default:return r.AcDbPlotShadePlotType.kAsDisplayed}})(),n.shadePlotResLevel=(()=>{switch(e.shadePlotResolution){case 1:return r.AcDbPlotShadePlotResLevel.kPreview;case 2:return r.AcDbPlotShadePlotResLevel.kNormal;case 3:return r.AcDbPlotShadePlotResLevel.kPresentation;case 4:return r.AcDbPlotShadePlotResLevel.kMaximum;case 5:return r.AcDbPlotShadePlotResLevel.kCustom;default:return r.AcDbPlotShadePlotResLevel.kDraft}})(),e.shadePlotCustomDPI!=null&&(n.shadePlotCustomDPI=e.shadePlotCustomDPI),e.shadePlotId&&(n.shadePlotId=e.shadePlotId);const i=e.layoutFlag??0;if(n.plotViewportBorders=(i&1)!==0,n.showPlotStyles=(i&2)!==0,n.plotCentered=(i&4)!==0,n.plotHidden=(i&8)!==0,n.useStandardScale=(i&16)!==0,n.plotPlotStyles=(i&32)!==0,n.scaleLineweights=(i&64)!==0,n.printLineweights=(i&128)!==0,n.drawViewportsFirst=(i&512)!==0,n.modelType=(i&1024)!==0,e.viewportId&&n.viewportArray.push(e.viewportId),e.layoutName==="Model"){const s=r.AcDbBlockTableRecord.MODEL_SPACE_NAME.toUpperCase();(a=t.tables.BLOCK_RECORD)==null||a.entries.some(d=>d.name.toUpperCase()===s?(n.blockTableRecordId=d.handle,!0):!1)}else(o=t.tables.BLOCK_RECORD)==null||o.entries.some(s=>s.layoutObjects===e.handle?(n.blockTableRecordId=s.handle,!0):!1),n.blockTableRecordId||(n.blockTableRecordId=e.paperSpaceTableId);return e.minLimit&&n.limits.min.copy(e.minLimit),e.maxLimit&&n.limits.max.copy(e.maxLimit),e.minExtent&&n.extents.min.copy(e.minExtent),e.maxExtent&&n.extents.max.copy(e.maxExtent),this.processCommonAttrs(e,n),n}convertImageDef(e){const t=new r.AcDbRasterImageDef;return t.sourceFileName=e.fileName,this.processCommonAttrs(e,t),t}convertMLeaderStyle(e){const t=new r.AcDbMLeaderStyle;return t.unknown1=e.unknown1,e.contentType!=null&&(t.contentType=e.contentType),e.drawMLeaderOrderType!=null&&(t.drawMLeaderOrderType=e.drawMLeaderOrderType),e.drawLeaderOrderType!=null&&(t.drawLeaderOrderType=e.drawLeaderOrderType),e.maxLeaderSegmentPoints!=null&&(t.maxLeaderSegmentPoints=e.maxLeaderSegmentPoints),e.firstSegmentAngleConstraint!=null&&(t.firstSegmentAngleConstraint=e.firstSegmentAngleConstraint),e.secondSegmentAngleConstraint!=null&&(t.secondSegmentAngleConstraint=e.secondSegmentAngleConstraint),e.leaderLineType!=null&&(t.leaderLineType=e.leaderLineType),e.leaderLineColor!=null&&(t.leaderLineColor=r.decodeMLeaderStyleRawColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,e.leaderLineWeight!=null&&(t.leaderLineWeight=e.leaderLineWeight),e.landingEnabled!=null&&(t.landingEnabled=e.landingEnabled),e.landingGap!=null&&(t.landingGap=e.landingGap),e.doglegEnabled!=null&&(t.doglegEnabled=e.doglegEnabled),e.doglegLength!=null&&(t.doglegLength=e.doglegLength),e.description!=null&&(t.description=e.description),t.arrowheadId=e.arrowheadId,e.arrowheadSize!=null&&(t.arrowheadSize=e.arrowheadSize),e.defaultMTextContents!=null&&(t.defaultMTextContents=e.defaultMTextContents),t.textStyleId=e.textStyleId,e.textLeftAttachmentType!=null&&(t.textLeftAttachmentType=e.textLeftAttachmentType),e.textAngleType!=null&&(t.textAngleType=e.textAngleType),e.textAlignmentType!=null&&(t.textAlignmentType=e.textAlignmentType),e.textRightAttachmentType!=null&&(t.textRightAttachmentType=e.textRightAttachmentType),e.textColor!=null&&(t.textColor=r.decodeMLeaderStyleRawColor(e.textColor)),e.textHeight!=null&&(t.textHeight=e.textHeight),e.textFrameEnabled!=null&&(t.textFrameEnabled=e.textFrameEnabled),e.textAlignAlwaysLeft!=null&&(t.textAlignAlwaysLeft=e.textAlignAlwaysLeft),e.alignSpace!=null&&(t.alignSpace=e.alignSpace),t.blockContentId=e.blockContentId,e.blockContentColor!=null&&(t.blockContentColor=r.decodeMLeaderStyleRawColor(e.blockContentColor)),e.blockContentScale&&(t.blockContentScale={x:e.blockContentScale.x,y:e.blockContentScale.y,z:e.blockContentScale.z??1}),e.blockContentScaleEnabled!=null&&(t.blockContentScaleEnabled=e.blockContentScaleEnabled),e.blockContentRotation!=null&&(t.blockContentRotation=e.blockContentRotation),e.blockContentRotationEnabled!=null&&(t.blockContentRotationEnabled=e.blockContentRotationEnabled),e.blockContentConnectionType!=null&&(t.blockContentConnectionType=e.blockContentConnectionType),e.scale!=null&&(t.scale=e.scale),e.overwritePropertyValue!=null&&(t.overwritePropertyValue=e.overwritePropertyValue),e.annotative!=null&&(t.annotative=e.annotative),e.breakGapSize!=null&&(t.breakGapSize=e.breakGapSize),e.textAttachmentDirection!=null&&(t.textAttachmentDirection=e.textAttachmentDirection),e.bottomTextAttachmentDirection!=null&&(t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection),e.topTextAttachmentDirection!=null&&(t.topTextAttachmentDirection=e.topTextAttachmentDirection),t.unknown2=e.unknown2,this.processCommonAttrs(e,t),t}convertMLineStyle(e){var i;const t=new r.AcDbMlineStyle;if(e.styleName!=null&&(t.styleName=e.styleName),e.flags!=null&&(t.flags=e.flags),e.description!=null&&(t.description=e.description),e.fillColor!=null)t.fillColor=new r.AcCmColor().setRGBValue(e.fillColor);else if(e.fillColorIndex!=null){const a=new r.AcCmColor;a.colorIndex=e.fillColorIndex,t.fillColor=a}e.startAngle!=null&&(t.startAngle=e.startAngle),e.endAngle!=null&&(t.endAngle=e.endAngle);const n=Math.max(e.elementCount??0,((i=e.elements)==null?void 0:i.length)??0);return n>0&&(t.elements=Array.from({length:n},(a,o)=>{var s,d,A,c;return{offset:((d=(s=e.elements)==null?void 0:s[o])==null?void 0:d.offset)??0,color:(()=>{var h,g,L,p;const l=new r.AcCmColor;return((g=(h=e.elements)==null?void 0:h[o])==null?void 0:g.color)!=null?l.setRGBValue(e.elements[o].color):l.colorIndex=((p=(L=e.elements)==null?void 0:L[o])==null?void 0:p.colorIndex)??256,l})(),lineType:((c=(A=e.elements)==null?void 0:A[o])==null?void 0:c.lineType)??"BYLAYER"}})),this.processCommonAttrs(e,t),t}processCommonAttrs(e,t){t.objectId=e.handle,e.ownerObjectId!=null&&(t.ownerId=e.ownerObjectId)}}class ut extends r.AcDbDatabaseConverter{constructor(e={}){super(e),this.config.parserWorkerUrl||(this.config.parserWorkerUrl="/assets/dxf-parser-worker.js")}async parse(e,t){const n=this.config,i=this.getParserWorkerTimeout(e,t);if(n.useWorker&&n.parserWorkerUrl){const a=r.createWorkerApi({workerUrl:n.parserWorkerUrl,timeout:i,maxConcurrentWorkers:1}),o=await a.execute(e);return a.destroy(),r.AcDbOpenDatabaseError.throwOnWorkerParseFailure(o),{model:o.data,data:{unknownEntityCount:0}}}else throw new Error("dxf converter can run in web worker only!")}getFonts(e){var a,o,s,d,A;const t=e.blocks??{},n=new Map;for(const c of((o=(a=e.tables)==null?void 0:a.DIMSTYLE)==null?void 0:o.entries)??[])n.set(c.name,c.DIMTXSTY||r.DEFAULT_TEXT_STYLE);const i=[...e.entities??[]];for(const c of Object.values(t))(s=c.entities)!=null&&s.length&&i.push(...c.entities);return new r.AcDbFontNameCollector({styles:((d=e.tables.STYLE)==null?void 0:d.entries)??[],textStyleVar:((A=e.header)==null?void 0:A.$TEXTSTYLE)||r.DEFAULT_TEXT_STYLE}).collect(i,{getEntityFontInfo:c=>{if(c.type=="MTEXT"){const l=c;return{styleName:l.styleName,formattedText:l.text,resolveStyle:!0}}if(c.type=="TEXT"||c.type=="ATTRIB"||c.type=="ATTDEF")return{styleName:c.styleName,resolveStyle:!0};if(c.type=="MULTILEADER"||c.type=="MLEADER"){const l=c,h=typeof l.textContent=="string"?l.textContent:"";return{styleName:typeof l.textStyleName=="string"?l.textStyleName:typeof l.styleName=="string"?l.styleName:void 0,formattedText:h,resolveStyle:!0}}if(c.type=="TOLERANCE"){const l=c;return{styleName:this.resolveDimStyleTextStyle(n,l.styleName),formattedText:l.text,resolveStyle:!0}}if(c.type=="INSERT")return{blockName:c.name};if(c.type=="DIMENSION"){const l=c;return l.name?{blockName:l.name}:null}return null},getBlockEntities:c=>{var l;return(l=t[c])==null?void 0:l.entities}})}resolveDimStyleTextStyle(e,t){const n=t==null?void 0:t.trim();if(!n)return;const i=e.get(n);if(i)return i;const a=n.toUpperCase();for(const[o,s]of e)if(o.toUpperCase()===a)return s}async processEntities(e,t,n,i,a){var h;const o=new Ke;o.setObjectByHandle(e.objects.byHandle??{}),o.setAcdsDataByHandle(((h=e.acdsData)==null?void 0:h.byOwnerHandle)??{});let s=e.entities;const d=s.length,A=new r.AcDbBatchProcessing(d,100-i.value,n);this.config.convertByEntityType&&(s=this.groupAndFlattenByType(s));const c=new Map;for(let g=0;g<d;g++){const L=s[g];if(L.type==="ATTRIB"){const p=o.convert(L);if(p&&p.ownerId&&p.ownerId!=="0"){let P=c.get(p==null?void 0:p.ownerId);P==null&&(P=[],c.set(p.ownerId,P)),P.push(p)}}}const l=t.tables.blockTable.modelSpace;await A.processChunk(async(g,L)=>{let p=[],P=g<L?s[g].type:"";for(let Ce=g;Ce<L;Ce++){const H=s[Ce];if(!(H.ownerBlockRecordSoftId&&H.ownerBlockRecordSoftId!==l.objectId)&&H.type!=="ATTRIB"){const Se=o.convert(H);if(Se){if(this.config.convertByEntityType&&H.type!==P&&(l.appendEntity(p),p=[],P=H.type),H.type==="INSERT"){const T=c.get(Se.objectId);T&&T.length>0&&T.forEach(We=>{Se.appendAttributes(We)})}p.push(Se)}}}l.appendEntity(p);let oe=i.value+L/d*(100-i.value);oe>100&&(oe=100),a&&await a(oe,"ENTITY","IN-PROGRESS")})}async processEntitiesInBlock(e,t,n=!1,i={},a={}){const o=new Ke;o.setObjectByHandle(i),o.setAcdsDataByHandle(a);const s=e.length,d=[],A=t.objectId,c=[];for(let l=0;l<s;l++){const h=e[l],g=o.convert(h);g&&(h.type==="ATTRIB"?c.push(g):(!n||h.ownerBlockRecordSoftId===A)&&d.push(g))}t.appendEntity(d),c.forEach(l=>{const h=t.getIdAt(l.ownerId);h&&h.appendAttributes(l)})}processBlocks(e,t){var i,a,o,s;const n=e.blocks;for(const[d,A]of Object.entries(n)){let c=t.tables.blockTable.getAt(A.name);c||(c=new r.AcDbBlockTableRecord,A.handle!=null&&(c.objectId=String(A.handle)),c.name=d,t.tables.blockTable.add(c)),c.origin.copy(A.position);const l=A.type??0;c.flags=l,A.xrefPath&&(c.pathName=A.xrefPath,c.isXref||(c.flags=l|r.AcDbBlockTableRecordFlag.Xref)),A.entities?this.processEntitiesInBlock(A.entities,c,!1,((i=e.objects)==null?void 0:i.byHandle)??{},((a=e.acdsData)==null?void 0:a.byOwnerHandle)??{}):c.isPaperSapce&&this.processEntitiesInBlock(e.entities,c,!0,((o=e.objects)==null?void 0:o.byHandle)??{},((s=e.acdsData)==null?void 0:s.byOwnerHandle)??{})}}processClasses(e,t){var n;(n=e.classes)!=null&&n.length&&(t.classes=e.classes.map(i=>({name:i.name,cppClassName:i.cppClassName,appName:i.appName,proxyFlag:i.proxyFlag,instanceCount:i.instanceCount,wasProxy:i.wasProxy,isEntity:i.isEntity})))}processHeader(e,t){const n=e.header;n.$ACADVER&&(t.version=n.$ACADVER),t.cecolor.colorIndex=n.$CECOLOR||256,t.angbase=n.$ANGBASE||0,t.angdir=n.$ANGDIR||0,n.$AUNITS!=null&&(t.aunits=n.$AUNITS),n.$AUPREC!=null&&(t.auprec=n.$AUPREC),n.$LUNITS!=null&&(t.lunits=n.$LUNITS),n.$LUPREC!=null&&(t.luprec=n.$LUPREC),n.$UNITMODE!=null&&(t.unitmode=n.$UNITMODE),n.$MEASUREMENT!=null&&(t.measurement=n.$MEASUREMENT),t.celtype=n.$CELTYPE||r.ByLayer,r.AcDbSysVarManager.instance().setVar(r.AcDbSystemVariables.CETRANSPARENCY,n.$CETRANSPARENCY||"ByLayer",t),t.celtscale=n.$CELTSCALE||1;const i=this.normalizeHeaderStringValue(n.$CMLSTYLE)||this.normalizeHeaderStringValue(n.CMLSTYLE)||r.DEFAULT_MLINE_STYLE;t.cmlstyle=i;const a=n.$CMLSCALE??n.CMLSCALE;typeof a=="number"&&Number.isFinite(a)&&(t.cmlscale=a);const o=this.normalizeHeaderStringValue(n.$CMLEADERSTYLE)||this.normalizeHeaderStringValue(n.CMLEADERSTYLE)||r.DEFAULT_MLEADER_STYLE;t.cmleaderstyle=o,t.hplayer=this.normalizeHeaderStringValue(n.$HPLAYER)||this.normalizeHeaderStringValue(n.HPLAYER)||".",t.ltscale=n.$LTSCALE||1,n.$EXTMAX&&(t.extmax=n.$EXTMAX),n.$EXTMIN&&(t.extmin=n.$EXTMIN),n.$INSUNITS!=null&&(t.insunits=n.$INSUNITS),t.osmode=n.$OSMODE||0,t.orthomode=n.$ORTHOMODE||0,t.pdmode=n.$PDMODE||0,t.pdsize=n.$PDSIZE||0,t.textstyle=n.$TEXTSTYLE||r.DEFAULT_TEXT_STYLE,n.$HANDSEED!=null&&t.initializeHandleSeed(String(n.$HANDSEED))}processBlockTables(e,t){var i;const n=(i=e.tables.BLOCK_RECORD)==null?void 0:i.entries;n&&n.length>0&&(t.tables.blockTable.removeAll(),n.forEach(a=>{const o=new r.AcDbBlockTableRecord;o.objectId=a.handle,o.name=a.name,o.layoutId=a.layoutObjects,o.blockInsertUnits=a.insertionUnits,o.explodability=a.explodability,o.blockScaling=a.scalability,a.bmpPreview&&(o.bmpPreview=a.bmpPreview),t.tables.blockTable.add(o)}))}processObjects(e,t){const n=e.objects.byName,i=new dt;if("LAYOUT"in n){const a=t.objects.layout;n.LAYOUT.forEach(o=>{const s=i.convertLayout(o,e);a.setAt(s.layoutName,s)})}if("IMAGEDEF"in n){const a=t.objects.imageDefinition;n.IMAGEDEF.forEach(o=>{const s=i.convertImageDef(o);a.setAt(s.objectId,s)})}if("MLEADERSTYLE"in n){const a=t.objects.mleaderStyle;n.MLEADERSTYLE.forEach(o=>{const s=i.convertMLeaderStyle(o);a.setAt(s.objectId,s)})}if("MLINESTYLE"in n){const a=t.objects.mlineStyle;n.MLINESTYLE.forEach(o=>{const s=i.convertMLineStyle(o);a.setAt(s.styleName||s.objectId,s)})}}processViewports(e,t){var i;const n=(i=e.tables)==null?void 0:i.VPORT;if(n){this.processCommonTableAttrs(n,t.tables.viewportTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcDbViewportTableRecord;this.processCommonTableEntryAttrs(o,s),o.circleSides&&(s.circleSides=o.circleSides),s.standardFlag=o.standardFlag,s.center.copy(o.center??r.VPORT_FALLBACK_CENTER_2D),s.lowerLeftCorner.copy(o.lowerLeftCorner??r.VPORT_FALLBACK_LLC),s.upperRightCorner.copy(o.upperRightCorner??r.VPORT_FALLBACK_URC),o.snapBasePoint&&s.snapBase.copy(o.snapBasePoint),o.snapRotationAngle&&(s.snapAngle=o.snapRotationAngle),o.snapSpacing&&s.snapIncrements.copy(o.snapSpacing),o.majorGridLines&&(s.gridMajor=o.majorGridLines),o.gridSpacing&&s.gridIncrements.copy(o.gridSpacing),o.backgroundObjectId&&(s.backgroundObjectId=o.backgroundObjectId),s.gsView.center.copy(o.center??r.VPORT_FALLBACK_CENTER_2D),s.gsView.viewDirectionFromTarget.copy(o.viewDirectionFromTarget??r.VPORT_FALLBACK_VIEW_DIR),s.gsView.viewTarget.copy(o.viewTarget??r.VPORT_FALLBACK_VIEW_TARGET),o.lensLength&&(s.gsView.lensLength=o.lensLength),o.frontClippingPlane&&(s.gsView.frontClippingPlane=o.frontClippingPlane),o.backClippingPlane&&(s.gsView.backClippingPlane=o.backClippingPlane),o.viewHeight&&(s.gsView.viewHeight=o.viewHeight),o.aspectRatio!=null&&Number.isFinite(o.aspectRatio)&&o.aspectRatio>0&&(s.gsView.aspectRatio=o.aspectRatio),o.viewTwistAngle&&(s.gsView.viewTwistAngle=o.viewTwistAngle),o.frozenLayers&&(s.gsView.frozenLayers=o.frozenLayers),o.styleSheet&&(s.gsView.styleSheet=o.styleSheet),o.renderMode&&(s.gsView.renderMode=o.renderMode),o.viewMode&&(s.gsView.viewMode=o.viewMode),o.ucsIconSetting&&(s.gsView.ucsIconSetting=o.ucsIconSetting),o.ucsOrigin&&s.gsView.ucsOrigin.copy(o.ucsOrigin),o.ucsXAxis&&s.gsView.ucsXAxis.copy(o.ucsXAxis),o.ucsYAxis&&s.gsView.ucsYAxis.copy(o.ucsYAxis),o.orthographicType&&(s.gsView.orthographicType=o.orthographicType),o.shadePlotSetting&&(s.gsView.shadePlotSetting=o.shadePlotSetting),o.shadePlotObjectId&&(s.gsView.shadePlotObjectId=o.shadePlotObjectId),o.visualStyleObjectId&&(s.gsView.visualStyleObjectId=o.visualStyleObjectId),o.isDefaultLightingOn&&(s.gsView.isDefaultLightingOn=o.isDefaultLightingOn),o.defaultLightingType&&(s.gsView.defaultLightingType=o.defaultLightingType),o.brightness&&(s.gsView.brightness=o.brightness),o.contrast&&(s.gsView.contrast=o.contrast),o.ambientColor&&(s.gsView.ambientColor=o.ambientColor),t.tables.viewportTable.add(s)})}}processLayers(e,t){var i;const n=(i=e.tables)==null?void 0:i.LAYER;if(n){this.processCommonTableAttrs(n,t.tables.layerTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcCmColor;s.colorIndex=o.colorIndex;const d=new r.AcDbLayerTableRecord({name:o.name,standardFlags:o.standardFlag,linetype:o.lineType,lineWeight:o.lineweight,isOff:o.colorIndex<0,color:s,isPlottable:o.isPlotting});this.processCommonTableEntryAttrs(o,d),t.tables.layerTable.add(d)})}t.ensureTextStyleDefaults()}processLineTypes(e,t){var i;const n=(i=e.tables)==null?void 0:i.LTYPE;if(n){this.processCommonTableAttrs(n,t.tables.linetypeTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcDbLinetypeTableRecord({name:o.name,standardFlag:o.standardFlag,description:o.description,totalPatternLength:o.totalPatternLength,pattern:o.pattern});this.processCommonTableEntryAttrs(o,s),t.tables.linetypeTable.add(s)})}}processTextStyles(e,t){var i;const n=(i=e.tables)==null?void 0:i.STYLE;if(n){this.processCommonTableAttrs(n,t.tables.textStyleTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s=new r.AcDbTextStyleTableRecord({name:o.name,standardFlag:o.standardFlag,fixedTextHeight:o.fixedTextHeight,widthFactor:o.widthFactor,obliqueAngle:o.obliqueAngle,textGenerationFlag:o.textGenerationFlag,lastHeight:o.lastHeight,font:o.font,bigFont:o.bigFont,extendedFont:o.extendedFont});this.processCommonTableEntryAttrs(o,s),t.tables.textStyleTable.add(s)})}}processDimStyles(e,t){var i;const n=(i=e.tables)==null?void 0:i.DIMSTYLE;if(n){this.processCommonTableAttrs(n,t.tables.dimStyleTable,t);const a=n.entries;a&&a.length>0&&a.forEach(o=>{const s={name:o.name,ownerId:o.ownerObjectId,dimpost:o.DIMPOST||"",dimapost:o.DIMAPOST||"",dimscale:o.DIMSCALE,dimasz:o.DIMASZ,dimexo:o.DIMEXO,dimdli:o.DIMDLI,dimexe:o.DIMEXE,dimrnd:o.DIMRND,dimdle:o.DIMDLE,dimtp:o.DIMTP,dimtm:o.DIMTM,dimtxt:o.DIMTXT,dimcen:o.DIMCEN,dimtsz:o.DIMTSZ,dimaltf:o.DIMALTF,dimlfac:o.DIMLFAC,dimtvp:o.DIMTVP,dimtfac:o.DIMTFAC,dimgap:o.DIMGAP,dimaltrnd:o.DIMALTRND,dimtol:o.DIMTOL==null||o.DIMTOL==0?0:1,dimlim:o.DIMLIM==null||o.DIMLIM==0?0:1,dimtih:o.DIMTIH==null||o.DIMTIH==0?0:1,dimtoh:o.DIMTOH==null||o.DIMTOH==0?0:1,dimse1:o.DIMSE1==null||o.DIMSE1==0?0:1,dimse2:o.DIMSE2==null||o.DIMSE2==0?0:1,dimtad:o.DIMTAD,dimzin:o.DIMZIN,dimazin:o.DIMAZIN,dimalt:o.DIMALT,dimaltd:o.DIMALTD,dimtofl:o.DIMTOFL,dimsah:o.DIMSAH,dimtix:o.DIMTIX,dimsoxd:o.DIMSOXD,dimclrd:o.DIMCLRD,dimclre:o.DIMCLRE,dimclrt:o.DIMCLRT,dimadec:o.DIMADEC||0,dimunit:o.DIMUNIT||2,dimdec:o.DIMDEC,dimtdec:o.DIMTDEC,dimaltu:o.DIMALTU,dimalttd:o.DIMALTTD,dimaunit:o.DIMAUNIT,dimfrac:o.DIMFRAC,dimlunit:o.DIMLUNIT,dimdsep:o.DIMDSEP?o.DIMDSEP.toString():".",dimtmove:o.DIMTMOVE||0,dimjust:o.DIMJUST,dimsd1:o.DIMSD1,dimsd2:o.DIMSD2,dimtolj:o.DIMTOLJ,dimtzin:o.DIMTZIN,dimaltz:o.DIMALTZ,dimalttz:o.DIMALTTZ,dimfit:o.DIMFIT||0,dimupt:o.DIMUPT,dimatfit:o.DIMATFIT,dimtxsty:o.DIMTXSTY||r.DEFAULT_TEXT_STYLE,dimldrblk:o.DIMLDRBLK||"",dimblk:o.DIMBLK||"",dimblk1:o.DIMBLK1||"",dimblk2:o.DIMBLK2||"",dimlwd:o.DIMLWD,dimlwe:o.DIMLWE},d=new r.AcDbDimStyleTableRecord(s);this.processCommonTableEntryAttrs(o,d),t.tables.dimStyleTable.add(d)})}}processCommonTableAttrs(e,t,n){e.handle!=null&&n.adoptExternalHandle(t,e.handle),e.ownerObjectId!=null&&(t.ownerId=e.ownerObjectId)}processCommonTableEntryAttrs(e,t){t.name="name"in e?e.name:"",e.handle!=null&&(t.objectId=e.handle),e.ownerObjectId!=null&&(t.ownerId=e.ownerObjectId)}groupAndFlattenByType(e){const t={},n=[];for(const i of e)t[i.type]||(t[i.type]=[],n.push(i.type)),t[i.type].push(i);return n.flatMap(i=>t[i])}normalizeHeaderStringValue(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}}ie.AcDbDxfConverter=ut,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbDxfConverter.d.ts","sourceRoot":"","sources":["../src/AcDbDxfConverter.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AcDbDxfConverter.d.ts","sourceRoot":"","sources":["../src/AcDbDxfConverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,8BAA8B,EAC9B,YAAY,EACZ,qBAAqB,EACrB,2BAA2B,EAiC5B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAeL,SAAS,EAKV,MAAM,2BAA2B,CAAA;AAKlC;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAiB,SAAQ,qBAAqB,CAAC,SAAS,CAAC;gBACxD,MAAM,GAAE,2BAAgC;IAOpD;;;;;;OAMG;cACa,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM;;;;;;IA0BzD;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS;IAsEjC,OAAO,CAAC,wBAAwB;IAqBhC;;;;;;;;;;;;;;;;;;OAkBG;cACa,eAAe,CAC7B,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,YAAY,EAChB,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAClC,QAAQ,CAAC,EAAE,8BAA8B;IAwF3C;;;;;;;;;;;;;;;;;;OAkBG;YACW,sBAAsB;IA0CpC;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,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return to.concat(ar || Array.prototype.slice.call(from));
|
|
87
87
|
};
|
|
88
|
-
import { AcCmColor, AcDbBatchProcessing, AcDbBlockTableRecord, AcDbDatabaseConverter, AcDbDimStyleTableRecord, AcDbFontNameCollector, AcDbLayerTableRecord, AcDbLinetypeTableRecord, AcDbOpenDatabaseError, AcDbSystemVariables, AcDbSysVarManager, AcDbTextStyleTableRecord, AcDbViewportTableRecord, ByLayer, createWorkerApi, DEFAULT_MLEADER_STYLE, DEFAULT_MLINE_STYLE, DEFAULT_TEXT_STYLE, VPORT_FALLBACK_CENTER_2D, VPORT_FALLBACK_LLC, VPORT_FALLBACK_URC, VPORT_FALLBACK_VIEW_DIR, VPORT_FALLBACK_VIEW_TARGET } from '@mlightcad/data-model';
|
|
88
|
+
import { AcCmColor, AcDbBatchProcessing, AcDbBlockTableRecord, AcDbBlockTableRecordFlag, AcDbDatabaseConverter, AcDbDimStyleTableRecord, AcDbFontNameCollector, AcDbLayerTableRecord, AcDbLinetypeTableRecord, AcDbOpenDatabaseError, AcDbSystemVariables, AcDbSysVarManager, AcDbTextStyleTableRecord, AcDbViewportTableRecord, ByLayer, createWorkerApi, DEFAULT_MLEADER_STYLE, DEFAULT_MLINE_STYLE, DEFAULT_TEXT_STYLE, VPORT_FALLBACK_CENTER_2D, VPORT_FALLBACK_LLC, VPORT_FALLBACK_URC, VPORT_FALLBACK_VIEW_DIR, VPORT_FALLBACK_VIEW_TARGET } from '@mlightcad/data-model';
|
|
89
89
|
import { AcDbEntityConverter } from './AcDbEntitiyConverter';
|
|
90
90
|
import { AcDbObjectConverter } from './AcDbObjectConverter';
|
|
91
91
|
/**
|
|
@@ -466,11 +466,11 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
466
466
|
*/
|
|
467
467
|
AcDbDxfConverter.prototype.processBlocks = function (model, db) {
|
|
468
468
|
var e_4, _a;
|
|
469
|
-
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
469
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
470
470
|
var blocks = model.blocks;
|
|
471
471
|
try {
|
|
472
|
-
for (var
|
|
473
|
-
var
|
|
472
|
+
for (var _l = __values(Object.entries(blocks)), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
473
|
+
var _o = __read(_m.value, 2), name_2 = _o[0], block = _o[1];
|
|
474
474
|
var dbBlock = db.tables.blockTable.getAt(block.name);
|
|
475
475
|
if (!dbBlock) {
|
|
476
476
|
dbBlock = new AcDbBlockTableRecord();
|
|
@@ -484,15 +484,24 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
484
484
|
// processBlockTables may create the record first without a base point.
|
|
485
485
|
// Always sync origin from the BLOCKS section before expanding entities.
|
|
486
486
|
dbBlock.origin.copy(block.position);
|
|
487
|
+
var blockFlags = (_b = block.type) !== null && _b !== void 0 ? _b : 0;
|
|
488
|
+
dbBlock.flags = blockFlags;
|
|
489
|
+
if (block.xrefPath) {
|
|
490
|
+
dbBlock.pathName = block.xrefPath;
|
|
491
|
+
// Some files only carry the path without flag bits; treat as xref.
|
|
492
|
+
if (!dbBlock.isXref) {
|
|
493
|
+
dbBlock.flags = blockFlags | AcDbBlockTableRecordFlag.Xref;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
487
496
|
if (block.entities) {
|
|
488
497
|
// Process entities in user-defined blocks
|
|
489
|
-
this.processEntitiesInBlock(block.entities, dbBlock, false, (
|
|
498
|
+
this.processEntitiesInBlock(block.entities, dbBlock, false, (_d = (_c = model.objects) === null || _c === void 0 ? void 0 : _c.byHandle) !== null && _d !== void 0 ? _d : {}, (_f = (_e = model.acdsData) === null || _e === void 0 ? void 0 : _e.byOwnerHandle) !== null && _f !== void 0 ? _f : {});
|
|
490
499
|
}
|
|
491
500
|
else {
|
|
492
501
|
// Process paper space block definiton. Entities in model space are
|
|
493
502
|
// handled in method processEntities
|
|
494
503
|
if (dbBlock.isPaperSapce) {
|
|
495
|
-
this.processEntitiesInBlock(model.entities, dbBlock, true, (
|
|
504
|
+
this.processEntitiesInBlock(model.entities, dbBlock, true, (_h = (_g = model.objects) === null || _g === void 0 ? void 0 : _g.byHandle) !== null && _h !== void 0 ? _h : {}, (_k = (_j = model.acdsData) === null || _j === void 0 ? void 0 : _j.byOwnerHandle) !== null && _k !== void 0 ? _k : {});
|
|
496
505
|
}
|
|
497
506
|
}
|
|
498
507
|
}
|
|
@@ -500,7 +509,7 @@ var AcDbDxfConverter = /** @class */ (function (_super) {
|
|
|
500
509
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
501
510
|
finally {
|
|
502
511
|
try {
|
|
503
|
-
if (
|
|
512
|
+
if (_m && !_m.done && (_a = _l.return)) _a.call(_l);
|
|
504
513
|
}
|
|
505
514
|
finally { if (e_4) throw e_4.error; }
|
|
506
515
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbDxfConverter.js","sourceRoot":"","sources":["../src/AcDbDxfConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EAET,mBAAmB,EAGnB,oBAAoB,EAGpB,qBAAqB,EAErB,uBAAuB,EAQvB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EAEvB,qBAAqB,EAGrB,mBAAmB,EACnB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EAIvB,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAuB9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH;IAAsC,oC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ACD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAClC,CAAC;;;;;;;;;QAED,OAAO,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI,IAAI,OAAA,MAAM,CAAC,IAAI,CAAC,EAAZ,CAAY,CAAC,CAAA;IAC5C,CAAC;IAEO,qDAA0B,GAAlC,UAAmC,KAAc;QAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAA;QAC/C,IAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;QAC5B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IACjD,CAAC;IACH,uBAAC;AAAD,CAAC,AA1/BD,CAAsC,qBAAqB,GA0/B1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/dxf-json-converter",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.7",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"vite": "^5.2.10",
|
|
41
|
-
"@mlightcad/data-model": "1.10.
|
|
41
|
+
"@mlightcad/data-model": "1.10.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@mlightcad/data-model": "1.10.
|
|
44
|
+
"@mlightcad/data-model": "1.10.7"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"analyze": "pnpm run analyze:lib && pnpm run analyze:worker",
|