@flyfish-group/file-viewer 1.0.21 → 1.0.22
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.
- package/README.md +10 -10
- package/dist/components/3MFLoader.js +1 -1
- package/dist/components/AMFLoader.js +1 -1
- package/dist/components/AudioViewer.js +1 -1
- package/dist/components/CadViewer.js +1 -1
- package/dist/components/CodeViewer.js +1 -1
- package/dist/components/ColladaLoader.js +1 -1
- package/dist/components/DrawingViewer.js +1 -1
- package/dist/components/EdaViewer.js +1 -1
- package/dist/components/EmailViewer.js +1 -1
- package/dist/components/EpubViewer.js +1 -1
- package/dist/components/FBXLoader.js +1 -1
- package/dist/components/GLTFLoader.js +1 -1
- package/dist/components/ImageViewer.js +1 -1
- package/dist/components/KMZLoader.js +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/components/OBJLoader.js +1 -1
- package/dist/components/OfdViewer.js +1 -1
- package/dist/components/PCDLoader.js +1 -1
- package/dist/components/PLYLoader.js +1 -1
- package/dist/components/PptxRender.js +5036 -5036
- package/dist/components/STLLoader.js +1 -1
- package/dist/components/TDSLoader.js +1 -1
- package/dist/components/USDLoader.js +1 -1
- package/dist/components/UmdViewer.js +2 -2
- package/dist/components/VRMLLoader.js +1 -1
- package/dist/components/VTKLoader.js +1 -1
- package/dist/components/XYZLoader.js +1 -1
- package/dist/components/XlsxTable.js +1 -1
- package/dist/components/___vite-browser-external_commonjs-proxy.js +1 -1
- package/dist/components/_commonjs-dynamic-modules.js +1 -1
- package/dist/components/_commonjsHelpers.js +1 -1
- package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
- package/dist/components/arc.js +1 -1
- package/dist/components/architecture-7EHR7CIX.js +1 -1
- package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
- package/dist/components/az-AZ-76LH7QW2.js +1 -1
- package/dist/components/bg-BG-XCXSNQG7.js +1 -1
- package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
- package/dist/components/bn-BD-2XOGV67Q.js +1 -1
- package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
- package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
- package/dist/components/cfb.js +1 -1
- package/dist/components/channel.js +1 -1
- package/dist/components/chunk-2J33WTMH.js +1 -1
- package/dist/components/chunk-4BX2VUAB.js +1 -1
- package/dist/components/chunk-55IACEB6.js +1 -1
- package/dist/components/chunk-727SXJPM.js +1 -1
- package/dist/components/chunk-AQP2D5EJ.js +1 -1
- package/dist/components/chunk-FMBD7UC4.js +1 -1
- package/dist/components/chunk-ND2GUHAM.js +1 -1
- package/dist/components/chunk-QZHKN3VN.js +1 -1
- package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
- package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
- package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
- package/dist/components/cytoscape.esm.js +1 -1
- package/dist/components/da-DK-5WZEPLOC.js +1 -1
- package/dist/components/dagre-BM42HDAG.js +1 -1
- package/dist/components/de-DE-XR44H4JA.js +1 -1
- package/dist/components/defaultLocale.js +1 -1
- package/dist/components/diagram-2AECGRRQ.js +1 -1
- package/dist/components/diagram-5GNKFQAL.js +1 -1
- package/dist/components/diagram-KO2AKTUF.js +1 -1
- package/dist/components/diagram-LMA3HP47.js +1 -1
- package/dist/components/diagram-OG6HWLK6.js +1 -1
- package/dist/components/directory-open-01563666.js +1 -1
- package/dist/components/directory-open-4ed118d0.js +1 -1
- package/dist/components/docx-preview.js +2 -2
- package/dist/components/el-GR-BZB4AONW.js +1 -1
- package/dist/components/en-B4ZKOASM.js +1 -1
- package/dist/components/erDiagram-TEJ5UH35.js +1 -1
- package/dist/components/es-ES-U4NZUMDT.js +1 -1
- package/dist/components/eu-ES-A7QVB2H4.js +1 -1
- package/dist/components/eventmodeling-FCH6USID.js +1 -1
- package/dist/components/fa-IR-HGAKTJCU.js +1 -1
- package/dist/components/fflate.module.js +1 -1
- package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
- package/dist/components/file-open-002ab408.js +1 -1
- package/dist/components/file-open-7c801643.js +1 -1
- package/dist/components/file-save-3189631c.js +1 -1
- package/dist/components/file-save-745eba88.js +1 -1
- package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
- package/dist/components/fr-FR-RHASNOE6.js +1 -1
- package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
- package/dist/components/gitGraph-WXDBUCRP.js +1 -1
- package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
- package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
- package/dist/components/global-compiler.js +1 -1
- package/dist/components/global-renderer.js +1 -1
- package/dist/components/graph.js +1 -1
- package/dist/components/he-IL-6SHJWFNN.js +1 -1
- package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
- package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
- package/dist/components/id-ID-SAP4L64H.js +1 -1
- package/dist/components/image-GAAHSSAO.js +1 -1
- package/dist/components/image-blob-reduce.esm.js +1 -1
- package/dist/components/index10.js +1 -1
- package/dist/components/index11.js +1 -1
- package/dist/components/index12.js +1 -1
- package/dist/components/index13.js +1 -1
- package/dist/components/index14.js +1 -1
- package/dist/components/index15.js +1 -1
- package/dist/components/index16.js +1 -1
- package/dist/components/index17.js +1 -1
- package/dist/components/index18.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/index20.js +1 -1
- package/dist/components/index21.js +1 -1
- package/dist/components/index22.js +2 -2
- package/dist/components/index23.js +1 -1
- package/dist/components/index24.js +1 -1
- package/dist/components/index25.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index4.js +1 -1
- package/dist/components/index5.js +1 -1
- package/dist/components/index6.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/index9.js +1 -1
- package/dist/components/info-J43DQDTF.js +1 -1
- package/dist/components/infoDiagram-5YYISTIA.js +1 -1
- package/dist/components/init.js +1 -1
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
- package/dist/components/it-IT-JPQ66NNP.js +1 -1
- package/dist/components/ja-JP-DBVTYXUO.js +1 -1
- package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
- package/dist/components/jszip.min.js +1 -1
- package/dist/components/kaa-6HZHGXH3.js +1 -1
- package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
- package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
- package/dist/components/katex.js +1 -1
- package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
- package/dist/components/km-KH-HSX4SM5Z.js +1 -1
- package/dist/components/ko-KR-MTYHY66A.js +1 -1
- package/dist/components/ku-TR-6OUDTVRD.js +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/libarchive.js +1 -1
- package/dist/components/linear.js +1 -1
- package/dist/components/lt-LT-XHIRWOB4.js +1 -1
- package/dist/components/lv-LV-5QDEKY6T.js +1 -1
- package/dist/components/mermaid-parser.core.js +2 -2
- package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
- package/dist/components/mr-IN-CRQNXWMA.js +1 -1
- package/dist/components/my-MM-5M5IBNSE.js +1 -1
- package/dist/components/nb-NO-T6EIAALU.js +1 -1
- package/dist/components/nestedRender.js +1 -1
- package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
- package/dist/components/nn-NO-6E72VCQL.js +1 -1
- package/dist/components/oc-FR-POXYY2M6.js +1 -1
- package/dist/components/ofd.js +1 -1
- package/dist/components/ordinal.js +1 -1
- package/dist/components/pa-IN-N4M65BXN.js +1 -1
- package/dist/components/packet-YPE3B663.js +1 -1
- package/dist/components/percentages-BXMCSKIN.js +1 -1
- package/dist/components/pica.js +1 -1
- package/dist/components/pie-LRSECV5Y.js +1 -1
- package/dist/components/pie.js +1 -1
- package/dist/components/pieDiagram-4H26LBE5.js +1 -1
- package/dist/components/pl-PL-T2D74RX3.js +1 -1
- package/dist/components/postal-mime.js +1 -1
- package/dist/components/printLayout.js +1 -1
- package/dist/components/pt-BR-5N22H2LF.js +1 -1
- package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
- package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
- package/dist/components/radar-GUYGQ44K.js +1 -1
- package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
- package/dist/components/ro-RO-JPDTUUEW.js +1 -1
- package/dist/components/rough.esm.js +1 -1
- package/dist/components/roundRect.js +1 -1
- package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
- package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
- package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
- package/dist/components/si-LK-N5RQ5JYF.js +1 -1
- package/dist/components/sk-SK-C5VTKIMK.js +1 -1
- package/dist/components/sl-SI-NN7IZMDC.js +1 -1
- package/dist/components/stateDiagram-AJRCARHV.js +1 -1
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
- package/dist/components/subset-shared.chunk.js +1 -1
- package/dist/components/subset-worker.chunk.js +1 -1
- package/dist/components/sv-SE-XGPEYMSR.js +1 -1
- package/dist/components/ta-IN-2NMHFXQM.js +1 -1
- package/dist/components/th-TH-HPSO5L25.js +1 -1
- package/dist/components/time.js +1 -1
- package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
- package/dist/components/tr-TR-DEFEU3FU.js +1 -1
- package/dist/components/transform.js +1 -1
- package/dist/components/treeView-BLDUP644.js +1 -1
- package/dist/components/treemap-LRROVOQU.js +1 -1
- package/dist/components/uk-UA-QMV73CPH.js +1 -1
- package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
- package/dist/components/vi-VN-M7AON7JQ.js +1 -1
- package/dist/components/wardley-L42UT6IY.js +1 -1
- package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
- package/dist/components/wasm-pack-shim.js +1 -1
- package/dist/components/wasm-pack-shim2.js +1 -1
- package/dist/components/worker-ref.js +1 -1
- package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
- package/dist/components/zh-CN-LNUGB5OW.js +1 -1
- package/dist/components/zh-HK-E62DVLB3.js +1 -1
- package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const aU=b;(function(c,d){const aS=b,e=c();while(!![]){try{const f=-parseInt(aS(0x259))/0x1+parseInt(aS(0x31d))/0x2+-parseInt(aS(0x2b7))/0x3+-parseInt(aS(0x296))/0x4+parseInt(aS(0x282))/0x5+-parseInt(aS(0x2bd))/0x6*(-parseInt(aS(0x2a7))/0x7)+-parseInt(aS(0x226))/0x8*(-parseInt(aS(0x23b))/0x9);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x911c0));function Pe(g,k,m=0x0,p=g['length']-0x1,v=De){const aT=b;for(;p>m;){if(p-m>0x258){const A=p-m+0x1,C=k-m+0x1,D=Math['log'](A),F=0.5*Math['exp'](0x2*D/0x3),I=0.5*Math['sqrt'](D*F*(A-F)/A)*(C-A/0x2<0x0?-0x1:0x1),L=Math['max'](m,Math['floor'](k-C*F/A+I)),M=Math[aT(0x1f9)](p,Math['floor'](k+(A-C)*F/A+I));Pe(g,k,L,M,v);}const w=g[k];let x=m,z=p;for(_(g,m,k),v(g[p],w)>0x0&&_(g,m,p);x<z;){for(_(g,x,z),x++,z--;v(g[x],w)<0x0;)x++;for(;v(g[z],w)>0x0;)z--;}v(g[m],w)===0x0?_(g,m,z):(z++,_(g,z,p)),z<=k&&(m=z+0x1),k<=z&&(p=z-0x1);}}function _(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function De(c,d){return c<d?-0x1:c>d?0x1:0x0;}class Le{constructor(c=0x9){this['_maxEntries']=Math['max'](0x4,c),this['_minEntries']=Math['max'](0x2,Math['ceil'](this['_maxEntries']*0.4)),this['clear']();}[aU(0x1e8)](){return this['_all'](this['data'],[]);}['search'](d){const aV=aU;let e=this['data'];const f=[];if(!G(d,e))return f;const g=this['toBBox'],h=[];for(;e;){for(let k=0x0;k<e[aV(0x22f)]['length'];k++){const l=e[aV(0x22f)][k],m=e['leaf']?g(l):l;G(d,m)&&(e['leaf']?f[aV(0x2f7)](l):te(d,m)?this['_all'](l,f):h['push'](l));}e=h['pop']();}return f;}['collides'](c){const aW=aU;let d=this['data'];if(!G(c,d))return!0x1;const e=[];for(;d;){for(let f=0x0;f<d[aW(0x22f)]['length'];f++){const g=d['children'][f],h=d['leaf']?this['toBBox'](g):g;if(G(c,h)){if(d['leaf']||te(c,h))return!0x0;e[aW(0x2f7)](g);}}d=e[aW(0x323)]();}return!0x1;}['load'](c){const aX=aU;if(!(c&&c['length']))return this;if(c['length']<this['_minEntries']){for(let e=0x0;e<c['length'];e++)this['insert'](c[e]);return this;}let d=this['_build'](c['slice'](),0x0,c[aX(0x2c0)]-0x1,0x0);if(!this['data']['children']['length'])this['data']=d;else{if(this['data']['height']===d['height'])this['_splitRoot'](this['data'],d);else{if(this['data']['height']<d['height']){const f=this[aX(0x320)];this['data']=d,d=f;}this['_insert'](d,this['data']['height']-d['height']-0x1,!0x0);}}return this;}['insert'](c){return c&&this['_insert'](c,this['data']['height']-0x1),this;}['clear'](){return this['data']=O([]),this;}['remove'](d,e){const aY=aU;if(!d)return this;let f=this['data'];const g=this['toBBox'](d),k=[],m=[];let p,u,v;for(;f||k[aY(0x2c0)];){if(f||(f=k['pop'](),u=k[k['length']-0x1],p=m[aY(0x323)](),v=!0x0),f['leaf']){const w=Ne(d,f[aY(0x22f)],e);if(w!==-0x1)return f[aY(0x22f)]['splice'](w,0x1),k[aY(0x2f7)](f),this['_condense'](k),this;}!v&&!f[aY(0x1fc)]&&te(f,g)?(k['push'](f),m['push'](p),p=0x0,u=f,f=f[aY(0x22f)][0x0]):u?(p++,f=u['children'][p],v=!0x1):f=null;}return this;}['toBBox'](c){return c;}['compareMinX'](c,d){const aZ=aU;return c['minX']-d[aZ(0x254)];}['compareMinY'](c,d){return c['minY']-d['minY'];}['toJSON'](){return this['data'];}['fromJSON'](c){return this['data']=c,this;}['_all'](c,d){const b0=aU,e=[];for(;c;)c['leaf']?d['push'](...c[b0(0x22f)]):e['push'](...c['children']),c=e['pop']();return d;}[aU(0x331)](e,g,k,m){const b1=aU,p=k-g+0x1;let v=this['_maxEntries'],w;if(p<=v)return w=O(e['slice'](g,k+0x1)),R(w,this['toBBox']),w;m||(m=Math['ceil'](Math['log'](p)/Math['log'](v)),v=Math['ceil'](p/Math['pow'](v,m-0x1))),w=O([]),w[b1(0x1fc)]=!0x1,w['height']=m;const x=Math['ceil'](p/v),z=x*Math['ceil'](Math[b1(0x339)](v));de(e,g,k,z,this['compareMinX']);for(let A=g;A<=k;A+=z){const C=Math[b1(0x1f9)](A+z-0x1,k);de(e,A,C,x,this[b1(0x261)]);for(let D=A;D<=C;D+=x){const F=Math['min'](D+x-0x1,C);w[b1(0x22f)]['push'](this['_build'](e,D,F,m-0x1));}}return R(w,this['toBBox']),w;}['_chooseSubtree'](d,e,f,g){const b2=aU;for(;g['push'](e),!(e['leaf']||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,p;for(let v=0x0;v<e['children']['length'];v++){const w=e[b2(0x22f)][v],x=ee(w),z=Ye(d,w)-x;z<m?(m=z,k=x<k?x:k,p=w):z===m&&x<k&&(k=x,p=w);}e=p||e[b2(0x22f)][0x0];}return e;}['_insert'](c,d,e){const b3=aU,f=e?c:this['toBBox'](c),g=[],h=this['_chooseSubtree'](f,this['data'],d,g);for(h['children']['push'](c),j(h,f);d>=0x0&&g[d]['children'][b3(0x2c0)]>this['_maxEntries'];)this['_split'](g,d),d--;this['_adjustParentBBoxes'](f,g,d);}['_split'](c,d){const b4=aU,e=c[d],f=e['children']['length'],g=this['_minEntries'];this[b4(0x2be)](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=O(e[b4(0x22f)]['splice'](h,e['children']['length']-h));k['height']=e['height'],k['leaf']=e['leaf'],R(e,this['toBBox']),R(k,this[b4(0x255)]),d?c[d-0x1][b4(0x22f)]['push'](k):this['_splitRoot'](e,k);}['_splitRoot'](c,d){const b5=aU;this[b5(0x320)]=O([c,d]),this['data']['height']=c['height']+0x1,this['data']['leaf']=!0x1,R(this['data'],this['toBBox']);}['_chooseSplitIndex'](d,e,f){let g,k=0x1/0x0,m=0x1/0x0;for(let p=e;p<=f-e;p++){const v=$(d,0x0,p,this['toBBox']),w=$(d,p,f,this['toBBox']),x=ze(v,w),z=ee(v)+ee(w);x<k?(k=x,g=p,m=z<m?z:m):x===k&&z<m&&(m=z,g=p);}return g||f-e;}['_chooseSplitAxis'](c,d,e){const b6=aU,f=c['leaf']?this['compareMinX']:Be,g=c[b6(0x1fc)]?this['compareMinY']:Xe,h=this['_allDistMargin'](c,d,e,f),k=this['_allDistMargin'](c,d,e,g);h<k&&c['children']['sort'](f);}['_allDistMargin'](d,e,f,g){const b7=aU;d['children']['sort'](g);const k=this['toBBox'],m=$(d,0x0,e,k),p=$(d,f-e,f,k);let u=U(m)+U(p);for(let v=e;v<f-e;v++){const w=d['children'][v];j(m,d[b7(0x1fc)]?k(w):w),u+=U(m);}for(let x=f-e-0x1;x>=e;x--){const z=d['children'][x];j(p,d['leaf']?k(z):z),u+=U(p);}return u;}['_adjustParentBBoxes'](c,d,e){for(let f=e;f>=0x0;f--)j(d[f],c);}['_condense'](c){for(let d=c['length']-0x1,e;d>=0x0;d--)c[d]['children']['length']===0x0?d>0x0?(e=c[d-0x1]['children'],e['splice'](e['indexOf'](c[d]),0x1)):this['clear']():R(c[d],this['toBBox']);}}function Ne(c,d,f){const b8=aU;if(!f)return d[b8(0x2ed)](c);for(let g=0x0;g<d['length'];g++)if(f(c,d[g]))return g;return-0x1;}function R(c,d){$(c,0x0,c['children']['length'],d,c);}function $(c,d,f,g,h){h||(h=O(null)),h['minX']=0x1/0x0,h['minY']=0x1/0x0,h['maxX']=-0x1/0x0,h['maxY']=-0x1/0x0;for(let k=d;k<f;k++){const l=c['children'][k];j(h,c['leaf']?g(l):l);}return h;}function j(c,d){const b9=aU;return c['minX']=Math['min'](c['minX'],d['minX']),c['minY']=Math['min'](c[b9(0x298)],d['minY']),c[b9(0x20d)]=Math['max'](c[b9(0x20d)],d['maxX']),c['maxY']=Math['max'](c['maxY'],d['maxY']),c;}function Be(c,d){const bb=aU;return c['minX']-d[bb(0x254)];}function Xe(c,d){const bc=aU;return c[bc(0x298)]-d['minY'];}function ee(c){return(c['maxX']-c['minX'])*(c['maxY']-c['minY']);}function U(c){const bd=aU;return c['maxX']-c[bd(0x254)]+(c['maxY']-c['minY']);}function Ye(c,d){const bf=aU;return(Math['max'](d[bf(0x20d)],c['maxX'])-Math[bf(0x1f9)](d[bf(0x254)],c['minX']))*(Math['max'](d['maxY'],c[bf(0x324)])-Math['min'](d[bf(0x298)],c[bf(0x298)]));}function ze(c,d){const bg=aU,f=Math['max'](c['minX'],d['minX']),g=Math['max'](c['minY'],d['minY']),h=Math[bg(0x1f9)](c['maxX'],d['maxX']),i=Math['min'](c['maxY'],d[bg(0x324)]);return Math['max'](0x0,h-f)*Math['max'](0x0,i-g);}function te(c,d){const bh=aU;return c['minX']<=d['minX']&&c[bh(0x298)]<=d['minY']&&d['maxX']<=c['maxX']&&d[bh(0x324)]<=c['maxY'];}function G(c,d){const bi=aU;return d[bi(0x254)]<=c['maxX']&&d[bi(0x298)]<=c['maxY']&&d['maxX']>=c['minX']&&d['maxY']>=c['minY'];}function O(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function de(c,d,f,g,h){const k=[d,f];for(;k['length'];){if(f=k['pop'](),d=k['pop'](),f-d<=g)continue;const l=d+Math['ceil']((f-d)/g/0x2)*g;Pe(c,l,d,f,h),k['push'](d,l,l,f);}}function Re(d){const bj=aU,f=d[bj(0x26f)](/\r\n?/g,'\x0a'),g=[],h=f[bj(0x2c0)];let k=0x0;for(;k<h;){for(;k<h&&f['charCodeAt'](k)===0xa;)k++;if(k>=h)break;let l=f[bj(0x2ed)]('\x0a',k);l===-0x1&&(l=h);const m=f['substring'](k,l)['trim']();k=l+0x1;const p=parseInt(m,0xa);if(isNaN(p)){k<h&&(l=f['indexOf']('\x0a',k),l===-0x1&&(l=h),k=l+0x1);continue;}if(k>=h)break;l=f['indexOf']('\x0a',k),l===-0x1&&(l=h);const u=f['substring'](k,l)['replace'](/\s+$/,'');k=l+0x1,g['push']({'code':p,'value':u});}return g;}function Oe(c,d,f){const bk=aU;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g[bk(0x305)]==='ENDSEC')return d+0x1;if(g['code']===0x9){const h=g['value'];switch(d++,h){case'$ACADVER':d<c['length']&&(f['acadVersion']=c[d][bk(0x305)],d++);break;case'$EXTMIN':if(d<c['length']){const i=fe(c,d);f[bk(0x2d9)]=i['point'],d=i['nextIndex'];}break;case'$EXTMAX':if(d<c['length']){const k=fe(c,d);f[bk(0x223)]=k[bk(0x249)],d=k['nextIndex'];}break;case'$INSUNITS':d<c['length']&&(f['insUnits']=parseInt(c[d]['value'],0xa),d++);break;case'$MEASUREMENT':d<c[bk(0x2c0)]&&(f['measurement']=parseInt(c[d]['value'],0xa),d++);break;case'$LTSCALE':d<c['length']&&(f['ltScale']=parseFloat(c[d]['value']),d++);break;case'$DWGCODEPAGE':d<c[bk(0x2c0)]&&(f['dwgCodePage']=c[d]['value'],d++);break;case bk(0x2b3):d<c['length']&&(f['handleSeed']=c[d]['value'],d++);break;default:for(;d<c['length']&&c[d]['code']!==0x9&&c[d]['code']!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function fe(c,d){const bl=aU,f={'x':0x0,'y':0x0,'z':0x0};for(;d<c['length'];){const g=c[d]['code'];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d]['value']),d++;else{if(g===0x1e)f['z']=parseFloat(c[d][bl(0x305)]),d++;else break;}}}return{'point':f,'nextIndex':d};}function _e(c,d,f){const bm=aU;for(;d<c['length'];){const g=c[d];if(g[bm(0x2df)]===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g[bm(0x305)]==='TABLE'){if(d++,d>=c['length'])break;const h=c[d]['value'];switch(d++,h){case'LAYER':d=$e(c,d,f['layers']);break;case'LTYPE':d=je(c,d,f['lineTypes']);break;case'STYLE':d=qe(c,d,f['styles']);break;default:d=We(c,d);break;}}else d++;}return d;}function We(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDTAB')return d+0x1;d++;}return d;}function $e(c,d,f){const bn=aU;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='LAYER'){d++;const h={'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1};for(;d<c[bn(0x2c0)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h[bn(0x2d4)]=i['value'];break;case 0x6:h[bn(0x271)]=i[bn(0x305)];break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;case 0x172:h['lineWeight']=parseInt(i['value'],0xa);break;case 0x1a4:h['trueColor']=parseInt(i['value'],0xa);break;}d++;}f['set'](h[bn(0x2d4)],h);}else d++;}return d;}function je(c,d,f){const bo=aU;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']===bo(0x2d0))return d+0x1;if(g['code']===0x0&&g['value']==='LTYPE'){d++;const h={'name':'','description':'','pattern':[],'totalLength':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h[bo(0x2d4)]=i['value'];break;case 0x3:h['description']=i[bo(0x305)];break;case 0x28:h['totalLength']=parseFloat(i['value']);break;case 0x31:h['pattern']['push'](parseFloat(i['value']));break;}d++;}h[bo(0x2d4)]&&f['set'](h['name'],h);}else d++;}return d;}function qe(c,d,f){const bp=aU;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='STYLE'){d++;const h={'name':'','fontName':'','bigFontName':'','height':0x0,'widthFactor':0x1,'obliqueAngle':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x3:h['fontName']=i[bp(0x305)];break;case 0x4:h['bigFontName']=i['value'];break;case 0x28:h['height']=parseFloat(i[bp(0x305)]);break;case 0x29:h[bp(0x309)]=parseFloat(i['value']);break;case 0x32:h['obliqueAngle']=parseFloat(i['value']);break;}d++;}h['name']&&f[bp(0x22e)](h['name'],h);}else d++;}return d;}function P(c){const bq=aU,d={'type':'','layer':'0','color':0x100,'lineType':'BYLAYER','lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f['code']){case 0x5:d['handle']=f['value'];break;case 0x8:d[bq(0x315)]=f['value'];break;case 0x6:d['lineType']=f[bq(0x305)];break;case 0x30:d['lineTypeScale']=parseFloat(f['value']);break;case 0x3c:d['visible']=f['value']==='0'||f['value']==='';break;case 0x3e:d['color']=parseInt(f['value'],0xa);break;case 0x172:d[bq(0x2a1)]=parseInt(f['value'],0xa);break;case 0x1a4:d['trueColor']=parseInt(f[bq(0x305)],0xa);break;case 0xd2:d[bq(0x2d3)]['x']=parseFloat(f[bq(0x305)]);break;case 0xdc:d['extrusion']['y']=parseFloat(f['value']);break;case 0xe6:d['extrusion']['z']=parseFloat(f['value']);break;}return d;}function He(c){const br=aU,d={...P(c),'type':'LINE','start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['start']['x']=parseFloat(f['value']);break;case 0x14:d['start']['y']=parseFloat(f['value']);break;case 0x1e:d[br(0x311)]['z']=parseFloat(f['value']);break;case 0xb:d['end']['x']=parseFloat(f['value']);break;case 0x15:d['end']['y']=parseFloat(f['value']);break;case 0x1f:d['end']['z']=parseFloat(f['value']);break;}return d;}function b(c,d){c=c-0x1e4;const e=a();let f=e[c];return f;}function Ve(c){const bs=aU,d={...P(c),'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f[bs(0x305)]);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;}return d;}function Ue(c){const bu=aU,d={...P(c),'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d[bu(0x228)]['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f['value']);break;case 0x32:d[bu(0x340)]=parseFloat(f['value']);break;case 0x33:d[bu(0x304)]=parseFloat(f[bu(0x305)]);break;}return d;}function Ge(c){const bv=aU,d={...P(c),'type':'LWPOLYLINE','vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0};let f=null;for(const g of c)switch(g['code']){case 0x46:d['closed']=(parseInt(g[bv(0x305)],0xa)&0x1)!==0x0;break;case 0x26:d['elevation']=parseFloat(g['value']);break;case 0x2b:d['constantWidth']=parseFloat(g['value']);break;case 0xa:f&&d[bv(0x2d8)]['push'](f),f={'x':parseFloat(g['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:f&&(f['y']=parseFloat(g['value']));break;case 0x28:f&&(f['startWidth']=parseFloat(g['value']));break;case 0x29:f&&(f['endWidth']=parseFloat(g['value']));break;case 0x2a:f&&(f['bulge']=parseFloat(g['value']));break;}return f&&d['vertices'][bv(0x2f7)](f),d;}function Ze(c){const bw=aU,d={...P(c),'type':'POLYLINE','vertices':[],'closed':!0x1,'is3d':!0x1};for(const f of c)switch(f['code']){case 0x46:{const g=parseInt(f['value'],0xa);d['closed']=(g&0x1)!==0x0,d[bw(0x24c)]=(g&0x8)!==0x0;break;}}return d;}function Ke(c){const bx=aU,d={...P(c),'type':'ELLIPSE','center':{'x':0x0,'y':0x0,'z':0x0},'majorAxis':{'x':0x1,'y':0x0,'z':0x0},'minorRatio':0x1,'startParam':0x0,'endParam':Math['PI']*0x2};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f[bx(0x305)]);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0xb:d['majorAxis']['x']=parseFloat(f['value']);break;case 0x15:d['majorAxis']['y']=parseFloat(f['value']);break;case 0x1f:d['majorAxis']['z']=parseFloat(f[bx(0x305)]);break;case 0x28:d['minorRatio']=parseFloat(f['value']);break;case 0x29:d['startParam']=parseFloat(f['value']);break;case 0x2a:d[bx(0x2cd)]=parseFloat(f['value']);break;}return d;}function Qe(c){const by=aU,d={...P(c),'type':by(0x327),'degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]};let f=null,g=null;for(const h of c)switch(h['code']){case 0x46:d['flags']=parseInt(h['value'],0xa);break;case 0x47:d[by(0x28b)]=parseInt(h['value'],0xa);break;case 0x28:d['knots']['push'](parseFloat(h[by(0x305)]));break;case 0x29:d[by(0x2f3)][by(0x2f7)](parseFloat(h['value']));break;case 0xa:f&&d['controlPoints']['push'](f),f={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x14:f&&(f['y']=parseFloat(h['value']));break;case 0x1e:f&&(f['z']=parseFloat(h['value']));break;case 0xb:g&&d['fitPoints']['push'](g),g={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x15:g&&(g['y']=parseFloat(h['value']));break;case 0x1f:g&&(g['z']=parseFloat(h['value']));break;case 0xc:d['startTangent']||(d['startTangent']={'x':0x0,'y':0x0,'z':0x0}),d['startTangent']['x']=parseFloat(h['value']);break;case 0x16:d['startTangent']&&(d['startTangent']['y']=parseFloat(h['value']));break;case 0x20:d['startTangent']&&(d['startTangent']['z']=parseFloat(h['value']));break;case 0xd:d['endTangent']||(d['endTangent']={'x':0x0,'y':0x0,'z':0x0}),d['endTangent']['x']=parseFloat(h['value']);break;case 0x17:d[by(0x1ff)]&&(d['endTangent']['y']=parseFloat(h['value']));break;case 0x21:d['endTangent']&&(d['endTangent']['z']=parseFloat(h['value']));break;}return f&&d[by(0x1f1)]['push'](f),g&&d['fitPoints']['push'](g),d;}function Je(c){const bz=aU,d={...P(c),'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':'STANDARD','hAlign':0x0,'vAlign':0x0,'generationFlags':0x0};for(const f of c)switch(f['code']){case 0x1:d['text']=f['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0xb:d['alignmentPoint']||(d[bz(0x1e5)]={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['x']=parseFloat(f['value']);break;case 0x15:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['y']=parseFloat(f['value']);break;case 0x1f:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['z']=parseFloat(f['value']);break;case 0x28:d['height']=parseFloat(f['value']);break;case 0x29:d[bz(0x309)]=parseFloat(f['value']);break;case 0x32:d[bz(0x2e4)]=parseFloat(f['value']);break;case 0x33:d['obliqueAngle']=parseFloat(f[bz(0x305)]);break;case 0x7:d[bz(0x21e)]=f[bz(0x305)];break;case 0x47:d['generationFlags']=parseInt(f['value'],0xa);break;case 0x48:d[bz(0x256)]=parseInt(f['value'],0xa);break;case 0x49:d[bz(0x329)]=parseInt(f['value'],0xa);break;}return d;}function et(c){const bA=aU,d={...P(c),'type':'MTEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'width':0x0,'attachmentPoint':0x1,'drawingDirection':0x1,'rotation':0x0,'lineSpacingStyle':0x1,'lineSpacingFactor':0x1,'style':'STANDARD','bgFill':0x0,'bgFillScale':1.5},f=[];for(const g of c)switch(g[bA(0x2df)]){case 0x1:f['push'](g['value']);break;case 0x3:f[bA(0x2f7)](g[bA(0x305)]);break;case 0x7:d['style']=g['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(g['value']);break;case 0xb:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['x']=parseFloat(g['value']);break;case 0x15:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['y']=parseFloat(g['value']);break;case 0x1f:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['z']=parseFloat(g[bA(0x305)]);break;case 0x28:d['height']=parseFloat(g['value']);break;case 0x29:d['width']=parseFloat(g[bA(0x305)]);break;case 0x2c:d['lineSpacingFactor']=parseFloat(g['value']);break;case 0x32:d['rotation']=parseFloat(g['value']);break;case 0x47:d[bA(0x23f)]=parseInt(g['value'],0xa);break;case 0x48:d['drawingDirection']=parseInt(g['value'],0xa);break;case 0x49:d['lineSpacingStyle']=parseInt(g['value'],0xa);break;case 0x5a:d['bgFill']=parseInt(g['value'],0xa);break;}return d['text']=f['join'](''),d;}function tt(c){const bB=aU,d={...P(c),'type':'INSERT','blockName':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'scaleX':0x1,'scaleY':0x1,'scaleZ':0x1,'rotation':0x0,'columnCount':0x1,'rowCount':0x1,'columnSpacing':0x0,'rowSpacing':0x0,'attribs':[]};for(const f of c)switch(f['code']){case 0x2:d['blockName']=f['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(f[bB(0x305)]);break;case 0x1e:d[bB(0x330)]['z']=parseFloat(f['value']);break;case 0x29:d['scaleX']=parseFloat(f['value']);break;case 0x2a:d[bB(0x30d)]=parseFloat(f['value']);break;case 0x2b:d['scaleZ']=parseFloat(f['value']);break;case 0x2c:d['columnSpacing']=parseFloat(f['value']);break;case 0x2d:d['rowSpacing']=parseFloat(f[bB(0x305)]);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x46:d[bB(0x2b2)]=parseInt(f['value'],0xa)||0x1;break;case 0x47:d[bB(0x2e8)]=parseInt(f['value'],0xa)||0x1;break;}return d;}function at(c){const bC=aU,d={...P(c),'type':'DIMENSION','blockName':'','dimStyle':'STANDARD','dimType':0x0,'defPoint':{'x':0x0,'y':0x0,'z':0x0},'textMidpoint':{'x':0x0,'y':0x0,'z':0x0},'textOverride':'','rotation':0x0,'textRotation':0x0,'leaderLength':0x0};for(const f of c)switch(f['code']){case 0x1:d[bC(0x237)]=f['value'];break;case 0x2:d['blockName']=f['value'];break;case 0x3:d['dimStyle']=f['value'];break;case 0xa:d['defPoint']['x']=parseFloat(f[bC(0x305)]);break;case 0x14:d['defPoint']['y']=parseFloat(f['value']);break;case 0x1e:d['defPoint']['z']=parseFloat(f['value']);break;case 0xb:d['textMidpoint']['x']=parseFloat(f['value']);break;case 0x15:d['textMidpoint']['y']=parseFloat(f['value']);break;case 0x1f:d['textMidpoint']['z']=parseFloat(f['value']);break;case 0xd:d[bC(0x291)]||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['x']=parseFloat(f['value']);break;case 0x17:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['y']=parseFloat(f['value']);break;case 0x21:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['z']=parseFloat(f['value']);break;case 0xe:d[bC(0x278)]||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['x']=parseFloat(f[bC(0x305)]);break;case 0x18:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d[bC(0x278)]['y']=parseFloat(f[bC(0x305)]);break;case 0x22:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d[bC(0x278)]['z']=parseFloat(f['value']);break;case 0xf:d['defPoint4']||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['x']=parseFloat(f['value']);break;case 0x19:d[bC(0x2ac)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['y']=parseFloat(f['value']);break;case 0x23:d[bC(0x2ac)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['z']=parseFloat(f['value']);break;case 0x10:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['x']=parseFloat(f['value']);break;case 0x1a:d['defPoint5']||(d[bC(0x238)]={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['y']=parseFloat(f['value']);break;case 0x24:d[bC(0x238)]||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d[bC(0x238)]['z']=parseFloat(f['value']);break;case 0x28:d[bC(0x1f2)]=parseFloat(f['value']);break;case 0x32:d[bC(0x2e4)]=parseFloat(f['value']);break;case 0x35:d['textRotation']=parseFloat(f['value']);break;case 0x46:d['dimType']=parseInt(f['value'],0xa);break;}return d;}function nt(c){const bD=aU,d={...P(c),'type':bD(0x1fa),'patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]};let f=0x0;for(;f<c['length'];){const g=c[f];switch(g['code']){case 0x2:d['patternName']=g['value'];break;case 0x29:d['patternScale']=parseFloat(g[bD(0x305)]);break;case 0x34:d['patternAngle']=parseFloat(g['value']);break;case 0x46:d['solidFill']=g['value']==='1';break;case 0x47:d['associative']=g[bD(0x305)]==='1';break;case 0x4b:d['hatchStyle']=parseInt(g['value'],0xa);break;case 0x4c:d[bD(0x1f0)]=parseInt(g['value'],0xa);break;case 0x5b:{const h=parseInt(g['value'],0xa);f++;for(let k=0x0;k<h&&f<c['length'];k++){const l=rt(c,f);d[bD(0x306)]['push'](l['path']),f=l['nextIndex'];}continue;}}f++;}return d;}function rt(c,d){let f=0x0;return d<c['length']&&c[d]['code']===0x5c&&(f=parseInt(c[d]['value'],0xa),d++),(f&0x2)!==0x0?st(c,d,f):ot(c,d,f);}function st(c,d,f){const bE=aU,g={'type':bE(0x31c),'vertices':[],'bulges':[],'flags':f};let h=!0x1;d<c['length']&&c[d]['code']===0x48&&(h=c[d]['value']==='1',d++),d<c['length']&&c[d]['code']===0x49&&(g['isClosed']=c[d]['value']==='1',d++);let k=0x0;d<c[bE(0x2c0)]&&c[d]['code']===0x5d&&(k=parseInt(c[d][bE(0x305)],0xa),d++);for(let l=0x0;l<k&&d<c['length'];l++){const m={'x':0x0,'y':0x0};c[d]['code']===0xa&&(m['x']=parseFloat(c[d][bE(0x305)]),d++),d<c['length']&&c[d][bE(0x2df)]===0x14&&(m['y']=parseFloat(c[d]['value']),d++),g['vertices']['push'](m),h&&d<c['length']&&c[d]['code']===0x2a?(g[bE(0x2d1)][bE(0x2f7)](parseFloat(c[d]['value'])),d++):h&&g[bE(0x2d1)]['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d]['code']===0x14a);)if(c[d]['code']===0x61){const p=parseInt(c[d]['value'],0xa);d++;for(let u=0x0;u<p&&d<c['length']&&c[d][bE(0x2df)]===0x14a;u++)d++;}else d++;return{'path':g,'nextIndex':d};}function ot(g,k,m){const bF=aU,p={'type':'edges','edges':[],'flags':m};let v=0x0;k<g['length']&&g[k][bF(0x2df)]===0x5d&&(v=parseInt(g[k]['value'],0xa),k++);for(let w=0x0;w<v&&k<g['length']&&g[k]['code']===0x48;w++){const x=parseInt(g[k]['value'],0xa);switch(k++,x){case 0x1:{const z={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};k<g['length']&&g[k][bF(0x2df)]===0xa&&(z['start']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(z['start']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bF(0x2df)]===0xb&&(z['end']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(z[bF(0x28a)]['y']=parseFloat(g[k]['value']),k++),p['edges'][bF(0x2f7)](z);break;}case 0x2:{const A={'type':'arc','center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};k<g['length']&&g[k][bF(0x2df)]===0xa&&(A['center']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(A['center']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x28&&(A['radius']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x32&&(A[bF(0x340)]=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bF(0x2df)]===0x33&&(A[bF(0x304)]=parseFloat(g[k][bF(0x305)]),k++),k<g['length']&&g[k][bF(0x2df)]===0x49&&(A[bF(0x343)]=g[k]['value']==='1',k++),p['edges']['push'](A);break;}case 0x3:{const C={'type':'ellipse','center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(C['center']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(C['center']['y']=parseFloat(g[k]['value']),k++),k<g[bF(0x2c0)]&&g[k]['code']===0xb&&(C[bF(0x212)]['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bF(0x2df)]===0x15&&(C[bF(0x212)]['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x28&&(C['minorRatio']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bF(0x2df)]===0x32&&(C['startAngle']=parseFloat(g[k][bF(0x305)]),k++),k<g[bF(0x2c0)]&&g[k]['code']===0x33&&(C['endAngle']=parseFloat(g[k][bF(0x305)]),k++),k<g['length']&&g[k]['code']===0x49&&(C['ccw']=g[k]['value']==='1',k++),p['edges'][bF(0x2f7)](C);break;}case 0x4:{let D=0x3;const F=[],I=[];k<g['length']&&g[k][bF(0x2df)]===0x5e&&(D=parseInt(g[k]['value'],0xa),k++),k<g['length']&&g[k]['code']===0x49&&k++,k<g['length']&&g[k][bF(0x2df)]===0x4a&&k++;let L=0x0;k<g[bF(0x2c0)]&&g[k]['code']===0x5f&&(L=parseInt(g[k]['value'],0xa),k++);let M=0x0;k<g['length']&&g[k]['code']===0x60&&(M=parseInt(g[k][bF(0x305)],0xa),k++);for(let N=0x0;N<L&&k<g['length']&&g[k]['code']===0x28;N++)F['push'](parseFloat(g[k]['value'])),k++;for(let V=0x0;V<M&&k<g[bF(0x2c0)];V++){const X={'x':0x0,'y':0x0};g[k]['code']===0xa&&(X['x']=parseFloat(g[k][bF(0x305)]),k++),k<g['length']&&g[k][bF(0x2df)]===0x14&&(X['y']=parseFloat(g[k]['value']),k++),I['push'](X);}p[bF(0x250)]['push']({'type':'spline','degree':D,'knots':F,'controlPoints':I});break;}}}for(;k<g['length']&&(g[k]['code']===0x61||g[k][bF(0x2df)]===0x14a);)if(g[k]['code']===0x61){const Y=parseInt(g[k]['value'],0xa);k++;for(let a0=0x0;a0<Y&&k<g['length']&&g[k]['code']===0x14a;a0++)k++;}else k++;return{'path':p,'nextIndex':k};}function it(c){const bG=aU,d={...P(c),'type':'POINT','position':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f[bG(0x2df)]){case 0xa:d['position']['x']=parseFloat(f['value']);break;case 0x14:d['position']['y']=parseFloat(f[bG(0x305)]);break;case 0x1e:d['position']['z']=parseFloat(f[bG(0x305)]);break;}return d;}function we(c,d,f){const bH=aU;for(;d<c['length'];){const g=c[d];if(g['code']!==0x0){d++;continue;}const h=g['value'];if(h==='ENDSEC'||h==='ENDBLK')return d+0x1;d++;const k=[];for(;d<c['length']&&c[d][bH(0x2df)]!==0x0;)k['push'](c[d]),d++;switch(h){case'LINE':f['push'](He(k));break;case bH(0x28c):f['push'](Ve(k));break;case'ARC':f['push'](Ue(k));break;case bH(0x269):f['push'](Ge(k));break;case'ELLIPSE':f['push'](Ke(k));break;case'SPLINE':f['push'](Qe(k));break;case'TEXT':f['push'](Je(k));break;case'MTEXT':f['push'](et(k));break;case'INSERT':{const l=tt(k);k['some'](m=>m['code']===0x42&&m[bH(0x305)]==='1')&&(d=ct(c,d,l['attribs'])),f[bH(0x2f7)](l);break;}case'DIMENSION':f['push'](at(k));break;case'HATCH':f[bH(0x2f7)](nt(k));break;case bH(0x32e):f['push'](it(k));break;case'POLYLINE':{const m=Ze(k);d=lt(c,d,m['vertices']),f['push'](m);break;}}}return d;}function lt(c,d,f){const bI=aU;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g===bI(0x290)||g==='ENDBLK')return d;if(g==='VERTEX'){d++;const h={'x':0x0,'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0xa:h['x']=parseFloat(i['value']);break;case 0x14:h['y']=parseFloat(i['value']);break;case 0x2a:h['bulge']=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i['value']);break;case 0x29:h['endWidth']=parseFloat(i['value']);break;}d++;}f['push'](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ct(c,d,f){const bJ=aU;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g===bJ(0x290)||g==='ENDBLK')return d;if(g==='ATTRIB'){d++;const h={'tag':'','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'style':'STANDARD','layer':'0','color':0x100};for(;d<c['length']&&c[d][bJ(0x2df)]!==0x0;){const i=c[d];switch(i['code']){case 0x1:h['text']=i['value'];break;case 0x2:h[bJ(0x20e)]=i['value'];break;case 0x7:h[bJ(0x21e)]=i['value'];break;case 0x8:h['layer']=i[bJ(0x305)];break;case 0xa:h['insertionPoint']['x']=parseFloat(i['value']);break;case 0x14:h['insertionPoint']['y']=parseFloat(i['value']);break;case 0x1e:h[bJ(0x330)]['z']=parseFloat(i[bJ(0x305)]);break;case 0x28:h[bJ(0x301)]=parseFloat(i['value']);break;case 0x32:h[bJ(0x2e4)]=parseFloat(i['value']);break;case 0x3e:h[bJ(0x300)]=parseInt(i['value'],0xa);break;}d++;}f['push'](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ht(c,d,f){const bK=aU;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g['value']==='BLOCK'){d++;const h={'name':'','basePoint':{'x':0x0,'y':0x0,'z':0x0},'entities':[],'flags':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x8:break;case 0xa:h['basePoint']['x']=parseFloat(i['value']);break;case 0x14:h['basePoint']['y']=parseFloat(i['value']);break;case 0x1e:h['basePoint']['z']=parseFloat(i['value']);break;case 0x46:h[bK(0x22b)]=parseInt(i[bK(0x305)],0xa);break;}d++;}d=we(c,d,h['entities']),h['name']&&!h['name']['startsWith']('*Model_Space')&&!h[bK(0x2d4)]['startsWith']('*Paper_Space')&&f['set'](h['name'],h);}else d++;}return d;}var pe=aU(0x2c6),ut={'ANSI_874':'windows-874','ANSI_932':'shift_jis','ANSI_936':'gbk','ANSI_949':'euc-kr','ANSI_950':'big5','ANSI_1250':'windows-1250','ANSI_1251':'windows-1251','ANSI_1252':'windows-1252','ANSI_1253':'windows-1253','ANSI_1254':'windows-1254','ANSI_1255':'windows-1255','ANSI_1256':'windows-1256','ANSI_1257':'windows-1257','ANSI_1258':aU(0x25e)},dt='AC1021';function ft(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function be(c){return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String['fromCodePoint'](parseInt(f,0x10)));}function pt(d){const bL=aU;if(typeof d=='string')return be(d);const f=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](f['slice'](0x0,pe[bL(0x2c0)]))===pe)throw new T('Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.');let g=new TextDecoder('utf-8')['decode'](d);const h=g[bL(0x1ea)](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/)?.[0x1]??'';if(h&&h<dt){const i=g[bL(0x1ea)](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/)?.[0x1]??'',k=ut[i]??'windows-1252';k!==bL(0x2fd)&&(g=new TextDecoder(k)['decode'](d));}return be(g);}function bt(c,d){const bM=aU;for(;d<c[bM(0x2c0)];){if(c[d]['code']===0x0&&c[d]['value']==='ENDSEC')return d+0x1;d++;}return d;}function mt(c){c['layers']['has']('0')||c['layers']['set']('0',{'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1});}function gt(c){const bN=aU;for(const [,d]of c[bN(0x2c1)])d[bN(0x26c)]=d['color']<0x0,d['isOff']&&(d['color']=Math['abs'](d[bN(0x300)])),d[bN(0x2a0)]=(d['flags']&0x1)!==0x0,d['isLocked']=(d['flags']&0x4)!==0x0;}var T=class extends Error{constructor(c,d){super(c),this['cause']=d,this['name']='DxfParseError';}};function ae(c){const bO=aU;if(typeof c=='string'){if(c['length']===0x0)throw new T('Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.');}else{if(c instanceof ArrayBuffer){if(c['byteLength']===0x0)throw new T('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new T('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=pt(c);}catch(h){throw h instanceof T?h:new T('Failed\x20to\x20decode\x20DXF\x20input.',h);}let f;try{f=Re(d);}catch(k){throw new T('Failed\x20to\x20tokenize\x20DXF\x20content.',k);}if(f[bO(0x2c0)]===0x0)throw new T('DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.');const g={'header':ft(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let l=0x0;for(;l<f['length'];){const m=f[l];if(m['code']===0x0&&m['value']==='SECTION'){if(l++,l>=f['length'])break;const o=f[l][bO(0x305)];switch(l++,o){case bO(0x25f):l=Oe(f,l,g['header']);break;case bO(0x303):l=_e(f,l,g);break;case'BLOCKS':l=ht(f,l,g['blocks']);break;case'ENTITIES':l=we(f,l,g['entities']);break;default:l=bt(f,l);break;}}else{if(m['code']===0x0&&m['value']==='EOF')break;l++;}}}catch(p){throw new T('Failed\x20to\x20parse\x20DXF\x20sections.',p);}return mt(g),gt(g),g;}var vt=['#000000','#FF0000',aU(0x30f),'#00FF00','#00FFFF','#0000FF','#FF00FF',aU(0x245),'#808080','#C0C0C0','#FF0000','#FF7F7F','#A50000',aU(0x27c),'#7F0000','#7F3F3F',aU(0x286),'#4C2626','#260000',aU(0x1f4),'#FF3F00',aU(0x2c2),'#A52900','#A56752','#7F1F00',aU(0x302),aU(0x2eb),'#4C2F26',aU(0x299),'#261713','#FF7F00',aU(0x20a),aU(0x2cb),'#A57C52','#7F3F00','#7F5F3F',aU(0x2c5),aU(0x29c),aU(0x30c),'#261C13','#FFBF00','#FFDF7F','#A57C00',aU(0x272),aU(0x270),aU(0x2bb),'#4C3900','#4C4226','#261C00','#262113',aU(0x30f),'#FFFF7F','#A5A500','#A5A552','#7F7F00','#7F7F3F','#4C4C00',aU(0x2f0),'#262600','#262613',aU(0x295),'#DFFF7F','#7CA500',aU(0x1fe),aU(0x2ef),'#6F7F3F','#394C00',aU(0x292),'#1C2600','#212613','#7FFF00','#BFFF7F','#52A500','#7CA552','#3F7F00','#5F7F3F','#264C00','#394C26','#132600',aU(0x2c3),'#3FFF00',aU(0x29d),'#29A500','#67A552','#1F7F00','#4F7F3F','#134C00',aU(0x2f2),aU(0x1ed),'#172613','#00FF00','#7FFF7F','#00A500','#52A552','#007F00','#3F7F3F','#004C00',aU(0x310),'#002600','#132613',aU(0x217),'#7FFF9F','#00A529','#52A567','#007F1F','#3F7F4F','#004C13','#264C2F','#002609','#132617',aU(0x2c7),'#7FFFBF','#00A552','#52A57C',aU(0x24f),'#3F7F5F','#004C26','#264C39','#002613',aU(0x2b0),aU(0x215),aU(0x29a),aU(0x2e1),aU(0x2ee),'#007F5F','#3F7F6F','#004C39','#264C42','#00261C','#132621','#00FFFF','#7FFFFF',aU(0x2ce),'#52A5A5','#007F7F','#3F7F7F','#004C4C','#264C4C','#002626','#132626','#00BFFF','#7FDFFF','#007CA5','#5291A5','#005F7F','#3F6F7F',aU(0x26a),'#26424C',aU(0x251),aU(0x2a4),'#007FFF',aU(0x2d7),'#0052A5','#527CA5',aU(0x32c),'#3F5F7F','#00264C',aU(0x1f7),'#001326','#131C26','#003FFF','#7F9FFF','#0029A5','#5267A5','#001F7F','#3F4F7F','#00134C',aU(0x248),'#000926','#131726','#0000FF','#7F7FFF','#0000A5',aU(0x1e6),'#00007F',aU(0x201),aU(0x274),'#26264C','#000026','#131326','#3F00FF','#9F7FFF','#2900A5',aU(0x338),'#1F007F','#4F3F7F','#13004C','#2F264C',aU(0x287),'#171326','#7F00FF','#BF7FFF','#5200A5',aU(0x23e),'#3F007F','#5F3F7F','#26004C','#39264C',aU(0x2a3),aU(0x2c4),'#BF00FF',aU(0x307),'#7C00A5','#9152A5','#5F007F','#6F3F7F','#39004C','#42264C','#1C0026','#211326',aU(0x25a),aU(0x225),'#A500A5','#A552A5',aU(0x342),aU(0x253),'#4C004C','#4C264C','#260026',aU(0x244),'#FF00BF',aU(0x2a5),'#A5007C','#A55291','#7F005F',aU(0x26d),aU(0x23a),'#4C2642','#26001C','#261321','#FF007F','#FF7FBF',aU(0x2b8),'#A5527C','#7F003F',aU(0x2d5),'#4C0026',aU(0x279),'#260013','#26131C','#FF003F','#FF7F9F',aU(0x262),'#A55267',aU(0x27d),'#7F3F4F','#4C0013',aU(0x1f3),aU(0x252),'#261317','#333333','#505050','#696969','#828282','#BEBEBE','#FFFFFF'];function Ft(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return vt[c];}var E={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':'#00ff88','measureColor':'#ffaa00','gridColor':aU(0x30a),'crosshairColor':'#555555'},'light':{'backgroundColor':'#ffffff','defaultEntityColor':'#000000','selectionColor':'#0066ff','measureColor':aU(0x22d),'gridColor':aU(0x312),'crosshairColor':'#cccccc'}};function W(c,d,f){const bP=aU;return[d*c[bP(0x2fe)]+c['offsetX'],-f*c['scale']+c['offsetY']];}function q(c,d,f){const bQ=aU;return[(d-c[bQ(0x219)])/c[bQ(0x2fe)],-(f-c['offsetY'])/c['scale']];}function me(c,d){const bR=aU,f=window['devicePixelRatio']||0x1;c['setTransform'](d['scale']*f,0x0,0x0,-d[bR(0x2fe)]*f,d['offsetX']*f,d[bR(0x29e)]*f);}function xt(g,k,m,v,w,x,z=0.05){const A=w-m,C=x-v;if(A<=0x0||C<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const D=g/A,F=k/C,I=Math['min'](D,F)*(0x1-z*0x2),L=(m+w)/0x2,M=(v+x)/0x2,N=g/0x2-L*I,V=k/0x2+M*I;return{'scale':I,'offsetX':N,'offsetY':V};}function kt(c,d,f,g,h=0.0001,k=0x186a0){const bS=aU,l=Math['max'](h,Math['min'](k,c['scale']*g)),m=l/c[bS(0x2fe)];return{'scale':l,'offsetX':d-(d-c['offsetX'])*m,'offsetY':f-(f-c['offsetY'])*m};}var yt=class{['transform']={'scale':0x1,'offsetX':0x0,'offsetY':0x0};['minScale'];['maxScale'];constructor(c){const bT=aU;this['minScale']=c[bT(0x208)],this['maxScale']=c['maxZoom'];}['getTransform'](){return this['transform'];}['setTransform'](c){const bU=aU;this[bU(0x29b)]=c;}['pan'](c,d){const bV=aU;this['transform']={...this['transform'],'offsetX':this['transform']['offsetX']+c,'offsetY':this['transform'][bV(0x29e)]+d};}['zoom'](c,d,f){this['transform']=kt(this['transform'],c,d,f,this['minScale'],this['maxScale']);}};function ge(c,d){const bW=aU;return c===0x7?d===bW(0x26e)?'#ffffff':'#000000':Ft(c)??'#ffffff';}function se(d,f,g,h){const bX=aU;if(d[bX(0x29f)]!==void 0x0){const l=d['trueColor']>>0x10&0xff,m=d[bX(0x29f)]>>0x8&0xff,p=d['trueColor']&0xff;return'rgb('+l+','+m+','+p+')';}if(d['color']===0x0)return h??E[g][bX(0x23d)];if(d['color']!==0x100)return ge(d[bX(0x300)],g);const k=f['get'](d['layer']);if(k){if(k['trueColor']!==void 0x0){const v=k['trueColor']>>0x10&0xff,w=k[bX(0x29f)]>>0x8&0xff,x=k['trueColor']&0xff;return bX(0x2d2)+v+','+w+','+x+')';}const u=Math['abs'](k['color']);return ge(u,g);}return E[g]['defaultEntityColor'];}function Pt(c,d){const bY=aU;c['beginPath'](),c['moveTo'](d['start']['x'],d['start']['y']),c[bY(0x2de)](d['end']['x'],d[bY(0x28a)]['y']),c['stroke']();}function wt(c,d){d['radius']<=0x0||(c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d['radius'],0x0,Math['PI']*0x2),c['stroke']());}function It(c,d){const bZ=aU;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['beginPath'](),c[bZ(0x2e0)](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1),c['stroke']();}function Mt(k,w,z,A,C){const D=z-k,I=A-w,L=Math['sqrt'](D*D+I*I);if(L<1e-10)return{'cx':k,'cy':w,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const M=Math['abs'](C)*L/0x2,N=((L/0x2)**0x2+M**0x2)/(0x2*M),V=(k+z)/0x2,X=(w+A)/0x2,Y=-I/L,a0=D/L,a1=N-M,a2=C>0x0?0x1:-0x1,a3=V+a2*a1*Y,a4=X+a2*a1*a0,a5=Math['atan2'](w-a4,k-a3),a6=Math['atan2'](A-a4,z-a3),a7=C<0x0;return{'cx':a3,'cy':a4,'radius':N,'startAngle':a5,'endAngle':a6,'anticlockwise':a7};}function H(c,d,f,g,h,k){const c0=aU,l=Mt(d,f,g,h,k);if(l[c0(0x263)]<1e-10){c['lineTo'](g,h);return;}c[c0(0x2e0)](l['cx'],l['cy'],l['radius'],l[c0(0x340)],l['endAngle'],l['anticlockwise']);}function Tt(c,d){const c1=aU,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),c[c1(0x277)](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f[c1(0x2c0)]];Math[c1(0x2b6)](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}c['stroke']();}function Et(c,d){const c2=aU,f=d[c2(0x2d8)];if(f['length']<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f[c2(0x2c0)]-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}c['stroke']();}function At(c,d){const c3=aU,f=Math['sqrt'](d['majorAxis']['x']**0x2+d[c3(0x212)]['y']**0x2+d['majorAxis']['z']**0x2);if(f<1e-10||d['minorRatio']<=0x0)return;const g=f*d['minorRatio'],h=Math[c3(0x33d)](d[c3(0x212)]['y'],d['majorAxis']['x']);c['beginPath'](),c['ellipse'](d['center']['x'],d['center']['y'],f,g,h,d[c3(0x23c)],d['endParam'],!0x1),c['stroke']();}function St(k,w,x,z,A){const c4=aU,C=w[c4(0x2c0)]-0x1;let D=k;for(;D<C&&x[D+0x1]<=z;)D++;const F=[],I=[];for(let L=0x0;L<=k;L++){const M=D-k+L;F[c4(0x2f7)]({...w[M]}),I['push'](A?A[M]:0x1);}for(let N=0x1;N<=k;N++)for(let V=k;V>=N;V--){const X=D-k+V,Y=x[X+k-N+0x1]-x[X];if(Math['abs'](Y)<1e-10)continue;const a0=(z-x[X])/Y,a1=F[V],a2=F[V-0x1];if(A){const a3=I[V-0x1]*(0x1-a0),a4=I[V]*a0,a5=a3+a4;if(Math[c4(0x2b6)](a5)<1e-10)continue;a1['x']=(a2['x']*a3+a1['x']*a4)/a5,a1['y']=(a2['y']*a3+a1['y']*a4)/a5,a1['z']=(a2['z']*a3+a1['z']*a4)/a5,I[V]=a5;}else a1['x']=(0x1-a0)*a2['x']+a0*a1['x'],a1['y']=(0x1-a0)*a2['y']+a0*a1['y'],a1['z']=(0x1-a0)*a2['z']+a0*a1['z'];}return F[k]??{'x':0x0,'y':0x0,'z':0x0};}function Ct(g){if(g['length']<0x2)return g['map'](v=>({'x':v['x'],'y':v['y']}));const k=[],m=g['length'],p=0xa;for(let v=0x0;v<m-0x1;v++){const w=g[Math['max'](0x0,v-0x1)],x=g[v],z=g[Math['min'](m-0x1,v+0x1)],A=g[Math['min'](m-0x1,v+0x2)];for(let C=0x0;C<=(v===m-0x2?p:p-0x1);C++){const D=C/p,F=D*D,I=F*D,L=0.5*(0x2*x['x']+(-w['x']+z['x'])*D+(0x2*w['x']-0x5*x['x']+0x4*z['x']-A['x'])*F+(-w['x']+0x3*x['x']-0x3*z['x']+A['x'])*I),M=0.5*(0x2*x['y']+(-w['y']+z['y'])*D+(0x2*w['y']-0x5*x['y']+0x4*z['y']-A['y'])*F+(-w['y']+0x3*x['y']-0x3*z['y']+A['y'])*I);k['push']({'x':L,'y':M});}}return k;}function Ie(d,f){const c5=aU;if(d[c5(0x28b)]===0x1)return d['controlPoints']['map'](w=>({'x':w['x'],'y':w['y']}));if(d['controlPoints']['length']===0x0&&d['fitPoints']['length']>=0x2)return Ct(d['fitPoints']);if(d['controlPoints']['length']<d['degree']+0x1)return[];if(d['knots'][c5(0x2c0)]<d['controlPoints']['length']+d['degree']+0x1)return[];const g=[],k=d['knots'][d['degree']],m=d['knots'][d['knots'][c5(0x2c0)]-d['degree']-0x1];if(m<=k)return[];const p=Math['max'](d['controlPoints']['length']*0xa,Math['ceil']((m-k)/f)),u=Math[c5(0x1f9)](p,0x1388),v=d['weights']['length']>0x0?d['weights']:void 0x0;for(let w=0x0;w<=u;w++){const x=k+(m-k)*(w/u),z=St(d['degree'],d['controlPoints'],d['knots'],x,v);g[c5(0x2f7)]({'x':z['x'],'y':z['y']});}return g;}function Dt(c,d,f){const c6=aU,g=Ie(d,f);if(!(g['length']<0x2)){c['beginPath'](),c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g[c6(0x2c0)];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath'](),c[c6(0x2f6)]();}}var Lt={'standard':'Arial,\x20sans-serif','arial':aU(0x206),'arial.ttf':'Arial,\x20sans-serif','romans.shx':'\x22Courier\x20New\x22,\x20monospace','simplex.shx':'\x22Courier\x20New\x22,\x20monospace','txt.shx':'monospace','monotxt.shx':'monospace','isocp.shx':'\x22Courier\x20New\x22,\x20monospace','isocpeur.shx':'\x22Courier\x20New\x22,\x20monospace','times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','gothic.ttf':aU(0x266)};function Me(c){const c7=aU,d=c[c7(0x337)]()['trim']();return Lt[d]||'sans-serif';}function Nt(d,f,g){const c8=aU;if(!f[c8(0x22a)]||f['height']<g*0x4)return;const k=f['hAlign']!==0x0||f['vAlign']!==0x0,l=k&&f['alignmentPoint']?f[c8(0x1e5)]['x']:f['insertionPoint']['x'],m=k&&f['alignmentPoint']?f['alignmentPoint']['y']:f['insertionPoint']['y'];if(d['save'](),d['translate'](l,m),d['scale'](0x1,-0x1),f['rotation']&&d[c8(0x26b)](-f[c8(0x2e4)]*Math['PI']/0xb4),f['widthFactor']!==0x1&&d[c8(0x2fe)](f['widthFactor'],0x1),f['obliqueAngle']){const w=Math['tan'](f['obliqueAngle']*Math['PI']/0xb4);d['transform'](0x1,0x0,w,0x1,0x0,0x0);}const p=(f['generationFlags']&0x2)!==0x0,u=(f['generationFlags']&0x4)!==0x0;p&&d['scale'](-0x1,0x1),u&&d[c8(0x2fe)](0x1,-0x1);const v=Me(f['style']||'Standard');switch(d['font']=f['height']+'px\x20'+v,f['hAlign']){case 0x0:d['textAlign']=c8(0x1fb);break;case 0x1:d['textAlign']='center';break;case 0x2:d['textAlign']='right';break;case 0x3:d['textAlign']='left';break;case 0x4:d['textAlign']='center';break;case 0x5:d['textAlign']='left';break;default:d['textAlign']='left';}switch(f['vAlign']){case 0x0:d['textBaseline']='alphabetic';break;case 0x1:d['textBaseline']='bottom';break;case 0x2:d[c8(0x336)]='middle';break;case 0x3:d['textBaseline']='top';break;default:d[c8(0x336)]=c8(0x2bf);}d['fillText'](f['text'],0x0,0x0),d[c8(0x268)]();}function Bt(c){const c9=aU;return c['replace'](/\\P/g,'\x0a')['replace'](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')['replace'](/\\~/g,'\u00a0')['replace'](/\{/g,'')[c9(0x26f)](/\}/g,'')['replace'](/\\S[^;]*;/g,'')['trim']();}function Xt(g,k,m){const cb=aU;if(!k['text']||k['height']<m*0x4)return;g['save'](),g['translate'](k['insertionPoint']['x'],k[cb(0x330)]['y']),g['scale'](0x1,-0x1);const p=k['textDirection']?Math['atan2'](k['textDirection']['y'],k['textDirection']['x']):(k['rotation']||0x0)*Math['PI']/0xb4;p&&g['rotate'](-p);const r=Bt(k['text'])['split']('\x0a'),v=k['height']*(k['lineSpacingFactor']||1.4),w=Me(k['style']||cb(0x276));g['font']=k['height']+'px\x20'+w;const x=(k['attachmentPoint']-0x1)%0x3,z=Math['floor']((k['attachmentPoint']-0x1)/0x3),A=['left','center',cb(0x246)];g['textAlign']=A[x]??cb(0x1fb);let C=0x0;const D=r['length']*v;switch(z){case 0x0:C=k['height'];break;case 0x1:C=k['height']-D/0x2;break;case 0x2:C=k['height']-D;break;}for(let F=0x0;F<r['length'];F++)g['fillText'](r[F],0x0,C+F*v);g[cb(0x268)]();}var Yt=0x64;function zt(f,g,k,m=0x0){const cc=aU;if(m>Yt)return null;if(k[cc(0x2f8)](f))return k['get'](f);const p=g['blocks']['get'](f);if(!p)return k['set'](f,null),null;k[cc(0x22e)](f,null);let v=0x1/0x0,w=0x1/0x0,x=-0x1/0x0,z=-0x1/0x0,A=!0x1;for(const D of p['entities']){let F;D['type']==='INSERT'?F=Te(D,g,k,m+0x1):F=B(D),F&&(A=!0x0,v=Math['min'](v,F[cc(0x254)]),w=Math['min'](w,F['minY']),x=Math[cc(0x28e)](x,F['maxX']),z=Math['max'](z,F['maxY']));}const C=A?{'minX':v,'minY':w,'maxX':x,'maxY':z}:null;return k['set'](f,C),C;}function Te(a0,a1,a2,a3=0x0){const cd=aU,a4=zt(a0['blockName'],a1,a2,a3);if(!a4)return null;const a5=a1['blocks']['get'](a0['blockName']);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4['minX']-a6,a9=a4['minY']-a7,ab=a4['maxX']-a6,ac=a4[cd(0x324)]-a7;const ad=a0[cd(0x2e9)],af=a0['scaleY'];let ag=a8*ad,ah=ab*ad,ai=a9*af,aj=ac*af;if(ag>ah){const ax=ag;ag=ah,ah=ax;}if(ai>aj){const ay=ai;ai=aj,aj=ay;}const ak=(a0['rotation']||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0[cd(0x330)]['x'],aA=a0['insertionPoint']['y'];let aB=ag+az,aC=ai+aA,aD=ah+az,aE=aj+aA;const aF=Math['max'](0x1,a0['columnCount']),aG=Math[cd(0x28e)](0x1,a0['rowCount']);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0['columnSpacing'],aI=(aG-0x1)*a0[cd(0x2e7)];aB=Math['min'](aB,aB+aH),aD=Math['max'](aD,aD+aH),aC=Math['min'](aC,aC+aI),aE=Math['max'](aE,aE+aI);}return{'minX':aB,'minY':aC,'maxX':aD,'maxY':aE};}const al=Math['cos'](ak),am=Math['sin'](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0['insertionPoint']['x'],ap=a0[cd(0x330)]['y'];let aq=0x1/0x0,ar=0x1/0x0,as=-0x1/0x0,au=-0x1/0x0;for(const aJ of an){const aK=aJ['x']*al-aJ['y']*am+ao,aL=aJ['x']*am+aJ['y']*al+ap;aq=Math['min'](aq,aK),ar=Math['min'](ar,aL),as=Math['max'](as,aK),au=Math['max'](au,aL);}const av=Math['max'](0x1,a0[cd(0x2b2)]),aw=Math['max'](0x1,a0[cd(0x2e8)]);if(av>0x1||aw>0x1){const aM=(av-0x1)*a0['columnSpacing'],aN=(aw-0x1)*a0['rowSpacing'],aO=[{'x':0x0,'y':0x0},{'x':aM,'y':0x0},{'x':aM,'y':aN},{'x':0x0,'y':aN}];for(const aP of aO){const aQ=aP['x']*al-aP['y']*am,aR=aP['x']*am+aP['y']*al;aq=Math[cd(0x1f9)](aq,aq+aQ),ar=Math['min'](ar,ar+aR),as=Math['max'](as,as+aQ),au=Math['max'](au,au+aR);}}return{'minX':aq,'minY':ar,'maxX':as,'maxY':au};}function Rt(d,f){const ce=aU;let g=0x1/0x0,k=0x1/0x0,l=-0x1/0x0,m=-0x1/0x0,p=!0x1;const u=f?new Map():void 0x0;for(const v of d){const w=f&&u?Ee(v,f,u):B(v);w&&(p=!0x0,g=Math['min'](g,w['minX']),k=Math['min'](k,w['minY']),l=Math['max'](l,w['maxX']),m=Math['max'](m,w[ce(0x324)]));}return p?{'minX':g,'minY':k,'maxX':l,'maxY':m}:null;}function Ee(c,d,f){return c['type']==='INSERT'?Te(c,d,f):B(c);}var Q=null;function Ot(c){const cf=aU,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g[cf(0x31e)]['length']);for(let i=0x0;i<g['entities']['length'];i++)h[i]=B(g['entities'][i]);d['set'](f,h);}return d;}function _t(c){Q=c;}function ve(){Q=null;}function Wt(c,d){if(!Q)return;const f=Q['get'](c);if(!(!f||d>=f['length']))return f[d];}function B(c){const cg=aU;switch(c['type']){case'LINE':return{'minX':Math['min'](c['start']['x'],c['end']['x']),'minY':Math[cg(0x1f9)](c['start']['y'],c['end']['y']),'maxX':Math['max'](c['start']['x'],c['end']['x']),'maxY':Math['max'](c['start']['y'],c['end']['y'])};case cg(0x28c):return{'minX':c[cg(0x228)]['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c['center']['y']+c['radius']};case'ARC':return{'minX':c['center']['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c['center']['y']+c[cg(0x263)]};case cg(0x269):case'POLYLINE':{if(c['vertices']['length']===0x0)return null;let d=0x1/0x0,f=0x1/0x0,g=-0x1/0x0,h=-0x1/0x0;for(const k of c['vertices'])d=Math[cg(0x1f9)](d,k['x']),f=Math['min'](f,k['y']),g=Math['max'](g,k['x']),h=Math['max'](h,k['y']);return{'minX':d,'minY':f,'maxX':g,'maxY':h};}case'ELLIPSE':{const l=Math['sqrt'](c[cg(0x212)]['x']**0x2+c['majorAxis']['y']**0x2);return{'minX':c['center']['x']-l,'minY':c['center']['y']-l,'maxX':c['center']['x']+l,'maxY':c['center']['y']+l};}case'TEXT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x']+c['height']*c[cg(0x22a)][cg(0x2c0)]*0.6,'maxY':c['insertionPoint']['y']+c['height']};case'MTEXT':return{'minX':c[cg(0x330)]['x'],'minY':c['insertionPoint']['y']-c['height'],'maxX':c[cg(0x330)]['x']+(c['width']||c['height']*0xa),'maxY':c['insertionPoint']['y']+c['height']};case'SPLINE':{if(c['controlPoints']['length']===0x0)return null;let m=0x1/0x0,p=0x1/0x0,u=-0x1/0x0,v=-0x1/0x0;for(const w of c['controlPoints'])m=Math['min'](m,w['x']),p=Math['min'](p,w['y']),u=Math['max'](u,w['x']),v=Math[cg(0x28e)](v,w['y']);return{'minX':m,'minY':p,'maxX':u,'maxY':v};}case'POINT':return{'minX':c['position']['x'],'minY':c['position']['y'],'maxX':c['position']['x'],'maxY':c['position']['y']};case'INSERT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y'],'maxX':c['insertionPoint']['x'],'maxY':c['insertionPoint']['y']};case'DIMENSION':return c['defPoint']?{'minX':Math['min'](c[cg(0x2f1)]['x'],c['defPoint2']?.['x']??c[cg(0x2f1)]['x'],c[cg(0x278)]?.['x']??c[cg(0x2f1)]['x']),'minY':Math['min'](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y']),'maxX':Math['max'](c['defPoint']['x'],c['defPoint2']?.['x']??c['defPoint']['x'],c['defPoint3']?.['x']??c['defPoint']['x']),'maxY':Math['max'](c['defPoint']['y'],c['defPoint2']?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y'])}:null;case cg(0x1fa):{let x=0x1/0x0,z=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const F of c[cg(0x306)])if(F['vertices']){for(const I of F[cg(0x2d8)])D=!0x0,x=Math['min'](x,I['x']),z=Math[cg(0x1f9)](z,I['y']),A=Math['max'](A,I['x']),C=Math['max'](C,I['y']);}return D?{'minX':x,'minY':z,'maxX':A,'maxY':C}:null;}default:return null;}}var $t=new Set([aU(0x275),'ARC','CIRCLE','LWPOLYLINE','POLYLINE','ELLIPSE','SPLINE']);function Ae(c){return $t['has'](c);}function jt(c,d){c['moveTo'](d['start']['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']);}function qt(c,d){const ch=aU;if(d['radius']<=0x0)return;const f=d[ch(0x340)]*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['moveTo'](d['center']['x']+d['radius']*Math['cos'](f),d['center']['y']+d['radius']*Math['sin'](f)),c['arc'](d['center']['x'],d['center']['y'],d['radius'],f,g,!0x1);}function Ht(c,d){const ci=aU;d['radius']<=0x0||(c['moveTo'](d[ci(0x228)]['x']+d['radius'],d[ci(0x228)]['y']),c[ci(0x2e0)](d[ci(0x228)]['x'],d[ci(0x228)]['y'],d['radius'],0x0,Math['PI']*0x2));}function Vt(c,d){const cj=aU,f=d['vertices'];if(f['length']<0x2)return;c[cj(0x277)](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k[cj(0x313)])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}}function a(){const dK=['extMin','now','destroyed','entityIndex','loadGeneration','lineTo','code','arc','#00A57C','loadedFileSize','first-point','rotation','blobUrl','mouseScreenX','rowSpacing','rowCount','scaleX','updateSize','#4C1300','state','indexOf','#52A591','#5F7F00','#4C4C26','defPoint','#2F4C26','weights','touchmove','workerManager','stroke','push','has','contextmenu','emit','top','lastY','utf-8','scale','fileName','color','height','#7F4F3F','TABLES','endAngle','value','boundaryPaths','#DF7FFF','ARC','widthFactor','#333333','map','#261300','scaleY','lastDoRenderTime','#FFFF00','#264C26','start','#dddddd','bulge','handleSelect','layer','size','debugEnabled','lastX','getEntityBBoxes','second-point','cursor','polyline','747578chAyHc','entities','toFixed','data','closed','pending','pop','maxY','resize','handleTouchStart','SPLINE','getTransform','vAlign','top-left','preventDefault','#003F7F','delete','POINT','visible','insertionPoint','_build','header','measureTool','spatialIndex','bottom','textBaseline','toLowerCase','#6752A5','sqrt','onPointerMove','debugRafId','currentTool','atan2','layerManager','measure','startAngle','idle','#7F007F','ccw','computeViewportBounds','alignmentPoint','#5252A5','Size:\x20','all','addEventListener','match','destroy','visibility','#092600','colorOverrides','DIMENSION','patternType','controlPoints','leaderLength','#4C262F','#261313','search','currentSnap','#26394C','ctx','min','HATCH','left','leaf','onTouchEnd','#91A552','endTangent','emitter','#3F3F7F','position','sin','renderStats','zoomTo','Arial,\x20sans-serif','handlePointerMove','minZoom','Failed\x20to\x20get\x202D\x20rendering\x20context.\x20The\x20canvas\x20may\x20already\x20have\x20a\x20different\x20context\x20type,\x20or\x20canvas\x20rendering\x20is\x20not\x20available\x20in\x20this\x20environment.','#FFBF7F','from','midpoint','maxX','tag','touches','spatialIndexBuildTime','phase','majorAxis','ELLIPSE','reject','#00FFBF','strokeRect','#00FF3F','handlePointerUp','offsetX','getBoundingClientRect','onWheel','doc','getTool','style','debugOptions','handleMouseMove','options','zoomSpeed','extMax','selectedEntityIndex','#FF7FFF','8DPZfhx','onTouchMove','center','clear','text','flags','cos','#ff6600','set','children','parseTime','hypot','View:\x20[','destroyWorker','type','getWorker','reviveDocument','textOverride','defPoint5','formatConverters','#4C0039','37683TYOOnc','startParam','defaultEntityColor','#7C52A5','attachmentPoint','totalLoadTime','viewer','items','requestRender','#261326','#FFFFFF','right','Worker\x20terminated','#262F4C','point','onContextMenu','isClosed','is3d','visibleCache','convert','#007F3F','edges','#001C26','#260009','#7F3F7F','minX','toBBox','hAlign','get','guardDestroyed','403373sKzmzx','#FF00FF','onPointerUp','dxfVersion','canvas','windows-1258','HEADER','\x20KB','compareMinY','#A50029','radius','strokeStyle','font','\x22Century\x20Gothic\x22,\x20sans-serif','\x20/\x20','restore','LWPOLYLINE','#00394C','rotate','isOff','#7F3F6F','dark','replace','#7F5F00','lineType','#A59152','getContext','#00004C','LINE','Standard','moveTo','defPoint3','#4C2639','\x20\x20Calls:\x20','evenodd','#A55252','#7F001F','endpoint','nextId','lineWidth','mouseScreenY','3057605cjKPDR','blocks','message','beginPath','#4C0000','#090026','camera','byType','end','degree','CIRCLE','ellipse','max','entityBBoxes','ENDSEC','defPoint2','#424C26','ensureMap','width','#BFFF00','1242516XAqGno','pan','minY','#260900','#7FFFDF','transform','#4C3926','#9FFF7F','offsetY','trueColor','isFrozen','lineWeight','startPan','#130026','#132126','#FF7FDF','MTEXT','47341HtjVYR','getHeight','done','onDocumentLoaded','renderer','defPoint4','getVisibleLayerNames','identifier','getWidth','#13261C','fillStyle','columnCount','$HANDSEED','viewchange','renderPending','abs','504189bSkCUU','#A50052','button','clearDocument','#7F6F3F','crosshair','432nQUAke','_chooseSplitAxis','alphabetic','length','layers','#FF9F7F','#1C2613','#1C1326','#4C2600','AutoCAD\x20Binary\x20DXF','#00FF7F','getAllLayers','translate','select','#A55200','minorRatio','endParam','#00A5A5','worker','ENDTAB','bulges','rgb(','extrusion','name','#7F3F5F','clientY','#7FBFFF','vertices'];a=function(){return dK;};return a();}function Ut(c,d){const ck=aU,f=d['vertices'];if(f['length']<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d[ck(0x321)]?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}}function Gt(d,f){const cl=aU,g=Math['sqrt'](f['majorAxis']['x']**0x2+f['majorAxis']['y']**0x2+f['majorAxis']['z']**0x2);if(g<1e-10||f[cl(0x2cc)]<=0x0)return;const h=g*f['minorRatio'],k=Math[cl(0x33d)](f['majorAxis']['y'],f['majorAxis']['x']),l=Math['cos'](k),m=Math['sin'](k),p=Math[cl(0x22c)](f['startParam']),u=Math['sin'](f[cl(0x23c)]);d['moveTo'](f['center']['x']+g*l*p-h*m*u,f['center']['y']+g*m*p+h*l*u),d[cl(0x28d)](f[cl(0x228)]['x'],f['center']['y'],g,h,k,f['startParam'],f['endParam'],!0x1);}function Zt(c,d,f){const g=Ie(d,f);if(!(g['length']<0x2)){c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath']();}}function Se(c,d,f){const cm=aU;switch(d['type']){case cm(0x275):jt(c,d);break;case cm(0x308):qt(c,d);break;case'CIRCLE':Ht(c,d);break;case'LWPOLYLINE':Vt(c,d);break;case'POLYLINE':Ut(c,d);break;case'ELLIPSE':Gt(c,d);break;case'SPLINE':Zt(c,d,f);break;}}var Kt=0x64,Qt=0.5;function Ce(k,z,A,I,L,M,N=0x0,X){const cn=aU;if(N>Kt)return;const Y=A['blocks']['get'](z['blockName']);if(!Y)return;const a0=Math['max'](0x1,z['columnCount']),a1=Math[cn(0x28e)](0x1,z[cn(0x2e8)]);for(let a2=0x0;a2<a1;a2++)for(let a3=0x0;a3<a0;a3++){k['save']();const a4=z['insertionPoint']['x']+a3*z['columnSpacing'],a5=z['insertionPoint']['y']+a2*z['rowSpacing'];k[cn(0x2c9)](a4,a5),z['rotation']&&k['rotate'](z['rotation']*Math['PI']/0xb4),k['scale'](z['scaleX'],z[cn(0x30d)]),k['translate'](-Y['basePoint']['x'],-Y['basePoint']['y']);const a6=Math['max'](Math[cn(0x2b6)](z['scaleX']),Math['abs'](z[cn(0x30d)])),a7=M/(a6||0x1);let a8=null;const a9=Y[cn(0x31e)];for(let ab=0x0;ab<a9['length'];ab++){const ac=a9[ab];if(ac[cn(0x234)]!=='INSERT'){const af=Wt(z['blockName'],ab),ag=af!==void 0x0?af:B(ac);if(ag){const ah=Math['max'](ag['maxX']-ag['minX'],ag['maxY']-ag['minY']);if(ah>0x0&&ah/a7<Qt)continue;}}const ad=se(ac,A[cn(0x2c1)],L);ac['type']!=='INSERT'&&Ae(ac['type'])?(ad!==a8&&(a8!==null&&(k['stroke'](),X&&X['drawCalls']++),a8=ad,k['beginPath'](),k['strokeStyle']=ad,k['lineWidth']=a7),Se(k,ac,a7),X&&(X[cn(0x289)][ac['type']]=(X[cn(0x289)][ac['type']]??0x0)+0x1)):(a8!==null&&(k['stroke'](),X&&X['drawCalls']++,a8=null),k[cn(0x264)]=ad,k['fillStyle']=ad,k[cn(0x280)]=a7,ac[cn(0x234)]==='INSERT'?Ce(k,ac,A,I,L,a7,N+0x1,X):J(k,ac,A,I,L,a7,X));}a8!==null&&(k['stroke'](),X&&X['drawCalls']++),k['restore']();}}function Jt(d,f,g,k,l,m,p){const co=aU;if(f['blockName']){const u=g['blocks']['get'](f['blockName']);if(u){for(const v of u['entities']){const w=se(v,g['layers'],l);d['strokeStyle']=w,d['fillStyle']=w,d['lineWidth']=m,J(d,v,g,k,l,m,p);}return;}}f[co(0x291)]&&f['defPoint3']&&(d[co(0x285)](),d['moveTo'](f['defPoint2']['x'],f['defPoint2']['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d['stroke'](),d['beginPath'](),d['moveTo'](f[co(0x278)]['x'],f['defPoint3']['y']),d['lineTo'](f['defPoint']['x'],f[co(0x2f1)]['y']),d['stroke']());}function ea(c,d){const cp=aU;if(d['boundaryPaths']['length']!==0x0){c['beginPath']();for(const f of d['boundaryPaths'])if(f['type']==='polyline'&&f['vertices']&&f['vertices']['length']>0x0){const g=f['vertices'][0x0];c['moveTo'](g['x'],g['y']);for(let h=0x1;h<f['vertices']['length'];h++){const k=f[cp(0x2d8)][h-0x1],l=f['vertices'][h],m=f['bulges']?.[h-0x1]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}f[cp(0x24b)]&&c['closePath']();}else{if(f['type']==='edges'&&f['edges'])for(let p=0x0;p<f['edges']['length'];p++){const u=f['edges'][p];if(u['type']==='line')p===0x0&&c['moveTo'](u['start']['x'],u['start']['y']),c['lineTo'](u['end']['x'],u[cp(0x28a)]['y']);else{if(u[cp(0x234)]===cp(0x2e0)){if(p===0x0){const v=u['center']['x']+u[cp(0x263)]*Math['cos'](u['startAngle']*Math['PI']/0xb4),w=u['center']['y']+u['radius']*Math['sin'](u['startAngle']*Math['PI']/0xb4);c['moveTo'](v,w);}c['arc'](u['center']['x'],u['center']['y'],u['radius'],u['startAngle']*Math['PI']/0xb4,u['endAngle']*Math['PI']/0xb4,!u['ccw']);}}}}d['solidFill']&&(c['globalAlpha']=0.3,c['fill'](cp(0x27b)),c['globalAlpha']=0x1),c['stroke']();}}function ta(c,d,f){const cq=aU,g=f*0x3;c['beginPath'](),c[cq(0x2e0)](d['position']['x'],d[cq(0x202)]['y'],g,0x0,Math['PI']*0x2),c['fill']();}function J(c,d,f,g,h,k,l){const cr=aU;switch(l&&(l['drawCalls']++,l['byType'][d['type']]=(l[cr(0x289)][d['type']]??0x0)+0x1),d['type']){case'LINE':Pt(c,d);break;case'CIRCLE':wt(c,d);break;case'ARC':It(c,d);break;case'LWPOLYLINE':Tt(c,d);break;case'POLYLINE':Et(c,d);break;case cr(0x213):At(c,d);break;case'SPLINE':Dt(c,d,k);break;case'TEXT':Nt(c,d,k);break;case'MTEXT':Xt(c,d,k);break;case'INSERT':Ce(c,d,f,g,h,k,0x0,l);break;case cr(0x1ef):Jt(c,d,f,g,h,k,l);break;case'HATCH':ea(c,d);break;case'POINT':ta(c,d,k);break;}}var aa=0.5,na=class{constructor(c){const cs=aU;this[cs(0x25d)]=c;const d=c['getContext']('2d',{'alpha':!0x1});if(!d)throw new Error(cs(0x209));this['ctx']=d,this['updateSize']();}['ctx'];['width']=0x0;[aU(0x301)]=0x0;['getContext'](){return this['ctx'];}['getWidth'](){return this['width'];}[aU(0x2a8)](){return this['height'];}['updateSize'](){const cu=aU,c=window['devicePixelRatio']||0x1,d=this['canvas']['getBoundingClientRect']();this['width']=d['width'],this['height']=d['height'],this[cu(0x25d)][cu(0x294)]=d['width']*c,this['canvas'][cu(0x301)]=d['height']*c;}['render'](k,v,w,x,z,A,C){const cv=aU,D=this['ctx'],F=window['devicePixelRatio']||0x1,I={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};D['setTransform'](F,0x0,0x0,F,0x0,0x0),D[cv(0x2b1)]=E[w]['backgroundColor'],D['fillRect'](0x0,0x0,this['width'],this['height']),me(D,v);const L=0x1/v['scale'];D['lineCap']='round',D['lineJoin']='round';let M=null;for(let N=0x0;N<k['entities']['length'];N++){const V=k['entities'][N];if(!V['visible']){I['entitiesSkipped']++;continue;}if(!x[cv(0x2f8)](V[cv(0x315)])){I['entitiesSkipped']++;continue;}if(A&&!A['has'](N)){I['entitiesSkipped']++;continue;}if(C){const Y=C[N];if(Y){const a0=(Y['maxX']-Y['minX'])*v['scale'],a1=(Y['maxY']-Y['minY'])*v[cv(0x2fe)];if(Math['max'](a0,a1)<aa){I['entitiesSkipped']++;continue;}}}const X=se(V,k['layers'],w);Ae(V[cv(0x234)])?(X!==M&&(M!==null&&(D['stroke'](),I['drawCalls']++),M=X,D['beginPath'](),D['strokeStyle']=X,D['lineWidth']=L),Se(D,V,L),I['entitiesDrawn']++,I[cv(0x289)][V['type']]=(I[cv(0x289)][V['type']]??0x0)+0x1):(M!==null&&(D['stroke'](),I['drawCalls']++,M=null),D['strokeStyle']=X,D['fillStyle']=X,D[cv(0x280)]=L,I['entitiesDrawn']++,J(D,V,k,v,w,L,I));}if(M!==null&&(D['stroke'](),I['drawCalls']++),z>=0x0&&z<k['entities']['length']){const a2=k['entities'][z];me(D,v),D['strokeStyle']=E[w]['selectionColor'],D['fillStyle']=E[w]['selectionColor'],D[cv(0x280)]=L*0x3,J(D,a2,k,v,w,L);}return I;}['renderEmpty'](c){const cw=aU,d=this[cw(0x1f8)],f=window['devicePixelRatio']||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=E[c]['backgroundColor'],d['fillRect'](0x0,0x0,this['width'],this['height']);}['destroy'](){}},ra={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':'top-left'};function ne(c){return{...ra,...c};}function sa(c){const cx=aU;return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+cx(0x260):(c/(0x400*0x400))['toFixed'](0x1)+'\x20MB';}function oa(c){return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)['toFixed'](0x1);}var ia='11px\x20monospace',Fe=0xf,xe=0x8,Z=0x8,S=0xa;function la(k,v,w,x,z,A){const cy=aU;k['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=[];if(x['showFps']&&C['push'](['FPS:\x20'+v['fps']+'\x20\x20Frame:\x20'+v['frameTime']['toFixed'](0x1)+'ms']),x['showRenderStats']){const Y=v['renderStats']['entitiesDrawn']+v['renderStats']['entitiesSkipped'],a0=['Drawn:\x20'+v['renderStats']['entitiesDrawn']+cy(0x267)+Y+cy(0x27a)+v['renderStats']['drawCalls']],a1=Object['entries'](v[cy(0x204)][cy(0x289)])['sort'](([,a2],[,a3])=>a3-a2)['slice'](0x0,0x6)[cy(0x30b)](([a2,a3])=>a2+':\x20'+a3)['join']('\x20\x20');a1&&a0['push'](a1),C['push'](a0);}if(x['showDocumentInfo']){const a2=['Layers:\x20'+v['visibleLayerCount']+'\x20/\x20'+v['layerCount']+'\x20\x20Blocks:\x20'+v['blockCount']];v[cy(0x25c)]&&a2[cy(0x2f7)]('DXF:\x20'+v[cy(0x25c)]),v[cy(0x2ff)]&&a2['push']('File:\x20'+v['fileName']),v['fileSize']>0x0&&a2['push'](cy(0x1e7)+sa(v['fileSize'])),C['push'](a2);}if(x['showTimings']){const a3=[];v['parseTime']>0x0&&a3[cy(0x2f7)]('Parse:\x20'+v['parseTime']['toFixed'](0x0)+'ms'),v['spatialIndexBuildTime']>0x0&&a3['push']('Index:\x20'+v['spatialIndexBuildTime']['toFixed'](0x0)+'ms'),v[cy(0x240)]>0x0&&a3['push']('Load:\x20'+v[cy(0x240)][cy(0x31f)](0x0)+'ms'),a3['length']>0x0&&C['push']([a3['join']('\x20\x20')]);}if(x['showCamera']){const a4=v['viewportBounds'];C['push'](['Zoom:\x20'+oa(v['zoom'])+'\x20\x20Pixel:\x20'+v['pixelSize']['toFixed'](0x2),cy(0x232)+a4['minX']['toFixed'](0x0)+',\x20'+a4['minY']['toFixed'](0x0)+']\x20→\x20['+a4['maxX']['toFixed'](0x0)+',\x20'+a4['maxY']['toFixed'](0x0)+']']);}if(C['length']===0x0)return;k[cy(0x265)]=ia;const D=[];for(let a5=0x0;a5<C['length'];a5++){a5>0x0&&D['push']({'text':'','isSeparator':!0x0});for(const a6 of C[a5])D['push']({'text':a6,'isSeparator':!0x1});}let F=0x0;for(const a7 of D)if(!a7['isSeparator']){const a8=k['measureText'](a7[cy(0x22a)])['width'];a8>F&&(F=a8);}const I=F+Z*0x2;let L=Z*0x2;for(const a9 of D)L+=a9['isSeparator']?xe:Fe;let M,N;switch(x[cy(0x202)]){case cy(0x32a):M=S,N=S;break;case'top-right':M=z-I-S,N=S;break;case'bottom-left':M=S,N=A-L-S;break;case'bottom-right':M=z-I-S,N=A-L-S;break;}const V=E[w];k['fillStyle']=w===cy(0x26e)?'rgba(0,\x200,\x200,\x200.75)':'rgba(255,\x20255,\x20255,\x200.85)',k['fillRect'](M,N,I,L),k[cy(0x264)]=w==='dark'?'rgba(255,\x20255,\x20255,\x200.15)':'rgba(0,\x200,\x200,\x200.15)',k['lineWidth']=0x1,k[cy(0x216)](M+0.5,N+0.5,I-0x1,L-0x1),k['fillStyle']=w===cy(0x26e)?V['defaultEntityColor']:'rgba(0,\x200,\x200,\x200.85)',k['textAlign']='left',k['textBaseline']=cy(0x2fb);let X=N+Z;for(const ab of D)ab['isSeparator']?X+=xe:(k['fillText'](ab['text'],M+Z,X),X+=Fe);}var ca=class{['layers']=new Map();[aU(0x1ec)]=new Map();['colorOverrides']=new Map();['visibleCache']=null;['setLayers'](c){const cz=aU;this['layers']=new Map(c),this['visibility'][cz(0x229)](),this['colorOverrides'][cz(0x229)](),this['visibleCache']=null;for(const [d,f]of this['layers'])this['visibility']['set'](d,!f['isOff']&&!f['isFrozen']);}[aU(0x2c8)](){const cA=aU;return Array[cA(0x20b)](this['layers']['values']());}['setVisible'](c,d){const cB=aU;this['visibility']['set'](c,d),this[cB(0x24d)]=null;}['isVisible'](c){return this['visibility']['get'](c)??!0x0;}['setColorOverride'](c,d){const cC=aU;this[cC(0x1ee)]['set'](c,d);}['getColorOverride'](c){const cD=aU;return this[cD(0x1ee)][cD(0x257)](c);}['getVisibleLayerNames'](){const cE=aU;if(this['visibleCache'])return this[cE(0x24d)];const c=new Set();for(const [d,f]of this['visibility'])f&&c['add'](d);return this['visibleCache']=c,c;}['clear'](){this['layers']['clear'](),this['visibility']['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;}},ha=class{['listeners']=new Map();['on'](c,d){this['listeners']['has'](c)||this['listeners']['set'](c,new Set()),this['listeners']['get'](c)['add'](d);}['off'](c,d){this['listeners']['get'](c)?.['delete'](d);}['emit'](c,d){const f=this['listeners']['get'](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){const cF=aU;this['listeners'][cF(0x229)]();}},ua=class{constructor(c,d){const cG=aU;this['canvas']=c,this['viewer']=d,this['onPointerDown']=this['handlePointerDown']['bind'](this),this['onPointerMove']=this['handlePointerMove']['bind'](this),this['onPointerUp']=this[cG(0x218)]['bind'](this),this[cG(0x21b)]=this['handleWheel']['bind'](this),this['onTouchStart']=this[cG(0x326)]['bind'](this),this[cG(0x227)]=this['handleTouchMove']['bind'](this),this[cG(0x1fd)]=this['handleTouchEnd']['bind'](this),this[cG(0x24a)]=f=>f[cG(0x32b)](),c['addEventListener']('pointerdown',this['onPointerDown']),c[cG(0x1e9)]('pointermove',this['onPointerMove']),c['addEventListener']('pointerup',this['onPointerUp']),c['addEventListener']('wheel',this['onWheel'],{'passive':!0x1}),c['addEventListener']('touchstart',this['onTouchStart'],{'passive':!0x1}),c[cG(0x1e9)]('touchmove',this['onTouchMove'],{'passive':!0x1}),c['addEventListener']('touchend',this['onTouchEnd']),c['addEventListener']('contextmenu',this['onContextMenu']);}['isPanning']=!0x1;[aU(0x318)]=0x0;['lastY']=0x0;['touches']=new Map();['onPointerDown'];[aU(0x33a)];['onPointerUp'];['onWheel'];['onTouchStart'];['onTouchMove'];['onTouchEnd'];['onContextMenu'];['destroy'](){const cH=aU;this[cH(0x25d)]['removeEventListener']('pointerdown',this['onPointerDown']),this['canvas']['removeEventListener']('pointermove',this['onPointerMove']),this['canvas']['removeEventListener']('pointerup',this[cH(0x25b)]),this[cH(0x25d)]['removeEventListener']('wheel',this[cH(0x21b)]),this['canvas']['removeEventListener']('touchstart',this['onTouchStart']),this['canvas']['removeEventListener'](cH(0x2f4),this['onTouchMove']),this['canvas']['removeEventListener']('touchend',this['onTouchEnd']),this['canvas']['removeEventListener'](cH(0x2f9),this['onContextMenu']);}['handlePointerDown'](c){const cI=aU,d=this[cI(0x241)]['getTool'](),f=this['canvas']['getBoundingClientRect'](),g=c['clientX']-f['left'],h=c['clientY']-f['top'];c['button']===0x0&&d==='pan'?this[cI(0x2a2)](c,g,h):c['button']===0x1?this['startPan'](c,g,h):c[cI(0x2b9)]===0x0&&(d==='select'||d==='measure')&&this['viewer']['handleClick'](g,h);}['startPan'](c,d,f){const cJ=aU;this['isPanning']=!0x0,this['lastX']=d,this['lastY']=f,this[cJ(0x25d)]['setPointerCapture'](c['pointerId']),this['canvas'][cJ(0x21e)][cJ(0x31b)]='grabbing';}[aU(0x207)](c){const cK=aU,d=this['canvas'][cK(0x21a)](),f=c['clientX']-d['left'],g=c['clientY']-d['top'];if(this['isPanning']){const h=f-this['lastX'],i=g-this['lastY'];this['lastX']=f,this[cK(0x2fc)]=g,this['viewer']['handlePan'](h,i);}else this['viewer'][cK(0x220)](f,g);}['handlePointerUp'](c){const cL=aU;this['isPanning']&&(this['isPanning']=!0x1,this['canvas']['releasePointerCapture'](c['pointerId']),this['canvas']['style']['cursor']=this['viewer']['getTool']()===cL(0x297)?'grab':cL(0x2bc));}['handleWheel'](c){const cM=aU;c[cM(0x32b)]();const d=this['canvas']['getBoundingClientRect'](),f=c['clientX']-d['left'],g=c['clientY']-d['top'],h=-Math['sign'](c['deltaY']),k=this['viewer']['getZoomSpeed'](),l=h>0x0?k:0x1/k;this['viewer']['handleZoom'](f,g,l);}['handleTouchStart'](c){const cN=aU;c['preventDefault']();for(const d of Array['from'](c['changedTouches']))this['touches']['set'](d[cN(0x2ae)],{'x':d['clientX'],'y':d['clientY']});}['handleTouchMove'](d){const cO=aU;if(d['preventDefault'](),this['touches']['size']===0x2&&d['touches']['length']===0x2){const f=d['touches'][0x0],g=d['touches'][0x1],k=Array['from'](this['touches']['values']()),m=Math[cO(0x231)](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),p=Math['hypot'](f['clientX']-g['clientX'],f['clientY']-g['clientY']);if(m>0x0){const v=p/m,w=this['canvas']['getBoundingClientRect'](),x=(k[0x0]['x']+k[0x1]['x'])/0x2-w['left'],z=(k[0x0]['y']+k[0x1]['y'])/0x2-w[cO(0x2fb)],A=(f['clientX']+g['clientX'])/0x2-w['left'],C=(f['clientY']+g[cO(0x2d6)])/0x2-w['top'];this[cO(0x241)]['handleZoom'](x,z,v),this[cO(0x241)]['handlePan'](A-x,C-z);}}else{if(this['touches']['size']===0x1&&d['touches']['length']===0x1){const D=d['touches'][0x0],F=this['touches']['get'](D['identifier']);F&&this['viewer']['handlePan'](D['clientX']-F['x'],D['clientY']-F['y']);}}for(const I of Array['from'](d['changedTouches']))this['touches']['set'](I['identifier'],{'x':I['clientX'],'y':I['clientY']});}['handleTouchEnd'](c){const cP=aU;for(const d of Array['from'](c['changedTouches']))this[cP(0x20f)]['delete'](d['identifier']);}},da=0x5,fa=class{['tree']=new Le();['items']=[];['entityBBoxes']=[];['build'](c,d){const cQ=aU;this[cQ(0x242)]=[],this[cQ(0x28f)]=new Array(c['length'])['fill'](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c['length'];g++){const h=c[g],i=d&&f?Ee(h,d,f):B(h);this['entityBBoxes'][g]=i,i&&this['items']['push']({...i,'entityIndex':g});}this['tree']['clear'](),this['tree']['load'](this['items']);}[aU(0x1f5)](c,d,f,g){return this['tree']['search']({'minX':c,'minY':d,'maxX':f,'maxY':g});}['getEntityBBox'](c){return this['entityBBoxes'][c]??null;}['getEntityBBoxes'](){return this['entityBBoxes'];}['clear'](){this['tree']['clear'](),this['items']=[],this['entityBBoxes']=[];}};function pa(g,k,m,p,v,w){const cR=aU,x=da/w,z=p['search'](g-x,k-x,g+x,k+x);let A=x,C=-0x1;for(let D=z[cR(0x2c0)]-0x1;D>=0x0;D--){const F=z[D],I=m[F['entityIndex']];if(!I||!v[cR(0x2f8)](I[cR(0x315)])||!I[cR(0x32f)])continue;const L=ba(g,k,I);L<A&&(A=L,C=F[cR(0x2dc)]);}return C;}function ba(d,f,g){const cS=aU;switch(g['type']){case'LINE':return re(d,f,g['start']['x'],g[cS(0x311)]['y'],g[cS(0x28a)]['x'],g[cS(0x28a)]['y']);case'CIRCLE':return ma(d,f,g[cS(0x228)]['x'],g['center']['y'],g['radius']);case'ARC':return ga(d,f,g['center']['x'],g['center']['y'],g[cS(0x263)],g['startAngle']*Math['PI']/0xb4,g['endAngle']*Math['PI']/0xb4);case'LWPOLYLINE':case'POLYLINE':{let k=0x1/0x0;const l=g['vertices'],m=g[cS(0x321)]?l['length']:l['length']-0x1;for(let p=0x0;p<m;p++){const u=l[p],v=l[(p+0x1)%l['length']],w=re(d,f,u['x'],u['y'],v['x'],v['y']);k=Math['min'](k,w);}return k;}case cS(0x213):return Fa(d,f,g['center']['x'],g['center']['y'],g['majorAxis'],g[cS(0x2cc)]);case'TEXT':case cS(0x2a6):{const x=B(g);return x?va(d,f,x['minX'],x['minY'],x[cS(0x20d)],x['maxY']):0x1/0x0;}case'POINT':return Math['hypot'](d-g['position']['x'],f-g[cS(0x202)]['y']);case'SPLINE':{let z=0x1/0x0;const A=g['controlPoints'];for(let C=0x0;C<A[cS(0x2c0)]-0x1;C++){const D=re(d,f,A[C]['x'],A[C]['y'],A[C+0x1]['x'],A[C+0x1]['y']);z=Math[cS(0x1f9)](z,D);}return z;}default:return 0x1/0x0;}}function re(d,f,g,k,m,p){const cT=aU,v=m-g,w=p-k,x=v*v+w*w;if(x===0x0)return Math['hypot'](d-g,f-k);let z=((d-g)*v+(f-k)*w)/x;z=Math['max'](0x0,Math['min'](0x1,z));const A=g+z*v,C=k+z*w;return Math[cT(0x231)](d-A,f-C);}function ma(c,d,f,g,h){return Math['abs'](Math['hypot'](c-f,d-g)-h);}function ga(g,k,m,o,p,u,v){const cU=aU,w=(Math[cU(0x33d)](k-o,g-m)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),x=(u%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),z=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(x<=z?w>=x&&w<=z:w>=x||w<=z)return Math['abs'](Math['hypot'](g-m,k-o)-p);const A=Math['hypot'](g-(m+p*Math['cos'](u)),k-(o+p*Math['sin'](u))),C=Math['hypot'](g-(m+p*Math[cU(0x22c)](v)),k-(o+p*Math['sin'](v)));return Math['min'](A,C);}function va(c,d,f,g,h,k){const cV=aU;if(c>=f&&c<=h&&d>=g&&d<=k)return 0x0;const l=Math[cV(0x28e)](f-c,0x0,c-h),m=Math['max'](g-d,0x0,d-k);return Math[cV(0x231)](l,m);}function Fa(g,k,v,w,x,z){const A=Math['atan2'](x['y'],x['x']),C=Math['cos'](-A),D=Math['sin'](-A),F=(g-v)*C-(k-w)*D,I=(g-v)*D+(k-w)*C,L=Math['sqrt'](x['x']**0x2+x['y']**0x2),M=L*z;if(L<1e-10)return Math['hypot'](g-v,k-w);const N=I*(L/M),V=Math['hypot'](F,N);if(V<1e-10)return L;const X=F/V*L,Y=I/V*M;return Math['hypot'](F-X,I-Y);}var xa=class{[aU(0x2ec)]={'phase':aU(0x341)};['currentSnap']=null;['activate'](){const cW=aU;this['state']={'phase':cW(0x2e3)},this['currentSnap']=null;}['deactivate'](){const cX=aU;this[cX(0x2ec)]={'phase':'idle'},this['currentSnap']=null;}['handleClick'](d,f,g){const cY=aU,k=g?g[cY(0x249)]:{'x':d,'y':f};switch(this['state'][cY(0x211)]){case'first-point':return this['state']={'phase':'second-point','firstPoint':k,'firstSnap':g??void 0x0},null;case cY(0x31a):{const l=this['state']['firstPoint'],m=k,p=m['x']-l['x'],u=m['y']-l['y'],v=Math['sqrt'](p*p+u*u),w=Math['atan2'](u,p)*0xb4/Math['PI'];return this['state']={'phase':'done','firstPoint':l,'secondPoint':m,'distance':v,'angle':w},{'distance':v,'angle':w,'deltaX':p,'deltaY':u,'points':[l,m]};}case cY(0x2a9):return this['state']={'phase':cY(0x31a),'firstPoint':k},null;default:return null;}}['handleMove'](c){this['currentSnap']=c;}};function ke(g,k,m,p,v,w=new Set(['endpoint',aU(0x20c),'center'])){const cZ=aU,x=0xa/v,z=[],A=p['search'](g-x,k-x,g+x,k+x);for(const C of A){const D=m[C['entityIndex']];if(!D)continue;const F=C['entityIndex'];switch(D['type']){case'LINE':{if(w['has']('endpoint')&&(y(z,D['start']['x'],D['start']['y'],cZ(0x27e),F,g,k,x),y(z,D[cZ(0x28a)]['x'],D[cZ(0x28a)]['y'],cZ(0x27e),F,g,k,x)),w['has'](cZ(0x20c))){const I=(D['start']['x']+D['end']['x'])/0x2,L=(D['start']['y']+D[cZ(0x28a)]['y'])/0x2;y(z,I,L,'midpoint',F,g,k,x);}break;}case cZ(0x28c):{if(w['has']('center')&&y(z,D['center']['x'],D[cZ(0x228)]['y'],cZ(0x228),F,g,k,x),w['has']('endpoint'))for(const M of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const N=D['center']['x']+D['radius']*Math['cos'](M),V=D[cZ(0x228)]['y']+D['radius']*Math['sin'](M);y(z,N,V,'endpoint',F,g,k,x);}break;}case'ARC':{if(w['has']('center')&&y(z,D['center']['x'],D[cZ(0x228)]['y'],cZ(0x228),F,g,k,x),w['has']('endpoint')){const X=D['startAngle']*Math['PI']/0xb4,Y=D['endAngle']*Math['PI']/0xb4;y(z,D['center']['x']+D['radius']*Math['cos'](X),D['center']['y']+D[cZ(0x263)]*Math['sin'](X),'endpoint',F,g,k,x),y(z,D['center']['x']+D['radius']*Math[cZ(0x22c)](Y),D['center']['y']+D[cZ(0x263)]*Math[cZ(0x203)](Y),'endpoint',F,g,k,x);}break;}case'LWPOLYLINE':case'POLYLINE':{if(w['has']('endpoint')){for(const a0 of D['vertices'])y(z,a0['x'],a0['y'],'endpoint',F,g,k,x);}if(w['has']('midpoint'))for(let a1=0x0;a1<D['vertices']['length']-0x1;a1++){const a2=D['vertices'][a1],a3=D['vertices'][a1+0x1];y(z,(a2['x']+a3['x'])/0x2,(a2['y']+a3['y'])/0x2,'midpoint',F,g,k,x);}break;}case'ELLIPSE':{w['has']('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x);break;}case'TEXT':{w['has']('endpoint')&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],cZ(0x27e),F,g,k,x);break;}case'MTEXT':{w['has']('endpoint')&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}}}return z['sort']((a4,a5)=>Math[cZ(0x231)](a4['point']['x']-g,a4[cZ(0x249)]['y']-k)-Math['hypot'](a5['point']['x']-g,a5[cZ(0x249)]['y']-k)),z;}function y(c,d,f,g,h,k,l,m){const d0=aU;Math['hypot'](d-k,f-l)<=m&&c[d0(0x2f7)]({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function ka(g,k,v,w,x,z){const d1=aU,A=E[z];g['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=v['state'];if(v[d1(0x1f6)]){const [D,F]=W(k,v['currentSnap']['point']['x'],v['currentSnap']['point']['y']);ya(g,D,F,v['currentSnap'][d1(0x234)],A['measureColor']);}if(C['phase']==='second-point'){const [I,L]=W(k,C['firstPoint']['x'],C['firstPoint']['y']);let M,N;if(v['currentSnap']){const [a0,a1]=W(k,v[d1(0x1f6)]['point']['x'],v['currentSnap'][d1(0x249)]['y']);M=a0,N=a1;}else M=w,N=x;g[d1(0x264)]=A['measureColor'],g['lineWidth']=1.5,g['setLineDash']([0x6,0x3]),g['beginPath'](),g['moveTo'](I,L),g['lineTo'](M,N),g['stroke'](),g['setLineDash']([]),K(g,I,L,A['measureColor']),K(g,M,N,A['measureColor']);let V,X;v[d1(0x1f6)]?(V=v['currentSnap']['point']['x'],X=v['currentSnap'][d1(0x249)]['y']):[V,X]=q(k,w,x);const Y=Math['hypot'](V-C['firstPoint']['x'],X-C['firstPoint']['y']);ye(g,(I+M)/0x2,(L+N)/0x2,Y,z);}if(C['phase']==='done'){const [a2,a3]=W(k,C['firstPoint']['x'],C['firstPoint']['y']),[a4,a5]=W(k,C['secondPoint']['x'],C['secondPoint']['y']);g['strokeStyle']=A['measureColor'],g['lineWidth']=0x2,g[d1(0x285)](),g['moveTo'](a2,a3),g['lineTo'](a4,a5),g[d1(0x2f6)](),K(g,a2,a3,A['measureColor']),K(g,a4,a5,A['measureColor']),ye(g,(a2+a4)/0x2,(a3+a5)/0x2,C['distance'],z);}}function ya(c,d,f,g,h){const d2=aU;c['strokeStyle']=h,c['lineWidth']=0x2;const i=0x8;switch(g){case'endpoint':c['strokeRect'](d-i/0x2,f-i/0x2,i,i);break;case'midpoint':c['beginPath'](),c['moveTo'](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['closePath'](),c['stroke']();break;case'center':c['beginPath'](),c['arc'](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case'nearest':c['beginPath'](),c[d2(0x277)](d-i/0x2,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['moveTo'](d+i/0x2,f-i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['stroke']();break;}}function K(c,d,f,g){c['fillStyle']=g,c['beginPath'](),c['arc'](d,f,0x4,0x0,Math['PI']*0x2),c['fill']();}function ye(d,f,g,k,m){const d3=aU,p=k[d3(0x31f)](0x4);d['font']='13px\x20monospace',d['textAlign']='center',d['textBaseline']=d3(0x335);const v=d['measureText'](p),w=0x4,x=f-v['width']/0x2-w,z=g-0x14,A=v['width']+w*0x2,C=0x12;d['fillStyle']=m==='dark'?'rgba(0,0,0,0.8)':'rgba(255,255,255,0.9)',d['fillRect'](x,z,A,C),d['fillStyle']=E[m]['measureColor'],d['fillText'](p,f,g-0x6);}var Pa=class{['worker']=null;['blobUrl']=null;['nextId']=0x1;['pending']=new Map();[aU(0x235)](){const d4=aU;return this['worker']?this[d4(0x2cf)]:(this['blobUrl']=URL['createObjectURL'](new Blob(['\x22use\x20strict\x22;(()=>{function\x20h(a){let\x20e=a.replace(/\x5cr\x5cn?/g,`\x0a`),t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&e.charCodeAt(n)===10;)n++;if(n>=r)break;let\x20o=e.indexOf(`\x0a`,n);o===-1&&(o=r);let\x20c=e.substring(n,o).trim();n=o+1;let\x20s=parseInt(c,10);if(isNaN(s)){n<r&&(o=e.indexOf(`\x0a`,n),o===-1&&(o=r),n=o+1);continue}if(n>=r)break;o=e.indexOf(`\x0a`,n),o===-1&&(o=r);let\x20p=e.substring(n,o).replace(/\x5cs+$/,\x22\x22);n=o+1,t.push({code:s,value:p})}return\x20t}function\x20m(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===9){let\x20n=r.value;switch(e++,n){case\x22$ACADVER\x22:e<a.length&&(t.acadVersion=a[e].value,e++);break;case\x22$EXTMIN\x22:if(e<a.length){let\x20o=v(a,e);t.extMin=o.point,e=o.nextIndex}break;case\x22$EXTMAX\x22:if(e<a.length){let\x20o=v(a,e);t.extMax=o.point,e=o.nextIndex}break;case\x22$INSUNITS\x22:e<a.length&&(t.insUnits=parseInt(a[e].value,10),e++);break;case\x22$MEASUREMENT\x22:e<a.length&&(t.measurement=parseInt(a[e].value,10),e++);break;case\x22$LTSCALE\x22:e<a.length&&(t.ltScale=parseFloat(a[e].value),e++);break;case\x22$DWGCODEPAGE\x22:e<a.length&&(t.dwgCodePage=a[e].value,e++);break;case\x22$HANDSEED\x22:e<a.length&&(t.handleSeed=a[e].value,e++);break;default:for(;e<a.length&&a[e].code!==9&&a[e].code!==0;)t[n]=a[e].value,e++}}else\x20e++}return\x20e}function\x20v(a,e){let\x20t={x:0,y:0,z:0};for(;e<a.length;){let\x20r=a[e].code;if(r===10)t.x=parseFloat(a[e].value),e++;else\x20if(r===20)t.y=parseFloat(a[e].value),e++;else\x20if(r===30)t.z=parseFloat(a[e].value),e++;else\x20break}return{point:t,nextIndex:e}}function\x20k(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22TABLE\x22){if(e++,e>=a.length)break;let\x20n=a[e].value;switch(e++,n){case\x22LAYER\x22:e=H(a,e,t.layers);break;case\x22LTYPE\x22:e=O(a,e,t.lineTypes);break;case\x22STYLE\x22:e=_(a,e,t.styles);break;default:e=R(a,e);break}}else\x20e++}return\x20e}function\x20R(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDTAB\x22)return\x20e+1;e++}return\x20e}function\x20H(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LAYER\x22){e++;let\x20n={name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x206:n.lineType=o.value;break;case\x2062:n.color=parseInt(o.value,10);break;case\x2070:n.flags=parseInt(o.value,10);break;case\x20370:n.lineWeight=parseInt(o.value,10);break;case\x20420:n.trueColor=parseInt(o.value,10);break}e++}t.set(n.name,n)}else\x20e++}return\x20e}function\x20O(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LTYPE\x22){e++;let\x20n={name:\x22\x22,description:\x22\x22,pattern:[],totalLength:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.description=o.value;break;case\x2040:n.totalLength=parseFloat(o.value);break;case\x2049:n.pattern.push(parseFloat(o.value));break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20_(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22STYLE\x22){e++;let\x20n={name:\x22\x22,fontName:\x22\x22,bigFontName:\x22\x22,height:0,widthFactor:1,obliqueAngle:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.fontName=o.value;break;case\x204:n.bigFontName=o.value;break;case\x2040:n.height=parseFloat(o.value);break;case\x2041:n.widthFactor=parseFloat(o.value);break;case\x2050:n.obliqueAngle=parseFloat(o.value);break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20l(a){let\x20e={type:\x22\x22,layer:\x220\x22,color:256,lineType:\x22BYLAYER\x22,lineTypeScale:1,lineWeight:-1,visible:!0,extrusion:{x:0,y:0,z:1}};for(let\x20t\x20of\x20a)switch(t.code){case\x205:e.handle=t.value;break;case\x208:e.layer=t.value;break;case\x206:e.lineType=t.value;break;case\x2048:e.lineTypeScale=parseFloat(t.value);break;case\x2060:e.visible=t.value===\x220\x22||t.value===\x22\x22;break;case\x2062:e.color=parseInt(t.value,10);break;case\x20370:e.lineWeight=parseInt(t.value,10);break;case\x20420:e.trueColor=parseInt(t.value,10);break;case\x20210:e.extrusion.x=parseFloat(t.value);break;case\x20220:e.extrusion.y=parseFloat(t.value);break;case\x20230:e.extrusion.z=parseFloat(t.value);break}return\x20e}function\x20D(a){let\x20t={...l(a),type:\x22LINE\x22,start:{x:0,y:0,z:0},end:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.start.x=parseFloat(r.value);break;case\x2020:t.start.y=parseFloat(r.value);break;case\x2030:t.start.z=parseFloat(r.value);break;case\x2011:t.end.x=parseFloat(r.value);break;case\x2021:t.end.y=parseFloat(r.value);break;case\x2031:t.end.z=parseFloat(r.value);break}return\x20t}function\x20F(a){let\x20t={...l(a),type:\x22CIRCLE\x22,center:{x:0,y:0,z:0},radius:0};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break}return\x20t}function\x20E(a){let\x20t={...l(a),type:\x22ARC\x22,center:{x:0,y:0,z:0},radius:0,startAngle:0,endAngle:360};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break;case\x2050:t.startAngle=parseFloat(r.value);break;case\x2051:t.endAngle=parseFloat(r.value);break}return\x20t}function\x20P(a){let\x20t={...l(a),type:\x22LWPOLYLINE\x22,vertices:[],closed:!1,constantWidth:0,elevation:0},r=null;for(let\x20n\x20of\x20a)switch(n.code){case\x2070:t.closed=(parseInt(n.value,10)&1)!==0;break;case\x2038:t.elevation=parseFloat(n.value);break;case\x2043:t.constantWidth=parseFloat(n.value);break;case\x2010:r&&t.vertices.push(r),r={x:parseFloat(n.value),y:0,bulge:0,startWidth:0,endWidth:0};break;case\x2020:r&&(r.y=parseFloat(n.value));break;case\x2040:r&&(r.startWidth=parseFloat(n.value));break;case\x2041:r&&(r.endWidth=parseFloat(n.value));break;case\x2042:r&&(r.bulge=parseFloat(n.value));break}return\x20r&&t.vertices.push(r),t}function\x20T(a){let\x20t={...l(a),type:\x22POLYLINE\x22,vertices:[],closed:!1,is3d:!1};for(let\x20r\x20of\x20a)if(r.code===70){let\x20n=parseInt(r.value,10);t.closed=(n&1)!==0,t.is3d=(n&8)!==0}return\x20t}function\x20w(a){let\x20t={...l(a),type:\x22ELLIPSE\x22,center:{x:0,y:0,z:0},majorAxis:{x:1,y:0,z:0},minorRatio:1,startParam:0,endParam:Math.PI*2};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2011:t.majorAxis.x=parseFloat(r.value);break;case\x2021:t.majorAxis.y=parseFloat(r.value);break;case\x2031:t.majorAxis.z=parseFloat(r.value);break;case\x2040:t.minorRatio=parseFloat(r.value);break;case\x2041:t.startParam=parseFloat(r.value);break;case\x2042:t.endParam=parseFloat(r.value);break}return\x20t}function\x20g(a){let\x20t={...l(a),type:\x22SPLINE\x22,degree:3,flags:0,knots:[],controlPoints:[],fitPoints:[],weights:[]},r=null,n=null;for(let\x20o\x20of\x20a)switch(o.code){case\x2070:t.flags=parseInt(o.value,10);break;case\x2071:t.degree=parseInt(o.value,10);break;case\x2040:t.knots.push(parseFloat(o.value));break;case\x2041:t.weights.push(parseFloat(o.value));break;case\x2010:r&&t.controlPoints.push(r),r={x:parseFloat(o.value),y:0,z:0};break;case\x2020:r&&(r.y=parseFloat(o.value));break;case\x2030:r&&(r.z=parseFloat(o.value));break;case\x2011:n&&t.fitPoints.push(n),n={x:parseFloat(o.value),y:0,z:0};break;case\x2021:n&&(n.y=parseFloat(o.value));break;case\x2031:n&&(n.z=parseFloat(o.value));break;case\x2012:t.startTangent||(t.startTangent={x:0,y:0,z:0}),t.startTangent.x=parseFloat(o.value);break;case\x2022:t.startTangent&&(t.startTangent.y=parseFloat(o.value));break;case\x2032:t.startTangent&&(t.startTangent.z=parseFloat(o.value));break;case\x2013:t.endTangent||(t.endTangent={x:0,y:0,z:0}),t.endTangent.x=parseFloat(o.value);break;case\x2023:t.endTangent&&(t.endTangent.y=parseFloat(o.value));break;case\x2033:t.endTangent&&(t.endTangent.z=parseFloat(o.value));break}return\x20r&&t.controlPoints.push(r),n&&t.fitPoints.push(n),t}function\x20I(a){let\x20t={...l(a),type:\x22TEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,widthFactor:1,obliqueAngle:0,style:\x22STANDARD\x22,hAlign:0,vAlign:0,generationFlags:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.text=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2011:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.x=parseFloat(r.value);break;case\x2021:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.y=parseFloat(r.value);break;case\x2031:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.z=parseFloat(r.value);break;case\x2040:t.height=parseFloat(r.value);break;case\x2041:t.widthFactor=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2051:t.obliqueAngle=parseFloat(r.value);break;case\x207:t.style=r.value;break;case\x2071:t.generationFlags=parseInt(r.value,10);break;case\x2072:t.hAlign=parseInt(r.value,10);break;case\x2073:t.vAlign=parseInt(r.value,10);break}return\x20t}function\x20A(a){let\x20t={...l(a),type:\x22MTEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,width:0,attachmentPoint:1,drawingDirection:1,rotation:0,lineSpacingStyle:1,lineSpacingFactor:1,style:\x22STANDARD\x22,bgFill:0,bgFillScale:1.5},r=[];for(let\x20n\x20of\x20a)switch(n.code){case\x201:r.push(n.value);break;case\x203:r.push(n.value);break;case\x207:t.style=n.value;break;case\x2010:t.insertionPoint.x=parseFloat(n.value);break;case\x2020:t.insertionPoint.y=parseFloat(n.value);break;case\x2030:t.insertionPoint.z=parseFloat(n.value);break;case\x2011:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.x=parseFloat(n.value);break;case\x2021:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.y=parseFloat(n.value);break;case\x2031:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.z=parseFloat(n.value);break;case\x2040:t.height=parseFloat(n.value);break;case\x2041:t.width=parseFloat(n.value);break;case\x2044:t.lineSpacingFactor=parseFloat(n.value);break;case\x2050:t.rotation=parseFloat(n.value);break;case\x2071:t.attachmentPoint=parseInt(n.value,10);break;case\x2072:t.drawingDirection=parseInt(n.value,10);break;case\x2073:t.lineSpacingStyle=parseInt(n.value,10);break;case\x2090:t.bgFill=parseInt(n.value,10);break}return\x20t.text=r.join(\x22\x22),t}function\x20z(a){let\x20t={...l(a),type:\x22INSERT\x22,blockName:\x22\x22,insertionPoint:{x:0,y:0,z:0},scaleX:1,scaleY:1,scaleZ:1,rotation:0,columnCount:1,rowCount:1,columnSpacing:0,rowSpacing:0,attribs:[]};for(let\x20r\x20of\x20a)switch(r.code){case\x202:t.blockName=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2041:t.scaleX=parseFloat(r.value);break;case\x2042:t.scaleY=parseFloat(r.value);break;case\x2043:t.scaleZ=parseFloat(r.value);break;case\x2044:t.columnSpacing=parseFloat(r.value);break;case\x2045:t.rowSpacing=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2070:t.columnCount=parseInt(r.value,10)||1;break;case\x2071:t.rowCount=parseInt(r.value,10)||1;break}return\x20t}function\x20S(a){let\x20t={...l(a),type:\x22DIMENSION\x22,blockName:\x22\x22,dimStyle:\x22STANDARD\x22,dimType:0,defPoint:{x:0,y:0,z:0},textMidpoint:{x:0,y:0,z:0},textOverride:\x22\x22,rotation:0,textRotation:0,leaderLength:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.textOverride=r.value;break;case\x202:t.blockName=r.value;break;case\x203:t.dimStyle=r.value;break;case\x2010:t.defPoint.x=parseFloat(r.value);break;case\x2020:t.defPoint.y=parseFloat(r.value);break;case\x2030:t.defPoint.z=parseFloat(r.value);break;case\x2011:t.textMidpoint.x=parseFloat(r.value);break;case\x2021:t.textMidpoint.y=parseFloat(r.value);break;case\x2031:t.textMidpoint.z=parseFloat(r.value);break;case\x2013:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.x=parseFloat(r.value);break;case\x2023:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.y=parseFloat(r.value);break;case\x2033:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.z=parseFloat(r.value);break;case\x2014:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.x=parseFloat(r.value);break;case\x2024:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.y=parseFloat(r.value);break;case\x2034:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.z=parseFloat(r.value);break;case\x2015:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.x=parseFloat(r.value);break;case\x2025:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.y=parseFloat(r.value);break;case\x2035:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.z=parseFloat(r.value);break;case\x2016:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.x=parseFloat(r.value);break;case\x2026:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.y=parseFloat(r.value);break;case\x2036:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.z=parseFloat(r.value);break;case\x2040:t.leaderLength=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2053:t.textRotation=parseFloat(r.value);break;case\x2070:t.dimType=parseInt(r.value,10);break}return\x20t}function\x20N(a){let\x20t={...l(a),type:\x22HATCH\x22,patternName:\x22\x22,solidFill:!0,associative:!1,hatchStyle:0,patternType:1,patternAngle:0,patternScale:1,boundaryPaths:[]},r=0;for(;r<a.length;){let\x20n=a[r];switch(n.code){case\x202:t.patternName=n.value;break;case\x2041:t.patternScale=parseFloat(n.value);break;case\x2052:t.patternAngle=parseFloat(n.value);break;case\x2070:t.solidFill=n.value===\x221\x22;break;case\x2071:t.associative=n.value===\x221\x22;break;case\x2075:t.hatchStyle=parseInt(n.value,10);break;case\x2076:t.patternType=parseInt(n.value,10);break;case\x2091:{let\x20o=parseInt(n.value,10);r++;for(let\x20c=0;c<o&&r<a.length;c++){let\x20s=W(a,r);t.boundaryPaths.push(s.path),r=s.nextIndex}continue}}r++}return\x20t}function\x20W(a,e){let\x20t=0;return\x20e<a.length&&a[e].code===92&&(t=parseInt(a[e].value,10),e++),(t&2)!==0?X(a,e,t):Y(a,e,t)}function\x20X(a,e,t){let\x20r={type:\x22polyline\x22,vertices:[],bulges:[],flags:t},n=!1;e<a.length&&a[e].code===72&&(n=a[e].value===\x221\x22,e++),e<a.length&&a[e].code===73&&(r.isClosed=a[e].value===\x221\x22,e++);let\x20o=0;e<a.length&&a[e].code===93&&(o=parseInt(a[e].value,10),e++);for(let\x20c=0;c<o&&e<a.length;c++){let\x20s={x:0,y:0};a[e].code===10&&(s.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.y=parseFloat(a[e].value),e++),r.vertices.push(s),n&&e<a.length&&a[e].code===42?(r.bulges.push(parseFloat(a[e].value)),e++):n&&r.bulges.push(0)}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20c=parseInt(a[e].value,10);e++;for(let\x20s=0;s<c&&e<a.length&&a[e].code===330;s++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20Y(a,e,t){let\x20r={type:\x22edges\x22,edges:[],flags:t},n=0;e<a.length&&a[e].code===93&&(n=parseInt(a[e].value,10),e++);for(let\x20o=0;o<n&&e<a.length&&a[e].code===72;o++){let\x20c=parseInt(a[e].value,10);switch(e++,c){case\x201:{let\x20s={type:\x22line\x22,start:{x:0,y:0},end:{x:0,y:0}};e<a.length&&a[e].code===10&&(s.start.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.start.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.end.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.end.y=parseFloat(a[e].value),e++),r.edges.push(s);break}case\x202:{let\x20s={type:\x22arc\x22,center:{x:0,y:0},radius:0,startAngle:0,endAngle:360,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.radius=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x203:{let\x20s={type:\x22ellipse\x22,center:{x:0,y:0},majorAxis:{x:1,y:0},minorRatio:1,startAngle:0,endAngle:Math.PI*2,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.majorAxis.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.majorAxis.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.minorRatio=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x204:{let\x20s=3,p=[],b=[];e<a.length&&a[e].code===94&&(s=parseInt(a[e].value,10),e++),e<a.length&&a[e].code===73&&e++,e<a.length&&a[e].code===74&&e++;let\x20d=0;e<a.length&&a[e].code===95&&(d=parseInt(a[e].value,10),e++);let\x20x=0;e<a.length&&a[e].code===96&&(x=parseInt(a[e].value,10),e++);for(let\x20f=0;f<d&&e<a.length&&a[e].code===40;f++)p.push(parseFloat(a[e].value)),e++;for(let\x20f=0;f<x&&e<a.length;f++){let\x20y={x:0,y:0};a[e].code===10&&(y.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(y.y=parseFloat(a[e].value),e++),b.push(y)}r.edges.push({type:\x22spline\x22,degree:s,knots:p,controlPoints:b});break}default:break}}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20o=parseInt(a[e].value,10);e++;for(let\x20c=0;c<o&&e<a.length&&a[e].code===330;c++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20L(a){let\x20t={...l(a),type:\x22POINT\x22,position:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.position.x=parseFloat(r.value);break;case\x2020:t.position.y=parseFloat(r.value);break;case\x2030:t.position.z=parseFloat(r.value);break}return\x20t}function\x20u(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code!==0){e++;continue}let\x20n=r.value;if(n===\x22ENDSEC\x22||n===\x22ENDBLK\x22)return\x20e+1;e++;let\x20o=[];for(;e<a.length&&a[e].code!==0;)o.push(a[e]),e++;switch(n){case\x22LINE\x22:t.push(D(o));break;case\x22CIRCLE\x22:t.push(F(o));break;case\x22ARC\x22:t.push(E(o));break;case\x22LWPOLYLINE\x22:t.push(P(o));break;case\x22ELLIPSE\x22:t.push(w(o));break;case\x22SPLINE\x22:t.push(g(o));break;case\x22TEXT\x22:t.push(I(o));break;case\x22MTEXT\x22:t.push(A(o));break;case\x22INSERT\x22:{let\x20c=z(o);o.some(p=>p.code===66&&p.value===\x221\x22)&&(e=$(a,e,c.attribs)),t.push(c);break}case\x22DIMENSION\x22:t.push(S(o));break;case\x22HATCH\x22:t.push(N(o));break;case\x22POINT\x22:t.push(L(o));break;case\x22POLYLINE\x22:{let\x20c=T(o);e=V(a,e,c.vertices),t.push(c);break}default:break}}return\x20e}function\x20V(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22VERTEX\x22){e++;let\x20n={x:0,y:0,bulge:0,startWidth:0,endWidth:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x2010:n.x=parseFloat(o.value);break;case\x2020:n.y=parseFloat(o.value);break;case\x2042:n.bulge=parseFloat(o.value);break;case\x2040:n.startWidth=parseFloat(o.value);break;case\x2041:n.endWidth=parseFloat(o.value);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20$(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22ATTRIB\x22){e++;let\x20n={tag:\x22\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,style:\x22STANDARD\x22,layer:\x220\x22,color:256};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x201:n.text=o.value;break;case\x202:n.tag=o.value;break;case\x207:n.style=o.value;break;case\x208:n.layer=o.value;break;case\x2010:n.insertionPoint.x=parseFloat(o.value);break;case\x2020:n.insertionPoint.y=parseFloat(o.value);break;case\x2030:n.insertionPoint.z=parseFloat(o.value);break;case\x2040:n.height=parseFloat(o.value);break;case\x2050:n.rotation=parseFloat(o.value);break;case\x2062:n.color=parseInt(o.value,10);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20B(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22BLOCK\x22){e++;let\x20n={name:\x22\x22,basePoint:{x:0,y:0,z:0},entities:[],flags:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x208:break;case\x2010:n.basePoint.x=parseFloat(o.value);break;case\x2020:n.basePoint.y=parseFloat(o.value);break;case\x2030:n.basePoint.z=parseFloat(o.value);break;case\x2070:n.flags=parseInt(o.value,10);break}e++}e=u(a,e,n.entities),n.name&&!n.name.startsWith(\x22*Model_Space\x22)&&!n.name.startsWith(\x22*Paper_Space\x22)&&t.set(n.name,n)}else\x20e++}return\x20e}var\x20C=\x22AutoCAD\x20Binary\x20DXF\x22,U={ANSI_874:\x22windows-874\x22,ANSI_932:\x22shift_jis\x22,ANSI_936:\x22gbk\x22,ANSI_949:\x22euc-kr\x22,ANSI_950:\x22big5\x22,ANSI_1250:\x22windows-1250\x22,ANSI_1251:\x22windows-1251\x22,ANSI_1252:\x22windows-1252\x22,ANSI_1253:\x22windows-1253\x22,ANSI_1254:\x22windows-1254\x22,ANSI_1255:\x22windows-1255\x22,ANSI_1256:\x22windows-1256\x22,ANSI_1257:\x22windows-1257\x22,ANSI_1258:\x22windows-1258\x22},G=\x22AC1021\x22;function\x20K(){return{acadVersion:\x22\x22,insUnits:0,measurement:0,ltScale:1}}function\x20j(a){return\x20a.replace(/\x5c\x5cU\x5c+([0-9A-Fa-f]{4})/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}function\x20q(a){if(typeof\x20a==\x22string\x22)return\x20j(a);let\x20e=new\x20Uint8Array(a);if(new\x20TextDecoder(\x22ascii\x22).decode(e.slice(0,C.length))===C)throw\x20new\x20i(\x22Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.\x22);let\x20r=new\x20TextDecoder(\x22utf-8\x22).decode(a),o=r.match(/\x5c$ACADVER[\x5cs\x5cS]*?\x5cn\x5cs*1\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22;if(o&&o<G){let\x20s=r.match(/\x5c$DWGCODEPAGE[\x5cs\x5cS]*?\x5cn\x5cs*3\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22,p=U[s]??\x22windows-1252\x22;p!==\x22utf-8\x22&&(r=new\x20TextDecoder(p).decode(a))}return\x20j(r)}function\x20Q(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDSEC\x22)return\x20e+1;e++}return\x20e}function\x20Z(a){a.layers.has(\x220\x22)||a.layers.set(\x220\x22,{name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1})}function\x20J(a){for(let[,e]of\x20a.layers)e.isOff=e.color<0,e.isOff&&(e.color=Math.abs(e.color)),e.isFrozen=(e.flags&1)!==0,e.isLocked=(e.flags&4)!==0}var\x20i=class\x20extends\x20Error{constructor(t,r){super(t);this.cause=r;this.name=\x22DxfParseError\x22}};function\x20M(a){if(typeof\x20a==\x22string\x22){if(a.length===0)throw\x20new\x20i(\x22Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.\x22)}else\x20if(a\x20instanceof\x20ArrayBuffer){if(a.byteLength===0)throw\x20new\x20i(\x22Input\x20ArrayBuffer\x20is\x20empty.\x22)}else\x20throw\x20new\x20i(\x22Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.\x22);let\x20e;try{e=q(a)}catch(n){throw\x20n\x20instanceof\x20i?n:new\x20i(\x22Failed\x20to\x20decode\x20DXF\x20input.\x22,n)}let\x20t;try{t=h(e)}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20tokenize\x20DXF\x20content.\x22,n)}if(t.length===0)throw\x20new\x20i(\x22DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.\x22);let\x20r={header:K(),layers:new\x20Map,lineTypes:new\x20Map,styles:new\x20Map,blocks:new\x20Map,entities:[]};try{let\x20n=0;for(;n<t.length;){let\x20o=t[n];if(o.code===0&&o.value===\x22SECTION\x22){if(n++,n>=t.length)break;let\x20c=t[n].value;switch(n++,c){case\x22HEADER\x22:n=m(t,n,r.header);break;case\x22TABLES\x22:n=k(t,n,r);break;case\x22BLOCKS\x22:n=B(t,n,r.blocks);break;case\x22ENTITIES\x22:n=u(t,n,r.entities);break;default:n=Q(t,n);break}}else{if(o.code===0&&o.value===\x22EOF\x22)break;n++}}}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20parse\x20DXF\x20sections.\x22,n)}return\x20Z(r),J(r),r}self.onmessage=a=>{let{type:e,id:t,payload:r}=a.data;if(e===\x22parse\x22)try{let\x20n=M(r);postMessage({type:\x22result\x22,id:t,doc:n})}catch(n){let\x20o=n\x20instanceof\x20Error?n.message:String(n);postMessage({type:\x22error\x22,id:t,message:o})}};})();\x0a'],{'type':'text/javascript'})),this[d4(0x2cf)]=new Worker(this[d4(0x2e5)]),this['worker']['onmessage']=c=>{const d5=d4,{type:d,id:f,doc:g,message:h}=c['data'],i=this['pending']['get'](f);i&&(this['pending']['delete'](f),d==='result'?i['resolve'](this[d5(0x236)](g)):d==='error'&&i['reject'](new Error(h??'Worker\x20parse\x20failed')));},this['worker']['onerror']=c=>{const d6=d4,d=new Error(c[d6(0x284)]??'Worker\x20error');for(const [,f]of this['pending'])f[d6(0x214)](d);this[d6(0x322)]['clear'](),this['destroyWorker']();},this['worker']);}['parse'](c){return new Promise((d,f)=>{const d7=b,g=this[d7(0x27f)]++;this['pending']['set'](g,{'resolve':d,'reject':f});let h;try{h=this[d7(0x235)]();}catch(l){this['pending'][d7(0x32d)](g),f(l instanceof Error?l:new Error(String(l)));return;}const k={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](k,[c]):h['postMessage'](k);}catch(m){this['pending']['delete'](g),f(m instanceof Error?m:new Error(String(m)));}});}['terminate'](){const d8=aU;this['destroyWorker']();const c=new Error(d8(0x247));for(const [,d]of this['pending'])d['reject'](c);this[d8(0x322)]['clear']();}[aU(0x233)](){const d9=aU;this[d9(0x2cf)]&&(this['worker']['terminate'](),this['worker']=null),this['blobUrl']&&(URL['revokeObjectURL'](this['blobUrl']),this['blobUrl']=null);}['reviveDocument'](c){const db=aU;return{...c,'layers':this[db(0x293)](c['layers']),'lineTypes':this[db(0x293)](c['lineTypes']),'styles':this[db(0x293)](c['styles']),'blocks':this[db(0x293)](c['blocks'])};}['ensureMap'](c){return c instanceof Map?c:c&&typeof c=='object'?new Map(Object['entries'](c)):new Map();}},wa=class{[aU(0x25d)];['renderer'];['camera'];['layerManager'];[aU(0x200)];['spatialIndex'];['measureTool'];['doc']=null;['options'];[aU(0x33c)];['inputHandler'];['resizeObserver'];[aU(0x239)];['workerManager']=null;[aU(0x224)]=-0x1;['renderPending']=!0x1;['destroyed']=!0x1;['loadGeneration']=0x0;[aU(0x2e6)]=0x0;[aU(0x281)]=0x0;['debugEnabled']=!0x1;[aU(0x21f)];['lastRenderStats']=null;['lastDebugStats']=null;['frameTimestamps']=[];['lastDoRenderTime']=0x0;['lastFrameTime']=0x0;['parseTime']=0x0;[aU(0x210)]=0x0;['loadedFileName']=null;['loadedFileSize']=0x0;['debugRafId']=0x0;constructor(c,d){const dc=aU;this['canvas']=c,this['options']={'theme':d?.['theme']??'dark','backgroundColor':d?.['backgroundColor'],'antialias':d?.['antialias']??!0x0,'minZoom':d?.['minZoom']??0.0001,'maxZoom':d?.['maxZoom']??0x186a0,'zoomSpeed':d?.[dc(0x222)]??1.1,'initialTool':d?.['initialTool']??'pan'},this['formatConverters']=d?.['formatConverters']??[],d?.[dc(0x2cf)]&&(this['workerManager']=new Pa()),d?.['debug']?(this['debugEnabled']=!0x0,this['debugOptions']=ne(typeof d['debug']=='boolean'?void 0x0:d['debug'])):this['debugOptions']=ne(),this['renderer']=new na(c),this['camera']=new yt(this[dc(0x221)]),this[dc(0x33e)]=new ca(),this['emitter']=new ha(),this['spatialIndex']=new fa(),this['measureTool']=new xa(),this['currentTool']=this[dc(0x221)]['initialTool'],this['inputHandler']=new ua(c,this),this['resizeObserver']=new ResizeObserver(()=>this[dc(0x325)]()),this['resizeObserver']['observe'](c),c[dc(0x21e)]['cursor']=this['getCursorForTool'](this['currentTool']),this[dc(0x243)](),this['debugEnabled']&&this['startDebugLoop']();}['guardDestroyed'](){if(this['destroyed'])throw new Error('CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.');}async['runConverters'](c){const dd=aU;for(const d of this['formatConverters']){let f=!0x1;try{f=d['detect'](c);}catch{continue;}if(f)return d[dd(0x24e)](c);}return null;}async['loadFile'](c){const df=aU;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=c[df(0x2d4)],this['loadedFileSize']=c['size'];const f=await c['arrayBuffer']();if(this['destroyed']||d!==this[df(0x2dd)])return;const g=await this['runConverters'](f);if(this['destroyed']||d!==this['loadGeneration'])return;const h=performance['now'](),i=g??f;this['doc']=await this['parseWithOptionalWorker'](i,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-h,this['onDocumentLoaded']());}async['loadBuffer'](c){const dg=aU;this['guardDestroyed']();const d=++this[dg(0x2dd)];this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const f=await this['runConverters'](c);if(this[dg(0x2db)]||d!==this[dg(0x2dd)])return;const g=performance['now'](),h=f??c;this['doc']=await this['parseWithOptionalWorker'](h,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-g,this['onDocumentLoaded']());}async['parseWithOptionalWorker'](c,d){const dh=aU;if(!this[dh(0x2f5)])return ae(c);try{return await this['workerManager']['parse'](c);}catch(f){if(this['destroyed']||d!==this[dh(0x2dd)])return null;throw f;}}['loadDocument'](c){const di=aU;if(this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=0x0,this[di(0x230)]=0x0,!c||!Array['isArray'](c['entities'])||!(c['layers']instanceof Map))throw new Error('CadViewer:\x20invalid\x20DxfDocument\x20—\x20expected\x20entities\x20array\x20and\x20layers\x20Map.');this['doc']=c,this['onDocumentLoaded']();}['loadString'](c){const dj=aU;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c[dj(0x2c0)];const d=performance['now']();this[dj(0x21c)]=ae(c),this['parseTime']=performance[dj(0x2da)]()-d,this['onDocumentLoaded']();}['loadArrayBuffer'](c){const dk=aU;this[dk(0x258)](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const d=performance['now']();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}[aU(0x2ba)](){const dl=aU;this[dl(0x258)](),++this['loadGeneration'],this['doc']=null,this['selectedEntityIndex']=-0x1,this['spatialIndex']['clear'](),ve(),this[dl(0x33e)]['clear'](),this['measureTool']['deactivate'](),this[dl(0x243)]();}[aU(0x2aa)](){const dm=aU;if(!this['doc'])return;this['layerManager']['setLayers'](this['doc']['layers']);const c=performance['now']();this['spatialIndex']['build'](this['doc']['entities'],this['doc']),_t(Ot(this['doc'])),this['spatialIndexBuildTime']=performance['now']()-c,this[dm(0x224)]=-0x1,this['measureTool']['deactivate'](),this['currentTool']==='measure'&&this['measureTool']['activate'](),this['fitToView']();}['fitToView'](){const dn=aU;if(this['guardDestroyed'](),!this['doc'])return;const c=this['computeDocumentBounds']();if(!c)return;const d=this['canvas'][dn(0x21a)]();this['camera']['setTransform'](xt(d['width'],d['height'],c['minX'],c['minY'],c['maxX'],c['maxY'])),this['requestRender'](),this['emitter']['emit']('viewchange',this[dn(0x288)]['getTransform']());}[aU(0x205)](c){const dp=aU;this['guardDestroyed']();const d=this['canvas'][dp(0x21a)](),f=d['width']/0x2,g=d[dp(0x301)]/0x2,h=c/this['camera'][dp(0x328)]()[dp(0x2fe)];this['camera']['zoom'](f,g,h),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['panTo'](c,d){const dq=aU;this['guardDestroyed']();const f=this['canvas']['getBoundingClientRect'](),g=this['camera']['getTransform'](),h=c*g['scale']+g['offsetX'],k=-d*g['scale']+g['offsetY'],l=f['width']/0x2-h,m=f[dq(0x301)]/0x2-k;this[dq(0x288)]['pan'](l,m),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['getViewTransform'](){return{...this['camera']['getTransform']()};}['getZoomSpeed'](){return this['options']['zoomSpeed'];}['getLayers'](){return this['layerManager']['getAllLayers']();}['setLayerVisible'](c,d){const dr=aU;this[dr(0x258)](),this['layerManager']['setVisible'](c,d),this['requestRender']();}['setLayerColor'](c,d){this['guardDestroyed'](),this['layerManager']['setColorOverride'](c,d),this['requestRender']();}['setTheme'](c){this['guardDestroyed'](),this['options']['theme']=c,this['requestRender']();}['getTheme'](){return this['options']['theme'];}['setBackgroundColor'](c){const ds=aU;this['guardDestroyed'](),this[ds(0x221)]['backgroundColor']=c,this['requestRender']();}['setTool'](c){const du=aU;this['guardDestroyed'](),this['currentTool']==='measure'&&c!=='measure'&&this['measureTool']['deactivate'](),this['currentTool']=c,this['canvas']['style']['cursor']=this['getCursorForTool'](c),c===du(0x33f)&&this['measureTool']['activate'](),c!=='select'&&(this[du(0x224)]=-0x1),this[du(0x243)]();}[aU(0x21d)](){return this['currentTool'];}['getCursorForTool'](c){const dv=aU;switch(c){case'pan':return'grab';case dv(0x2ca):return'crosshair';case dv(0x33f):return'crosshair';}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){this['emitter']['off'](c,d);}['getDocument'](){return this['doc'];}['getEntities'](){return this['doc']?.['entities']??[];}['resize'](){const dw=aU;this['renderer'][dw(0x2ea)](),this['requestRender']();}[aU(0x1eb)](){const dx=aU;this[dx(0x2db)]=!0x0,this['stopDebugLoop'](),this['inputHandler']['destroy'](),this['resizeObserver']['disconnect'](),this['renderer']['destroy'](),this['emitter']['removeAllListeners'](),this[dx(0x334)][dx(0x229)](),ve(),this[dx(0x33e)]['clear'](),this['workerManager']?.['terminate'](),this['workerManager']=null,this['doc']=null;}['requestRender'](){const dy=aU;if(!this['destroyed']){if(this[dy(0x33b)]){this['doRender']();return;}this[dy(0x2b5)]||(this['renderPending']=!0x0,requestAnimationFrame(()=>{this['renderPending']=!0x1,!this['destroyed']&&this['doRender']();}));}}['doRender'](){const dz=aU;if(!this['doc']){this['renderer']['renderEmpty'](this[dz(0x221)]['theme']);return;}const d=this['camera']['getTransform'](),f=this['renderer'][dz(0x2af)](),g=this['renderer']['getHeight'](),k=this['computeViewportBounds'](d,f,g),m=this['spatialIndex']['search'](k['minX'],k[dz(0x298)],k['maxX'],k['maxY']),p=new Set();for(let x=0x0;x<m['length'];x++)p['add'](m[x]['entityIndex']);const u=performance['now'](),v=this['renderer']['render'](this['doc'],d,this[dz(0x221)]['theme'],this['layerManager']['getVisibleLayerNames'](),this['selectedEntityIndex'],p,this['spatialIndex'][dz(0x319)]());this['lastFrameTime']=performance[dz(0x2da)]()-u,this['lastRenderStats']=v;const w=performance['now']();for(w-this['lastDoRenderTime']>=0x3&&this['frameTimestamps']['push'](w),this[dz(0x30e)]=w;this['frameTimestamps']['length']>0x0&&this['frameTimestamps'][0x0]<w-0x3e8;)this['frameTimestamps']['shift']();if(this['currentTool']==='measure'&&this[dz(0x333)]['state']['phase']!=='idle'){const z=this['renderer'][dz(0x273)]();ka(z,this['camera']['getTransform'](),this['measureTool'],this['mouseScreenX'],this['mouseScreenY'],this[dz(0x221)]['theme']);}if(this['debugEnabled']){const A=this['renderer']['getContext'](),C=this['buildDebugStats']();this['lastDebugStats']=C,la(A,C,this['options']['theme'],this['debugOptions'],this[dz(0x2ab)]['getWidth'](),this[dz(0x2ab)]['getHeight']());}}['setDebug'](c){this['guardDestroyed'](),typeof c=='boolean'?this['debugEnabled']=c:(this['debugEnabled']=!0x0,this['debugOptions']=ne(c)),this['debugEnabled']?this['startDebugLoop']():(this['stopDebugLoop'](),this['requestRender']());}['startDebugLoop'](){const dB=aU;if(this['debugRafId'])return;const c=()=>{const dA=b;if(!this[dA(0x317)]||this['destroyed']){this['debugRafId']=0x0;return;}this['doRender'](),this['debugRafId']=requestAnimationFrame(c);};this[dB(0x33b)]=requestAnimationFrame(c);}['stopDebugLoop'](){this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this['debugRafId']=0x0);}['getDebugStats'](){return this['debugEnabled']?this['lastDebugStats']:null;}['buildDebugStats'](){const dC=aU,c=this['camera']['getTransform'](),d=this[dC(0x2ab)]['getWidth'](),f=this['renderer']['getHeight'](),g=this[dC(0x1e4)](c,d,f);return{'fps':this['frameTimestamps']['length'],'frameTime':this['lastFrameTime'],'renderStats':this['lastRenderStats']??{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':this['doc']?.['entities']['length']??0x0,'layerCount':this['doc']?.['layers']['size']??0x0,'visibleLayerCount':this['layerManager']['getVisibleLayerNames']()['size'],'blockCount':this[dC(0x21c)]?.[dC(0x283)][dC(0x316)]??0x0,'parseTime':this[dC(0x230)],'spatialIndexBuildTime':this['spatialIndexBuildTime'],'totalLoadTime':this['parseTime']+this['spatialIndexBuildTime'],'zoom':c['scale'],'pixelSize':c['scale']>0x0?0x1/c[dC(0x2fe)]:0x0,'viewportBounds':g,'fileName':this['loadedFileName'],'fileSize':this[dC(0x2e2)],'dxfVersion':this[dC(0x21c)]?.['header']['acadVersion']??null};}[aU(0x1e4)](c,d,f){const dD=aU,[g,h]=q(c,0x0,f),[k,l]=q(c,d,0x0);return{'minX':Math['min'](g,k),'minY':Math[dD(0x1f9)](h,l),'maxX':Math[dD(0x28e)](g,k),'maxY':Math['max'](h,l)};}['handlePan'](c,d){const dE=aU;this['camera']['pan'](c,d),this['requestRender'](),this['emitter']['emit'](dE(0x2b4),this['camera'][dE(0x328)]());}['handleZoom'](c,d,f){const dF=aU;this['camera']['zoom'](c,d,f),this['requestRender'](),this[dF(0x200)]['emit']('viewchange',this[dF(0x288)]['getTransform']());}['handleClick'](c,d){const dG=aU;if(!this[dG(0x21c)])return;const f=this['camera']['getTransform'](),[g,h]=q(f,c,d);switch(this[dG(0x33c)]){case'select':this[dG(0x314)](g,h,c,d);break;case'measure':{const k=ke(g,h,this[dG(0x21c)][dG(0x31e)],this['spatialIndex'],f['scale']),l=k['length']>0x0?k[0x0]:null,m=this['measureTool']['handleClick'](g,h,l);this['requestRender'](),m&&this[dG(0x200)][dG(0x2fa)]('measure',m);break;}}}['handleMouseMove'](c,d){const dH=aU;if(this['mouseScreenX']=c,this['mouseScreenY']=d,this['currentTool']==='measure'&&this['doc']){const f=this['camera']['getTransform'](),[g,h]=q(f,c,d),i=ke(g,h,this[dH(0x21c)]['entities'],this[dH(0x334)],f[dH(0x2fe)]);this['measureTool']['handleMove'](i[0x0]??null),this['requestRender']();}}[aU(0x314)](c,d,f,g){const dI=aU;if(!this[dI(0x21c)])return;const h=pa(c,d,this['doc'][dI(0x31e)],this[dI(0x334)],this['layerManager'][dI(0x2ad)](),this[dI(0x288)]['getTransform']()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this['doc']){const i=this['doc']['entities'][h];i&&this['emitter']['emit']('select',{'entity':i,'entityIndex':h,'worldPoint':{'x':c,'y':d},'screenPoint':{'x':f,'y':g}});}}['computeDocumentBounds'](){const dJ=aU;return this['doc']?this['doc']['header'][dJ(0x2d9)]&&this['doc'][dJ(0x332)]['extMax']?{'minX':this['doc'][dJ(0x332)]['extMin']['x'],'minY':this['doc']['header']['extMin']['y'],'maxX':this['doc']['header']['extMax']['x'],'maxY':this['doc']['header'][dJ(0x223)]['y']}:Rt(this['doc']['entities']):null;}};export{wa as CadViewer,yt as Camera,na as CanvasRenderer,T as DxfParseError,ha as EventEmitter,ca as LayerManager,xa as MeasureTool,fa as SpatialIndex,E as THEMES,Ft as aciToHex,me as applyTransform,Rt as computeEntitiesBounds,B as computeEntityBBox,J as drawEntity,ke as findSnaps,xt as fitToView,pa as hitTest,ae as parseDxf,la as renderDebugOverlay,ka as renderMeasureOverlay,se as resolveEntityColor,q as screenToWorld,W as worldToScreen,kt as zoomAtPoint};
|
|
1
|
+
const b2=b;(function(c,d){const aS=b,e=c();while(!![]){try{const f=-parseInt(aS(0x158))/0x1*(parseInt(aS(0x28c))/0x2)+-parseInt(aS(0x204))/0x3+-parseInt(aS(0x207))/0x4+-parseInt(aS(0x21c))/0x5+-parseInt(aS(0x1c5))/0x6+-parseInt(aS(0x1f4))/0x7*(-parseInt(aS(0x155))/0x8)+parseInt(aS(0x15a))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x562b6));function Pe(g,k,m=0x0,p=g['length']-0x1,v=De){const aT=b;for(;p>m;){if(p-m>0x258){const A=p-m+0x1,C=k-m+0x1,D=Math['log'](A),F=0.5*Math['exp'](0x2*D/0x3),I=0.5*Math['sqrt'](D*F*(A-F)/A)*(C-A/0x2<0x0?-0x1:0x1),L=Math[aT(0x165)](m,Math['floor'](k-C*F/A+I)),M=Math['min'](p,Math['floor'](k+(A-C)*F/A+I));Pe(g,k,L,M,v);}const w=g[k];let x=m,z=p;for(_(g,m,k),v(g[p],w)>0x0&&_(g,m,p);x<z;){for(_(g,x,z),x++,z--;v(g[x],w)<0x0;)x++;for(;v(g[z],w)>0x0;)z--;}v(g[m],w)===0x0?_(g,m,z):(z++,_(g,z,p)),z<=k&&(m=z+0x1),k<=z&&(p=z-0x1);}}function _(c,d,f){const g=c[d];c[d]=c[f],c[f]=g;}function De(c,d){return c<d?-0x1:c>d?0x1:0x0;}class Le{constructor(c=0x9){const aU=b;this[aU(0x297)]=Math['max'](0x4,c),this[aU(0x259)]=Math['max'](0x2,Math['ceil'](this['_maxEntries']*0.4)),this['clear']();}['all'](){return this['_all'](this['data'],[]);}['search'](d){const aV=b;let e=this['data'];const f=[];if(!G(d,e))return f;const g=this['toBBox'],h=[];for(;e;){for(let k=0x0;k<e[aV(0x280)]['length'];k++){const l=e['children'][k],m=e['leaf']?g(l):l;G(d,m)&&(e[aV(0x1fc)]?f['push'](l):te(d,m)?this['_all'](l,f):h['push'](l));}e=h['pop']();}return f;}['collides'](c){const aW=b;let d=this['data'];if(!G(c,d))return!0x1;const e=[];for(;d;){for(let f=0x0;f<d['children']['length'];f++){const g=d['children'][f],h=d['leaf']?this['toBBox'](g):g;if(G(c,h)){if(d[aW(0x1fc)]||te(c,h))return!0x0;e['push'](g);}}d=e['pop']();}return!0x1;}['load'](c){const aX=b;if(!(c&&c['length']))return this;if(c[aX(0x1bd)]<this[aX(0x259)]){for(let e=0x0;e<c['length'];e++)this['insert'](c[e]);return this;}let d=this['_build'](c[aX(0x16b)](),0x0,c['length']-0x1,0x0);if(!this[aX(0x276)]['children']['length'])this['data']=d;else{if(this[aX(0x276)][aX(0x26b)]===d['height'])this['_splitRoot'](this['data'],d);else{if(this['data']['height']<d['height']){const f=this['data'];this['data']=d,d=f;}this['_insert'](d,this['data']['height']-d['height']-0x1,!0x0);}}return this;}['insert'](c){const aY=b;return c&&this['_insert'](c,this[aY(0x276)][aY(0x26b)]-0x1),this;}['clear'](){const aZ=b;return this[aZ(0x276)]=O([]),this;}['remove'](d,e){const b0=b;if(!d)return this;let f=this['data'];const g=this['toBBox'](d),k=[],m=[];let p,u,v;for(;f||k['length'];){if(f||(f=k['pop'](),u=k[k['length']-0x1],p=m['pop'](),v=!0x0),f['leaf']){const w=Ne(d,f['children'],e);if(w!==-0x1)return f['children']['splice'](w,0x1),k['push'](f),this['_condense'](k),this;}!v&&!f['leaf']&&te(f,g)?(k['push'](f),m['push'](p),p=0x0,u=f,f=f[b0(0x280)][0x0]):u?(p++,f=u['children'][p],v=!0x1):f=null;}return this;}['toBBox'](c){return c;}['compareMinX'](c,d){return c['minX']-d['minX'];}['compareMinY'](c,d){const b1=b;return c[b1(0x294)]-d['minY'];}[b2(0x29f)](){const b3=b2;return this[b3(0x276)];}['fromJSON'](c){return this['data']=c,this;}['_all'](c,d){const e=[];for(;c;)c['leaf']?d['push'](...c['children']):e['push'](...c['children']),c=e['pop']();return d;}['_build'](e,g,k,m){const b4=b2,p=k-g+0x1;let v=this['_maxEntries'],w;if(p<=v)return w=O(e['slice'](g,k+0x1)),R(w,this['toBBox']),w;m||(m=Math[b4(0x205)](Math['log'](p)/Math['log'](v)),v=Math['ceil'](p/Math['pow'](v,m-0x1))),w=O([]),w['leaf']=!0x1,w['height']=m;const x=Math['ceil'](p/v),z=x*Math[b4(0x205)](Math[b4(0x1ff)](v));de(e,g,k,z,this['compareMinX']);for(let A=g;A<=k;A+=z){const C=Math['min'](A+z-0x1,k);de(e,A,C,x,this['compareMinY']);for(let D=A;D<=C;D+=x){const F=Math['min'](D+x-0x1,C);w[b4(0x280)]['push'](this['_build'](e,D,F,m-0x1));}}return R(w,this[b4(0x176)]),w;}['_chooseSubtree'](d,e,f,g){const b5=b2;for(;g['push'](e),!(e[b5(0x1fc)]||g['length']-0x1===f);){let k=0x1/0x0,m=0x1/0x0,p;for(let v=0x0;v<e['children']['length'];v++){const w=e['children'][v],x=ee(w),z=Ye(d,w)-x;z<m?(m=z,k=x<k?x:k,p=w):z===m&&x<k&&(k=x,p=w);}e=p||e['children'][0x0];}return e;}['_insert'](c,d,e){const b6=b2,f=e?c:this['toBBox'](c),g=[],h=this['_chooseSubtree'](f,this['data'],d,g);for(h[b6(0x280)]['push'](c),j(h,f);d>=0x0&&g[d]['children']['length']>this['_maxEntries'];)this['_split'](g,d),d--;this['_adjustParentBBoxes'](f,g,d);}['_split'](c,d){const b7=b2,e=c[d],f=e['children'][b7(0x1bd)],g=this['_minEntries'];this['_chooseSplitAxis'](e,g,f);const h=this['_chooseSplitIndex'](e,g,f),k=O(e[b7(0x280)]['splice'](h,e['children']['length']-h));k['height']=e['height'],k['leaf']=e['leaf'],R(e,this['toBBox']),R(k,this['toBBox']),d?c[d-0x1]['children']['push'](k):this['_splitRoot'](e,k);}[b2(0x1c4)](c,d){const b8=b2;this['data']=O([c,d]),this['data'][b8(0x26b)]=c['height']+0x1,this['data']['leaf']=!0x1,R(this['data'],this['toBBox']);}['_chooseSplitIndex'](d,e,f){let g,k=0x1/0x0,m=0x1/0x0;for(let p=e;p<=f-e;p++){const v=$(d,0x0,p,this['toBBox']),w=$(d,p,f,this['toBBox']),x=ze(v,w),z=ee(v)+ee(w);x<k?(k=x,g=p,m=z<m?z:m):x===k&&z<m&&(m=z,g=p);}return g||f-e;}['_chooseSplitAxis'](c,d,e){const b9=b2,f=c[b9(0x1fc)]?this[b9(0x172)]:Be,g=c['leaf']?this['compareMinY']:Xe,h=this[b9(0x201)](c,d,e,f),k=this['_allDistMargin'](c,d,e,g);h<k&&c[b9(0x280)]['sort'](f);}['_allDistMargin'](d,e,f,g){const bb=b2;d['children'][bb(0x2a4)](g);const k=this[bb(0x176)],m=$(d,0x0,e,k),p=$(d,f-e,f,k);let u=U(m)+U(p);for(let v=e;v<f-e;v++){const w=d['children'][v];j(m,d[bb(0x1fc)]?k(w):w),u+=U(m);}for(let x=f-e-0x1;x>=e;x--){const z=d['children'][x];j(p,d['leaf']?k(z):z),u+=U(p);}return u;}['_adjustParentBBoxes'](c,d,e){for(let f=e;f>=0x0;f--)j(d[f],c);}[b2(0x163)](c){const bc=b2;for(let d=c['length']-0x1,e;d>=0x0;d--)c[d]['children'][bc(0x1bd)]===0x0?d>0x0?(e=c[d-0x1]['children'],e['splice'](e['indexOf'](c[d]),0x1)):this['clear']():R(c[d],this['toBBox']);}}function Ne(c,d,f){const bd=b2;if(!f)return d[bd(0x187)](c);for(let g=0x0;g<d['length'];g++)if(f(c,d[g]))return g;return-0x1;}function R(c,d){$(c,0x0,c['children']['length'],d,c);}function $(c,d,f,g,h){const bf=b2;h||(h=O(null)),h['minX']=0x1/0x0,h['minY']=0x1/0x0,h[bf(0x235)]=-0x1/0x0,h['maxY']=-0x1/0x0;for(let k=d;k<f;k++){const l=c['children'][k];j(h,c['leaf']?g(l):l);}return h;}function j(c,d){const bg=b2;return c['minX']=Math['min'](c['minX'],d['minX']),c['minY']=Math['min'](c['minY'],d[bg(0x294)]),c['maxX']=Math['max'](c['maxX'],d['maxX']),c['maxY']=Math[bg(0x165)](c[bg(0x1ce)],d['maxY']),c;}function Be(c,d){return c['minX']-d['minX'];}function Xe(c,d){return c['minY']-d['minY'];}function ee(c){return(c['maxX']-c['minX'])*(c['maxY']-c['minY']);}function U(c){const bh=b2;return c[bh(0x235)]-c['minX']+(c['maxY']-c['minY']);}function Ye(c,d){const bi=b2;return(Math['max'](d['maxX'],c[bi(0x235)])-Math['min'](d['minX'],c['minX']))*(Math['max'](d[bi(0x1ce)],c['maxY'])-Math['min'](d['minY'],c['minY']));}function ze(c,d){const bj=b2,f=Math[bj(0x165)](c['minX'],d['minX']),g=Math['max'](c['minY'],d[bj(0x294)]),h=Math['min'](c['maxX'],d[bj(0x235)]),i=Math['min'](c['maxY'],d['maxY']);return Math[bj(0x165)](0x0,h-f)*Math[bj(0x165)](0x0,i-g);}function te(c,d){const bk=b2;return c['minX']<=d['minX']&&c['minY']<=d['minY']&&d['maxX']<=c['maxX']&&d[bk(0x1ce)]<=c['maxY'];}function G(c,d){const bl=b2;return d[bl(0x1f0)]<=c[bl(0x235)]&&d['minY']<=c['maxY']&&d[bl(0x235)]>=c['minX']&&d['maxY']>=c['minY'];}function O(c){return{'children':c,'height':0x1,'leaf':!0x0,'minX':0x1/0x0,'minY':0x1/0x0,'maxX':-0x1/0x0,'maxY':-0x1/0x0};}function de(c,d,f,g,h){const bm=b2,k=[d,f];for(;k['length'];){if(f=k[bm(0x1ad)](),d=k['pop'](),f-d<=g)continue;const l=d+Math['ceil']((f-d)/g/0x2)*g;Pe(c,l,d,f,h),k['push'](d,l,l,f);}}function Re(d){const bn=b2,f=d['replace'](/\r\n?/g,'\x0a'),g=[],h=f['length'];let k=0x0;for(;k<h;){for(;k<h&&f['charCodeAt'](k)===0xa;)k++;if(k>=h)break;let l=f['indexOf']('\x0a',k);l===-0x1&&(l=h);const m=f['substring'](k,l)[bn(0x22f)]();k=l+0x1;const p=parseInt(m,0xa);if(isNaN(p)){k<h&&(l=f['indexOf']('\x0a',k),l===-0x1&&(l=h),k=l+0x1);continue;}if(k>=h)break;l=f['indexOf']('\x0a',k),l===-0x1&&(l=h);const u=f['substring'](k,l)['replace'](/\s+$/,'');k=l+0x1,g['push']({'code':p,'value':u});}return g;}function Oe(c,d,f){const bo=b2;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g[bo(0x19a)]==='ENDSEC')return d+0x1;if(g['code']===0x9){const h=g[bo(0x19a)];switch(d++,h){case bo(0x24d):d<c['length']&&(f['acadVersion']=c[d][bo(0x19a)],d++);break;case'$EXTMIN':if(d<c['length']){const i=fe(c,d);f['extMin']=i['point'],d=i['nextIndex'];}break;case'$EXTMAX':if(d<c['length']){const k=fe(c,d);f['extMax']=k[bo(0x248)],d=k['nextIndex'];}break;case'$INSUNITS':d<c['length']&&(f['insUnits']=parseInt(c[d]['value'],0xa),d++);break;case'$MEASUREMENT':d<c['length']&&(f['measurement']=parseInt(c[d]['value'],0xa),d++);break;case'$LTSCALE':d<c['length']&&(f['ltScale']=parseFloat(c[d][bo(0x19a)]),d++);break;case bo(0x189):d<c['length']&&(f['dwgCodePage']=c[d][bo(0x19a)],d++);break;case'$HANDSEED':d<c[bo(0x1bd)]&&(f[bo(0x161)]=c[d]['value'],d++);break;default:for(;d<c['length']&&c[d]['code']!==0x9&&c[d][bo(0x236)]!==0x0;)f[h]=c[d]['value'],d++;}}else d++;}return d;}function fe(c,d){const bp=b2,f={'x':0x0,'y':0x0,'z':0x0};for(;d<c[bp(0x1bd)];){const g=c[d][bp(0x236)];if(g===0xa)f['x']=parseFloat(c[d]['value']),d++;else{if(g===0x14)f['y']=parseFloat(c[d]['value']),d++;else{if(g===0x1e)f['z']=parseFloat(c[d]['value']),d++;else break;}}}return{'point':f,'nextIndex':d};}function _e(c,d,f){const bq=b2;for(;d<c['length'];){const g=c[d];if(g[bq(0x236)]===0x0&&g['value']==='ENDSEC')return d+0x1;if(g['code']===0x0&&g['value']==='TABLE'){if(d++,d>=c[bq(0x1bd)])break;const h=c[d]['value'];switch(d++,h){case'LAYER':d=$e(c,d,f['layers']);break;case'LTYPE':d=je(c,d,f[bq(0x1d0)]);break;case'STYLE':d=qe(c,d,f['styles']);break;default:d=We(c,d);break;}}else d++;}return d;}function We(c,d){const br=b2;for(;d<c[br(0x1bd)];){if(c[d]['code']===0x0&&c[d]['value']==='ENDTAB')return d+0x1;d++;}return d;}function $e(c,d,f){const bs=b2;for(;d<c[bs(0x1bd)];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']===bs(0x178)){d++;const h={'name':'0','color':0x7,'lineType':'Continuous','flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x6:h['lineType']=i['value'];break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;case 0x46:h['flags']=parseInt(i['value'],0xa);break;case 0x172:h['lineWeight']=parseInt(i[bs(0x19a)],0xa);break;case 0x1a4:h[bs(0x1c8)]=parseInt(i['value'],0xa);break;}d++;}f[bs(0x18c)](h['name'],h);}else d++;}return d;}function je(c,d,f){const bu=b2;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDTAB')return d+0x1;if(g['code']===0x0&&g['value']==='LTYPE'){d++;const h={'name':'','description':'','pattern':[],'totalLength':0x0};for(;d<c[bu(0x1bd)]&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h[bu(0x1a5)]=i['value'];break;case 0x3:h['description']=i['value'];break;case 0x28:h['totalLength']=parseFloat(i[bu(0x19a)]);break;case 0x31:h['pattern']['push'](parseFloat(i['value']));break;}d++;}h['name']&&f['set'](h['name'],h);}else d++;}return d;}function qe(c,d,f){const bv=b2;for(;d<c['length'];){const g=c[d];if(g['code']===0x0&&g['value']===bv(0x1c9))return d+0x1;if(g['code']===0x0&&g['value']===bv(0x258)){d++;const h={'name':'','fontName':'','bigFontName':'','height':0x0,'widthFactor':0x1,'obliqueAngle':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x3:h['fontName']=i['value'];break;case 0x4:h['bigFontName']=i['value'];break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x29:h[bv(0x231)]=parseFloat(i['value']);break;case 0x32:h['obliqueAngle']=parseFloat(i['value']);break;}d++;}h[bv(0x1a5)]&&f['set'](h[bv(0x1a5)],h);}else d++;}return d;}function P(c){const bw=b2,d={'type':'','layer':'0','color':0x100,'lineType':'BYLAYER','lineTypeScale':0x1,'lineWeight':-0x1,'visible':!0x0,'extrusion':{'x':0x0,'y':0x0,'z':0x1}};for(const f of c)switch(f['code']){case 0x5:d[bw(0x284)]=f['value'];break;case 0x8:d[bw(0x233)]=f[bw(0x19a)];break;case 0x6:d[bw(0x216)]=f['value'];break;case 0x30:d['lineTypeScale']=parseFloat(f['value']);break;case 0x3c:d['visible']=f[bw(0x19a)]==='0'||f[bw(0x19a)]==='';break;case 0x3e:d[bw(0x1d9)]=parseInt(f['value'],0xa);break;case 0x172:d['lineWeight']=parseInt(f['value'],0xa);break;case 0x1a4:d[bw(0x1c8)]=parseInt(f[bw(0x19a)],0xa);break;case 0xd2:d['extrusion']['x']=parseFloat(f['value']);break;case 0xdc:d['extrusion']['y']=parseFloat(f[bw(0x19a)]);break;case 0xe6:d['extrusion']['z']=parseFloat(f['value']);break;}return d;}function He(c){const bx=b2,d={...P(c),'type':'LINE','start':{'x':0x0,'y':0x0,'z':0x0},'end':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d[bx(0x196)]['x']=parseFloat(f[bx(0x19a)]);break;case 0x14:d['start']['y']=parseFloat(f['value']);break;case 0x1e:d['start']['z']=parseFloat(f['value']);break;case 0xb:d[bx(0x274)]['x']=parseFloat(f['value']);break;case 0x15:d['end']['y']=parseFloat(f['value']);break;case 0x1f:d['end']['z']=parseFloat(f['value']);break;}return d;}function Ve(c){const by=b2,d={...P(c),'type':'CIRCLE','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0};for(const f of c)switch(f['code']){case 0xa:d[by(0x28e)]['x']=parseFloat(f[by(0x19a)]);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0x28:d[by(0x162)]=parseFloat(f['value']);break;}return d;}function Ue(c){const bz=b2,d={...P(c),'type':'ARC','center':{'x':0x0,'y':0x0,'z':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d[bz(0x28e)]['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0x28:d['radius']=parseFloat(f[bz(0x19a)]);break;case 0x32:d['startAngle']=parseFloat(f['value']);break;case 0x33:d[bz(0x18f)]=parseFloat(f['value']);break;}return d;}function Ge(c){const bA=b2,d={...P(c),'type':'LWPOLYLINE','vertices':[],'closed':!0x1,'constantWidth':0x0,'elevation':0x0};let f=null;for(const g of c)switch(g[bA(0x236)]){case 0x46:d['closed']=(parseInt(g['value'],0xa)&0x1)!==0x0;break;case 0x26:d['elevation']=parseFloat(g['value']);break;case 0x2b:d['constantWidth']=parseFloat(g['value']);break;case 0xa:f&&d['vertices']['push'](f),f={'x':parseFloat(g['value']),'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};break;case 0x14:f&&(f['y']=parseFloat(g['value']));break;case 0x28:f&&(f['startWidth']=parseFloat(g['value']));break;case 0x29:f&&(f['endWidth']=parseFloat(g[bA(0x19a)]));break;case 0x2a:f&&(f[bA(0x1fb)]=parseFloat(g[bA(0x19a)]));break;}return f&&d['vertices']['push'](f),d;}function Ze(c){const bB=b2,d={...P(c),'type':'POLYLINE','vertices':[],'closed':!0x1,'is3d':!0x1};for(const f of c)switch(f[bB(0x236)]){case 0x46:{const g=parseInt(f['value'],0xa);d['closed']=(g&0x1)!==0x0,d['is3d']=(g&0x8)!==0x0;break;}}return d;}function Ke(c){const bC=b2,d={...P(c),'type':'ELLIPSE','center':{'x':0x0,'y':0x0,'z':0x0},'majorAxis':{'x':0x1,'y':0x0,'z':0x0},'minorRatio':0x1,'startParam':0x0,'endParam':Math['PI']*0x2};for(const f of c)switch(f['code']){case 0xa:d['center']['x']=parseFloat(f['value']);break;case 0x14:d['center']['y']=parseFloat(f['value']);break;case 0x1e:d['center']['z']=parseFloat(f['value']);break;case 0xb:d[bC(0x1f1)]['x']=parseFloat(f['value']);break;case 0x15:d['majorAxis']['y']=parseFloat(f['value']);break;case 0x1f:d['majorAxis']['z']=parseFloat(f['value']);break;case 0x28:d[bC(0x230)]=parseFloat(f['value']);break;case 0x29:d['startParam']=parseFloat(f['value']);break;case 0x2a:d['endParam']=parseFloat(f['value']);break;}return d;}function Qe(c){const bD=b2,d={...P(c),'type':'SPLINE','degree':0x3,'flags':0x0,'knots':[],'controlPoints':[],'fitPoints':[],'weights':[]};let f=null,g=null;for(const h of c)switch(h['code']){case 0x46:d['flags']=parseInt(h['value'],0xa);break;case 0x47:d['degree']=parseInt(h['value'],0xa);break;case 0x28:d['knots']['push'](parseFloat(h['value']));break;case 0x29:d['weights']['push'](parseFloat(h[bD(0x19a)]));break;case 0xa:f&&d[bD(0x247)]['push'](f),f={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x14:f&&(f['y']=parseFloat(h['value']));break;case 0x1e:f&&(f['z']=parseFloat(h['value']));break;case 0xb:g&&d['fitPoints'][bD(0x174)](g),g={'x':parseFloat(h['value']),'y':0x0,'z':0x0};break;case 0x15:g&&(g['y']=parseFloat(h['value']));break;case 0x1f:g&&(g['z']=parseFloat(h['value']));break;case 0xc:d['startTangent']||(d['startTangent']={'x':0x0,'y':0x0,'z':0x0}),d['startTangent']['x']=parseFloat(h['value']);break;case 0x16:d['startTangent']&&(d['startTangent']['y']=parseFloat(h[bD(0x19a)]));break;case 0x20:d['startTangent']&&(d['startTangent']['z']=parseFloat(h['value']));break;case 0xd:d['endTangent']||(d['endTangent']={'x':0x0,'y':0x0,'z':0x0}),d['endTangent']['x']=parseFloat(h['value']);break;case 0x17:d['endTangent']&&(d['endTangent']['y']=parseFloat(h['value']));break;case 0x21:d[bD(0x194)]&&(d['endTangent']['z']=parseFloat(h['value']));break;}return f&&d['controlPoints']['push'](f),g&&d['fitPoints']['push'](g),d;}function Je(c){const bE=b2,d={...P(c),'type':'TEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'widthFactor':0x1,'obliqueAngle':0x0,'style':bE(0x1f2),'hAlign':0x0,'vAlign':0x0,'generationFlags':0x0};for(const f of c)switch(f['code']){case 0x1:d['text']=f['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(f[bE(0x19a)]);break;case 0x1e:d['insertionPoint']['z']=parseFloat(f['value']);break;case 0xb:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['x']=parseFloat(f['value']);break;case 0x15:d[bE(0x270)]||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['y']=parseFloat(f['value']);break;case 0x1f:d['alignmentPoint']||(d['alignmentPoint']={'x':0x0,'y':0x0,'z':0x0}),d['alignmentPoint']['z']=parseFloat(f['value']);break;case 0x28:d['height']=parseFloat(f['value']);break;case 0x29:d['widthFactor']=parseFloat(f['value']);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x33:d['obliqueAngle']=parseFloat(f[bE(0x19a)]);break;case 0x7:d['style']=f['value'];break;case 0x47:d['generationFlags']=parseInt(f['value'],0xa);break;case 0x48:d['hAlign']=parseInt(f['value'],0xa);break;case 0x49:d['vAlign']=parseInt(f['value'],0xa);break;}return d;}function et(c){const bF=b2,d={...P(c),'type':'MTEXT','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'width':0x0,'attachmentPoint':0x1,'drawingDirection':0x1,'rotation':0x0,'lineSpacingStyle':0x1,'lineSpacingFactor':0x1,'style':'STANDARD','bgFill':0x0,'bgFillScale':1.5},f=[];for(const g of c)switch(g['code']){case 0x1:f['push'](g['value']);break;case 0x3:f['push'](g['value']);break;case 0x7:d['style']=g['value'];break;case 0xa:d['insertionPoint']['x']=parseFloat(g['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(g['value']);break;case 0x1e:d['insertionPoint']['z']=parseFloat(g['value']);break;case 0xb:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['x']=parseFloat(g['value']);break;case 0x15:d[bF(0x238)]||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['y']=parseFloat(g['value']);break;case 0x1f:d['textDirection']||(d['textDirection']={'x':0x0,'y':0x0,'z':0x0}),d['textDirection']['z']=parseFloat(g['value']);break;case 0x28:d['height']=parseFloat(g['value']);break;case 0x29:d['width']=parseFloat(g['value']);break;case 0x2c:d['lineSpacingFactor']=parseFloat(g['value']);break;case 0x32:d['rotation']=parseFloat(g['value']);break;case 0x47:d['attachmentPoint']=parseInt(g[bF(0x19a)],0xa);break;case 0x48:d['drawingDirection']=parseInt(g['value'],0xa);break;case 0x49:d['lineSpacingStyle']=parseInt(g['value'],0xa);break;case 0x5a:d['bgFill']=parseInt(g['value'],0xa);break;}return d['text']=f['join'](''),d;}function b(c,d){c=c-0x154;const e=a();let f=e[c];return f;}function tt(c){const bG=b2,d={...P(c),'type':'INSERT','blockName':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'scaleX':0x1,'scaleY':0x1,'scaleZ':0x1,'rotation':0x0,'columnCount':0x1,'rowCount':0x1,'columnSpacing':0x0,'rowSpacing':0x0,'attribs':[]};for(const f of c)switch(f['code']){case 0x2:d['blockName']=f[bG(0x19a)];break;case 0xa:d['insertionPoint']['x']=parseFloat(f['value']);break;case 0x14:d['insertionPoint']['y']=parseFloat(f['value']);break;case 0x1e:d[bG(0x1a6)]['z']=parseFloat(f['value']);break;case 0x29:d['scaleX']=parseFloat(f['value']);break;case 0x2a:d['scaleY']=parseFloat(f['value']);break;case 0x2b:d['scaleZ']=parseFloat(f['value']);break;case 0x2c:d['columnSpacing']=parseFloat(f['value']);break;case 0x2d:d['rowSpacing']=parseFloat(f['value']);break;case 0x32:d[bG(0x1d1)]=parseFloat(f['value']);break;case 0x46:d['columnCount']=parseInt(f[bG(0x19a)],0xa)||0x1;break;case 0x47:d['rowCount']=parseInt(f['value'],0xa)||0x1;break;}return d;}function at(c){const bH=b2,d={...P(c),'type':'DIMENSION','blockName':'','dimStyle':'STANDARD','dimType':0x0,'defPoint':{'x':0x0,'y':0x0,'z':0x0},'textMidpoint':{'x':0x0,'y':0x0,'z':0x0},'textOverride':'','rotation':0x0,'textRotation':0x0,'leaderLength':0x0};for(const f of c)switch(f['code']){case 0x1:d['textOverride']=f['value'];break;case 0x2:d['blockName']=f[bH(0x19a)];break;case 0x3:d['dimStyle']=f['value'];break;case 0xa:d['defPoint']['x']=parseFloat(f['value']);break;case 0x14:d['defPoint']['y']=parseFloat(f['value']);break;case 0x1e:d[bH(0x249)]['z']=parseFloat(f[bH(0x19a)]);break;case 0xb:d['textMidpoint']['x']=parseFloat(f['value']);break;case 0x15:d['textMidpoint']['y']=parseFloat(f['value']);break;case 0x1f:d['textMidpoint']['z']=parseFloat(f['value']);break;case 0xd:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint2']['x']=parseFloat(f['value']);break;case 0x17:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d[bH(0x2a3)]['y']=parseFloat(f['value']);break;case 0x21:d['defPoint2']||(d['defPoint2']={'x':0x0,'y':0x0,'z':0x0}),d[bH(0x2a3)]['z']=parseFloat(f['value']);break;case 0xe:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['x']=parseFloat(f['value']);break;case 0x18:d['defPoint3']||(d['defPoint3']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint3']['y']=parseFloat(f[bH(0x19a)]);break;case 0x22:d['defPoint3']||(d[bH(0x1f3)]={'x':0x0,'y':0x0,'z':0x0}),d[bH(0x1f3)]['z']=parseFloat(f['value']);break;case 0xf:d[bH(0x159)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['x']=parseFloat(f['value']);break;case 0x19:d[bH(0x159)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['y']=parseFloat(f[bH(0x19a)]);break;case 0x23:d[bH(0x159)]||(d['defPoint4']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint4']['z']=parseFloat(f['value']);break;case 0x10:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['x']=parseFloat(f['value']);break;case 0x1a:d['defPoint5']||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['y']=parseFloat(f[bH(0x19a)]);break;case 0x24:d[bH(0x19d)]||(d['defPoint5']={'x':0x0,'y':0x0,'z':0x0}),d['defPoint5']['z']=parseFloat(f['value']);break;case 0x28:d['leaderLength']=parseFloat(f[bH(0x19a)]);break;case 0x32:d['rotation']=parseFloat(f['value']);break;case 0x35:d['textRotation']=parseFloat(f['value']);break;case 0x46:d['dimType']=parseInt(f['value'],0xa);break;}return d;}function nt(c){const bI=b2,d={...P(c),'type':'HATCH','patternName':'','solidFill':!0x0,'associative':!0x1,'hatchStyle':0x0,'patternType':0x1,'patternAngle':0x0,'patternScale':0x1,'boundaryPaths':[]};let f=0x0;for(;f<c['length'];){const g=c[f];switch(g['code']){case 0x2:d['patternName']=g['value'];break;case 0x29:d['patternScale']=parseFloat(g['value']);break;case 0x34:d['patternAngle']=parseFloat(g[bI(0x19a)]);break;case 0x46:d['solidFill']=g[bI(0x19a)]==='1';break;case 0x47:d['associative']=g[bI(0x19a)]==='1';break;case 0x4b:d[bI(0x1c1)]=parseInt(g[bI(0x19a)],0xa);break;case 0x4c:d['patternType']=parseInt(g['value'],0xa);break;case 0x5b:{const h=parseInt(g['value'],0xa);f++;for(let k=0x0;k<h&&f<c['length'];k++){const l=rt(c,f);d['boundaryPaths']['push'](l['path']),f=l['nextIndex'];}continue;}}f++;}return d;}function rt(c,d){let f=0x0;return d<c['length']&&c[d]['code']===0x5c&&(f=parseInt(c[d]['value'],0xa),d++),(f&0x2)!==0x0?st(c,d,f):ot(c,d,f);}function st(c,d,f){const bJ=b2,g={'type':'polyline','vertices':[],'bulges':[],'flags':f};let h=!0x1;d<c['length']&&c[d]['code']===0x48&&(h=c[d][bJ(0x19a)]==='1',d++),d<c['length']&&c[d][bJ(0x236)]===0x49&&(g['isClosed']=c[d][bJ(0x19a)]==='1',d++);let k=0x0;d<c['length']&&c[d]['code']===0x5d&&(k=parseInt(c[d]['value'],0xa),d++);for(let l=0x0;l<k&&d<c['length'];l++){const m={'x':0x0,'y':0x0};c[d]['code']===0xa&&(m['x']=parseFloat(c[d]['value']),d++),d<c['length']&&c[d]['code']===0x14&&(m['y']=parseFloat(c[d][bJ(0x19a)]),d++),g['vertices']['push'](m),h&&d<c['length']&&c[d]['code']===0x2a?(g['bulges']['push'](parseFloat(c[d]['value'])),d++):h&&g['bulges']['push'](0x0);}for(;d<c['length']&&(c[d]['code']===0x61||c[d][bJ(0x236)]===0x14a);)if(c[d]['code']===0x61){const p=parseInt(c[d][bJ(0x19a)],0xa);d++;for(let u=0x0;u<p&&d<c['length']&&c[d]['code']===0x14a;u++)d++;}else d++;return{'path':g,'nextIndex':d};}function ot(g,k,m){const bK=b2,p={'type':'edges','edges':[],'flags':m};let v=0x0;k<g['length']&&g[k]['code']===0x5d&&(v=parseInt(g[k][bK(0x19a)],0xa),k++);for(let w=0x0;w<v&&k<g['length']&&g[k]['code']===0x48;w++){const x=parseInt(g[k]['value'],0xa);switch(k++,x){case 0x1:{const z={'type':'line','start':{'x':0x0,'y':0x0},'end':{'x':0x0,'y':0x0}};k<g['length']&&g[k][bK(0x236)]===0xa&&(z[bK(0x196)]['x']=parseFloat(g[k][bK(0x19a)]),k++),k<g['length']&&g[k]['code']===0x14&&(z[bK(0x196)]['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bK(0x236)]===0xb&&(z['end']['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(z['end']['y']=parseFloat(g[k]['value']),k++),p[bK(0x1e9)]['push'](z);break;}case 0x2:{const A={'type':'arc','center':{'x':0x0,'y':0x0},'radius':0x0,'startAngle':0x0,'endAngle':0x168,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(A['center']['x']=parseFloat(g[k][bK(0x19a)]),k++),k<g[bK(0x1bd)]&&g[k][bK(0x236)]===0x14&&(A['center']['y']=parseFloat(g[k][bK(0x19a)]),k++),k<g['length']&&g[k]['code']===0x28&&(A['radius']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x32&&(A['startAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x33&&(A['endAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k][bK(0x236)]===0x49&&(A['ccw']=g[k]['value']==='1',k++),p['edges']['push'](A);break;}case 0x3:{const C={'type':'ellipse','center':{'x':0x0,'y':0x0},'majorAxis':{'x':0x1,'y':0x0},'minorRatio':0x1,'startAngle':0x0,'endAngle':Math['PI']*0x2,'ccw':!0x0};k<g['length']&&g[k]['code']===0xa&&(C[bK(0x28e)]['x']=parseFloat(g[k][bK(0x19a)]),k++),k<g['length']&&g[k]['code']===0x14&&(C['center']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0xb&&(C[bK(0x1f1)]['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x15&&(C['majorAxis']['y']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x28&&(C['minorRatio']=parseFloat(g[k][bK(0x19a)]),k++),k<g['length']&&g[k]['code']===0x32&&(C['startAngle']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x33&&(C[bK(0x18f)]=parseFloat(g[k][bK(0x19a)]),k++),k<g['length']&&g[k]['code']===0x49&&(C['ccw']=g[k]['value']==='1',k++),p['edges']['push'](C);break;}case 0x4:{let D=0x3;const F=[],I=[];k<g['length']&&g[k]['code']===0x5e&&(D=parseInt(g[k]['value'],0xa),k++),k<g['length']&&g[k]['code']===0x49&&k++,k<g['length']&&g[k]['code']===0x4a&&k++;let L=0x0;k<g['length']&&g[k][bK(0x236)]===0x5f&&(L=parseInt(g[k]['value'],0xa),k++);let M=0x0;k<g['length']&&g[k]['code']===0x60&&(M=parseInt(g[k]['value'],0xa),k++);for(let N=0x0;N<L&&k<g['length']&&g[k][bK(0x236)]===0x28;N++)F['push'](parseFloat(g[k][bK(0x19a)])),k++;for(let V=0x0;V<M&&k<g['length'];V++){const X={'x':0x0,'y':0x0};g[k]['code']===0xa&&(X['x']=parseFloat(g[k]['value']),k++),k<g['length']&&g[k]['code']===0x14&&(X['y']=parseFloat(g[k]['value']),k++),I['push'](X);}p[bK(0x1e9)]['push']({'type':bK(0x1f8),'degree':D,'knots':F,'controlPoints':I});break;}}}for(;k<g['length']&&(g[k]['code']===0x61||g[k]['code']===0x14a);)if(g[k]['code']===0x61){const Y=parseInt(g[k]['value'],0xa);k++;for(let a0=0x0;a0<Y&&k<g['length']&&g[k]['code']===0x14a;a0++)k++;}else k++;return{'path':p,'nextIndex':k};}function it(c){const bL=b2,d={...P(c),'type':bL(0x21f),'position':{'x':0x0,'y':0x0,'z':0x0}};for(const f of c)switch(f['code']){case 0xa:d['position']['x']=parseFloat(f['value']);break;case 0x14:d[bL(0x169)]['y']=parseFloat(f['value']);break;case 0x1e:d[bL(0x169)]['z']=parseFloat(f['value']);break;}return d;}function we(c,d,f){const bM=b2;for(;d<c['length'];){const g=c[d];if(g[bM(0x236)]!==0x0){d++;continue;}const h=g['value'];if(h==='ENDSEC'||h===bM(0x1a0))return d+0x1;d++;const k=[];for(;d<c['length']&&c[d]['code']!==0x0;)k['push'](c[d]),d++;switch(h){case'LINE':f['push'](He(k));break;case'CIRCLE':f['push'](Ve(k));break;case'ARC':f['push'](Ue(k));break;case'LWPOLYLINE':f[bM(0x174)](Ge(k));break;case'ELLIPSE':f['push'](Ke(k));break;case bM(0x254):f['push'](Qe(k));break;case'TEXT':f['push'](Je(k));break;case'MTEXT':f[bM(0x174)](et(k));break;case bM(0x2a1):{const l=tt(k);k['some'](m=>m['code']===0x42&&m['value']==='1')&&(d=ct(c,d,l['attribs'])),f['push'](l);break;}case'DIMENSION':f['push'](at(k));break;case'HATCH':f['push'](nt(k));break;case'POINT':f['push'](it(k));break;case'POLYLINE':{const m=Ze(k);d=lt(c,d,m['vertices']),f['push'](m);break;}}}return d;}function lt(c,d,f){const bN=b2;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g===bN(0x188)||g==='ENDBLK')return d;if(g==='VERTEX'){d++;const h={'x':0x0,'y':0x0,'bulge':0x0,'startWidth':0x0,'endWidth':0x0};for(;d<c['length']&&c[d][bN(0x236)]!==0x0;){const i=c[d];switch(i['code']){case 0xa:h['x']=parseFloat(i['value']);break;case 0x14:h['y']=parseFloat(i['value']);break;case 0x2a:h['bulge']=parseFloat(i['value']);break;case 0x28:h['startWidth']=parseFloat(i[bN(0x19a)]);break;case 0x29:h[bN(0x15c)]=parseFloat(i['value']);break;}d++;}f[bN(0x174)](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ct(c,d,f){const bO=b2;for(;d<c['length'];){if(c[d]['code']!==0x0){d++;continue;}const g=c[d]['value'];if(g==='SEQEND')return d+0x1;if(g==='ENDSEC'||g==='ENDBLK')return d;if(g==='ATTRIB'){d++;const h={'tag':'','text':'','insertionPoint':{'x':0x0,'y':0x0,'z':0x0},'height':0x1,'rotation':0x0,'style':bO(0x1f2),'layer':'0','color':0x100};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x1:h['text']=i['value'];break;case 0x2:h['tag']=i['value'];break;case 0x7:h[bO(0x1b7)]=i['value'];break;case 0x8:h['layer']=i[bO(0x19a)];break;case 0xa:h[bO(0x1a6)]['x']=parseFloat(i['value']);break;case 0x14:h['insertionPoint']['y']=parseFloat(i['value']);break;case 0x1e:h[bO(0x1a6)]['z']=parseFloat(i['value']);break;case 0x28:h['height']=parseFloat(i['value']);break;case 0x32:h['rotation']=parseFloat(i[bO(0x19a)]);break;case 0x3e:h['color']=parseInt(i['value'],0xa);break;}d++;}f['push'](h);}else{for(d++;d<c['length']&&c[d]['code']!==0x0;)d++;}}return d;}function ht(c,d,f){const bP=b2;for(;d<c[bP(0x1bd)];){const g=c[d];if(g['code']===0x0&&g['value']==='ENDSEC')return d+0x1;if(g[bP(0x236)]===0x0&&g['value']==='BLOCK'){d++;const h={'name':'','basePoint':{'x':0x0,'y':0x0,'z':0x0},'entities':[],'flags':0x0};for(;d<c['length']&&c[d]['code']!==0x0;){const i=c[d];switch(i['code']){case 0x2:h['name']=i['value'];break;case 0x8:break;case 0xa:h['basePoint']['x']=parseFloat(i['value']);break;case 0x14:h['basePoint']['y']=parseFloat(i['value']);break;case 0x1e:h[bP(0x203)]['z']=parseFloat(i[bP(0x19a)]);break;case 0x46:h['flags']=parseInt(i[bP(0x19a)],0xa);break;}d++;}d=we(c,d,h['entities']),h['name']&&!h['name']['startsWith']('*Model_Space')&&!h['name']['startsWith']('*Paper_Space')&&f['set'](h['name'],h);}else d++;}return d;}var pe='AutoCAD\x20Binary\x20DXF',ut={'ANSI_874':'windows-874','ANSI_932':b2(0x275),'ANSI_936':'gbk','ANSI_949':'euc-kr','ANSI_950':b2(0x29b),'ANSI_1250':'windows-1250','ANSI_1251':'windows-1251','ANSI_1252':b2(0x242),'ANSI_1253':'windows-1253','ANSI_1254':'windows-1254','ANSI_1255':'windows-1255','ANSI_1256':'windows-1256','ANSI_1257':'windows-1257','ANSI_1258':'windows-1258'},dt='AC1021';function ft(){return{'acadVersion':'','insUnits':0x0,'measurement':0x0,'ltScale':0x1};}function be(c){const bQ=b2;return c['replace'](/\\U\+([0-9A-Fa-f]{4})/g,(d,f)=>String[bQ(0x1de)](parseInt(f,0x10)));}function pt(d){const bR=b2;if(typeof d=='string')return be(d);const f=new Uint8Array(d);if(new TextDecoder('ascii')['decode'](f['slice'](0x0,pe['length']))===pe)throw new T('Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.');let g=new TextDecoder('utf-8')['decode'](d);const h=g[bR(0x198)](/\$ACADVER[\s\S]*?\n\s*1\s*\n\s*(\S+)/)?.[0x1]??'';if(h&&h<dt){const i=g['match'](/\$DWGCODEPAGE[\s\S]*?\n\s*3\s*\n\s*(\S+)/)?.[0x1]??'',k=ut[i]??bR(0x242);k!==bR(0x19b)&&(g=new TextDecoder(k)[bR(0x1ab)](d));}return be(g);}function bt(c,d){for(;d<c['length'];){if(c[d]['code']===0x0&&c[d]['value']==='ENDSEC')return d+0x1;d++;}return d;}function mt(c){const bS=b2;c[bS(0x250)]['has']('0')||c['layers'][bS(0x18c)]('0',{'name':'0','color':0x7,'lineType':bS(0x296),'flags':0x0,'lineWeight':-0x3,'isOff':!0x1,'isFrozen':!0x1,'isLocked':!0x1});}function gt(c){for(const [,d]of c['layers'])d['isOff']=d['color']<0x0,d['isOff']&&(d['color']=Math['abs'](d['color'])),d['isFrozen']=(d['flags']&0x1)!==0x0,d['isLocked']=(d['flags']&0x4)!==0x0;}var T=class extends Error{constructor(c,d){super(c),this['cause']=d,this['name']='DxfParseError';}};function ae(c){const bT=b2;if(typeof c=='string'){if(c['length']===0x0)throw new T('Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.');}else{if(c instanceof ArrayBuffer){if(c['byteLength']===0x0)throw new T('Input\x20ArrayBuffer\x20is\x20empty.');}else throw new T('Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.');}let d;try{d=pt(c);}catch(h){throw h instanceof T?h:new T(bT(0x287),h);}let f;try{f=Re(d);}catch(k){throw new T(bT(0x23e),k);}if(f['length']===0x0)throw new T('DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.');const g={'header':ft(),'layers':new Map(),'lineTypes':new Map(),'styles':new Map(),'blocks':new Map(),'entities':[]};try{let l=0x0;for(;l<f['length'];){const m=f[l];if(m['code']===0x0&&m[bT(0x19a)]==='SECTION'){if(l++,l>=f['length'])break;const o=f[l][bT(0x19a)];switch(l++,o){case'HEADER':l=Oe(f,l,g['header']);break;case'TABLES':l=_e(f,l,g);break;case bT(0x213):l=ht(f,l,g['blocks']);break;case'ENTITIES':l=we(f,l,g['entities']);break;default:l=bt(f,l);break;}}else{if(m['code']===0x0&&m['value']==='EOF')break;l++;}}}catch(p){throw new T('Failed\x20to\x20parse\x20DXF\x20sections.',p);}return mt(g),gt(g),g;}var vt=['#000000','#FF0000',b2(0x283),'#00FF00','#00FFFF','#0000FF','#FF00FF','#FFFFFF',b2(0x202),'#C0C0C0','#FF0000','#FF7F7F','#A50000','#A55252','#7F0000','#7F3F3F','#4C0000','#4C2626','#260000','#261313','#FF3F00',b2(0x1ed),'#A52900','#A56752','#7F1F00','#7F4F3F','#4C1300','#4C2F26',b2(0x1ea),b2(0x156),'#FF7F00','#FFBF7F','#A55200','#A57C52','#7F3F00',b2(0x200),'#4C2600','#4C3926','#261300','#261C13','#FFBF00','#FFDF7F','#A57C00','#A59152',b2(0x16c),b2(0x25e),'#4C3900','#4C4226',b2(0x291),b2(0x166),b2(0x283),b2(0x1d4),'#A5A500','#A5A552','#7F7F00','#7F7F3F','#4C4C00','#4C4C26','#262600','#262613','#BFFF00','#DFFF7F','#7CA500','#91A552','#5F7F00','#6F7F3F','#394C00','#424C26','#1C2600','#212613','#7FFF00','#BFFF7F','#52A500','#7CA552','#3F7F00','#5F7F3F','#264C00','#394C26','#132600','#1C2613','#3FFF00','#9FFF7F',b2(0x2a7),'#67A552',b2(0x1e5),'#4F7F3F','#134C00','#2F4C26','#092600',b2(0x192),b2(0x2a9),'#7FFF7F','#00A500','#52A552',b2(0x25f),'#3F7F3F',b2(0x23a),'#264C26','#002600','#132613','#00FF3F','#7FFF9F','#00A529','#52A567','#007F1F','#3F7F4F','#004C13','#264C2F','#002609','#132617','#00FF7F','#7FFFBF','#00A552','#52A57C','#007F3F','#3F7F5F','#004C26',b2(0x260),'#002613','#13261C','#00FFBF','#7FFFDF','#00A57C','#52A591','#007F5F','#3F7F6F','#004C39','#264C42',b2(0x253),b2(0x1aa),'#00FFFF','#7FFFFF','#00A5A5','#52A5A5','#007F7F',b2(0x1ae),b2(0x20f),b2(0x17b),'#002626','#132626','#00BFFF',b2(0x21a),'#007CA5','#5291A5','#005F7F','#3F6F7F',b2(0x1d3),'#26424C','#001C26','#132126','#007FFF','#7FBFFF',b2(0x23c),'#527CA5','#003F7F','#3F5F7F','#00264C','#26394C','#001326','#131C26',b2(0x181),'#7F9FFF','#0029A5',b2(0x18e),'#001F7F',b2(0x243),'#00134C',b2(0x29d),'#000926',b2(0x25b),'#0000FF','#7F7FFF','#0000A5','#5252A5','#00007F','#3F3F7F','#00004C',b2(0x265),'#000026','#131326','#3F00FF','#9F7FFF','#2900A5','#6752A5','#1F007F',b2(0x273),b2(0x179),b2(0x175),'#090026','#171326','#7F00FF','#BF7FFF','#5200A5',b2(0x208),'#3F007F','#5F3F7F','#26004C','#39264C','#130026','#1C1326','#BF00FF','#DF7FFF','#7C00A5','#9152A5','#5F007F','#6F3F7F','#39004C','#42264C','#1C0026',b2(0x1d8),'#FF00FF','#FF7FFF','#A500A5','#A552A5','#7F007F','#7F3F7F','#4C004C',b2(0x1a8),'#260026','#261326','#FF00BF','#FF7FDF',b2(0x28a),b2(0x29c),'#7F005F','#7F3F6F','#4C0039','#4C2642','#26001C','#261321',b2(0x16e),b2(0x199),'#A50052','#A5527C','#7F003F','#7F3F5F','#4C0026','#4C2639',b2(0x1b9),b2(0x182),'#FF003F','#FF7F9F',b2(0x22a),b2(0x1db),'#7F001F','#7F3F4F',b2(0x20e),'#4C262F','#260009','#261317','#333333','#505050','#696969','#828282','#BEBEBE','#FFFFFF'];function Ft(c){if(!(c===0x0||c===0x100)&&!(c<0x0||c>0xff))return vt[c];}var E={'dark':{'backgroundColor':'#1a1a2e','defaultEntityColor':'#ffffff','selectionColor':b2(0x1ee),'measureColor':b2(0x27a),'gridColor':'#333333','crosshairColor':'#555555'},'light':{'backgroundColor':'#ffffff','defaultEntityColor':b2(0x1e2),'selectionColor':'#0066ff','measureColor':'#ff6600','gridColor':'#dddddd','crosshairColor':b2(0x252)}};function W(c,d,f){return[d*c['scale']+c['offsetX'],-f*c['scale']+c['offsetY']];}function q(c,d,f){const bU=b2;return[(d-c['offsetX'])/c['scale'],-(f-c[bU(0x1b3)])/c['scale']];}function me(c,d){const bV=b2,f=window[bV(0x21b)]||0x1;c['setTransform'](d['scale']*f,0x0,0x0,-d['scale']*f,d['offsetX']*f,d['offsetY']*f);}function xt(g,k,m,v,w,x,z=0.05){const A=w-m,C=x-v;if(A<=0x0||C<=0x0)return{'scale':0x1,'offsetX':g/0x2,'offsetY':k/0x2};const D=g/A,F=k/C,I=Math['min'](D,F)*(0x1-z*0x2),L=(m+w)/0x2,M=(v+x)/0x2,N=g/0x2-L*I,V=k/0x2+M*I;return{'scale':I,'offsetX':N,'offsetY':V};}function kt(c,d,f,g,h=0.0001,k=0x186a0){const l=Math['max'](h,Math['min'](k,c['scale']*g)),m=l/c['scale'];return{'scale':l,'offsetX':d-(d-c['offsetX'])*m,'offsetY':f-(f-c['offsetY'])*m};}var yt=class{['transform']={'scale':0x1,'offsetX':0x0,'offsetY':0x0};['minScale'];['maxScale'];constructor(c){this['minScale']=c['minZoom'],this['maxScale']=c['maxZoom'];}['getTransform'](){const bW=b2;return this[bW(0x24e)];}['setTransform'](c){this['transform']=c;}[b2(0x168)](c,d){const bX=b2;this['transform']={...this['transform'],'offsetX':this['transform'][bX(0x154)]+c,'offsetY':this['transform']['offsetY']+d};}[b2(0x1c2)](c,d,f){const bY=b2;this[bY(0x24e)]=kt(this['transform'],c,d,f,this['minScale'],this['maxScale']);}};function ge(c,d){const bZ=b2;return c===0x7?d==='dark'?bZ(0x1c3):'#000000':Ft(c)??'#ffffff';}function se(d,f,g,h){const c0=b2;if(d['trueColor']!==void 0x0){const l=d['trueColor']>>0x10&0xff,m=d['trueColor']>>0x8&0xff,p=d['trueColor']&0xff;return'rgb('+l+','+m+','+p+')';}if(d['color']===0x0)return h??E[g]['defaultEntityColor'];if(d['color']!==0x100)return ge(d['color'],g);const k=f[c0(0x271)](d['layer']);if(k){if(k['trueColor']!==void 0x0){const v=k['trueColor']>>0x10&0xff,w=k['trueColor']>>0x8&0xff,x=k[c0(0x1c8)]&0xff;return c0(0x17f)+v+','+w+','+x+')';}const u=Math['abs'](k['color']);return ge(u,g);}return E[g]['defaultEntityColor'];}function Pt(c,d){const c1=b2;c['beginPath'](),c[c1(0x240)](d['start']['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']),c['stroke']();}function wt(c,d){d['radius']<=0x0||(c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d['radius'],0x0,Math['PI']*0x2),c['stroke']());}function It(c,d){const c2=b2;if(d[c2(0x162)]<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d['endAngle']*Math['PI']/0xb4;c['beginPath'](),c['arc'](d['center']['x'],d['center']['y'],d[c2(0x162)],f,g,!0x1),c['stroke']();}function Mt(k,w,z,A,C){const D=z-k,I=A-w,L=Math['sqrt'](D*D+I*I);if(L<1e-10)return{'cx':k,'cy':w,'radius':0x0,'startAngle':0x0,'endAngle':0x0,'anticlockwise':!0x1};const M=Math['abs'](C)*L/0x2,N=((L/0x2)**0x2+M**0x2)/(0x2*M),V=(k+z)/0x2,X=(w+A)/0x2,Y=-I/L,a0=D/L,a1=N-M,a2=C>0x0?0x1:-0x1,a3=V+a2*a1*Y,a4=X+a2*a1*a0,a5=Math['atan2'](w-a4,k-a3),a6=Math['atan2'](A-a4,z-a3),a7=C<0x0;return{'cx':a3,'cy':a4,'radius':N,'startAngle':a5,'endAngle':a6,'anticlockwise':a7};}function H(c,d,f,g,h,k){const l=Mt(d,f,g,h,k);if(l['radius']<1e-10){c['lineTo'](g,h);return;}c['arc'](l['cx'],l['cy'],l['radius'],l['startAngle'],l['endAngle'],l['anticlockwise']);}function Tt(c,d){const c3=b2,f=d['vertices'];if(f['length']<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f[c3(0x1bd)]];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}c['stroke']();}function Et(c,d){const c4=b2,f=d['vertices'];if(f[c4(0x1bd)]<0x2)return;c['beginPath'](),c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k[c4(0x1fb)]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}c['stroke']();}function At(c,d){const c5=b2,f=Math['sqrt'](d['majorAxis']['x']**0x2+d['majorAxis']['y']**0x2+d['majorAxis']['z']**0x2);if(f<1e-10||d[c5(0x230)]<=0x0)return;const g=f*d['minorRatio'],h=Math['atan2'](d['majorAxis']['y'],d['majorAxis']['x']);c['beginPath'](),c['ellipse'](d['center']['x'],d['center']['y'],f,g,h,d['startParam'],d['endParam'],!0x1),c['stroke']();}function St(k,w,x,z,A){const c6=b2,C=w['length']-0x1;let D=k;for(;D<C&&x[D+0x1]<=z;)D++;const F=[],I=[];for(let L=0x0;L<=k;L++){const M=D-k+L;F['push']({...w[M]}),I[c6(0x174)](A?A[M]:0x1);}for(let N=0x1;N<=k;N++)for(let V=k;V>=N;V--){const X=D-k+V,Y=x[X+k-N+0x1]-x[X];if(Math['abs'](Y)<1e-10)continue;const a0=(z-x[X])/Y,a1=F[V],a2=F[V-0x1];if(A){const a3=I[V-0x1]*(0x1-a0),a4=I[V]*a0,a5=a3+a4;if(Math['abs'](a5)<1e-10)continue;a1['x']=(a2['x']*a3+a1['x']*a4)/a5,a1['y']=(a2['y']*a3+a1['y']*a4)/a5,a1['z']=(a2['z']*a3+a1['z']*a4)/a5,I[V]=a5;}else a1['x']=(0x1-a0)*a2['x']+a0*a1['x'],a1['y']=(0x1-a0)*a2['y']+a0*a1['y'],a1['z']=(0x1-a0)*a2['z']+a0*a1['z'];}return F[k]??{'x':0x0,'y':0x0,'z':0x0};}function Ct(g){const c7=b2;if(g['length']<0x2)return g[c7(0x257)](v=>({'x':v['x'],'y':v['y']}));const k=[],m=g['length'],p=0xa;for(let v=0x0;v<m-0x1;v++){const w=g[Math[c7(0x165)](0x0,v-0x1)],x=g[v],z=g[Math['min'](m-0x1,v+0x1)],A=g[Math['min'](m-0x1,v+0x2)];for(let C=0x0;C<=(v===m-0x2?p:p-0x1);C++){const D=C/p,F=D*D,I=F*D,L=0.5*(0x2*x['x']+(-w['x']+z['x'])*D+(0x2*w['x']-0x5*x['x']+0x4*z['x']-A['x'])*F+(-w['x']+0x3*x['x']-0x3*z['x']+A['x'])*I),M=0.5*(0x2*x['y']+(-w['y']+z['y'])*D+(0x2*w['y']-0x5*x['y']+0x4*z['y']-A['y'])*F+(-w['y']+0x3*x['y']-0x3*z['y']+A['y'])*I);k['push']({'x':L,'y':M});}}return k;}function Ie(d,f){const c8=b2;if(d['degree']===0x1)return d['controlPoints']['map'](w=>({'x':w['x'],'y':w['y']}));if(d['controlPoints']['length']===0x0&&d['fitPoints']['length']>=0x2)return Ct(d['fitPoints']);if(d['controlPoints']['length']<d[c8(0x27b)]+0x1)return[];if(d['knots']['length']<d[c8(0x247)]['length']+d[c8(0x27b)]+0x1)return[];const g=[],k=d['knots'][d[c8(0x27b)]],m=d['knots'][d['knots']['length']-d['degree']-0x1];if(m<=k)return[];const p=Math['max'](d['controlPoints']['length']*0xa,Math['ceil']((m-k)/f)),u=Math['min'](p,0x1388),v=d['weights'][c8(0x1bd)]>0x0?d['weights']:void 0x0;for(let w=0x0;w<=u;w++){const x=k+(m-k)*(w/u),z=St(d['degree'],d['controlPoints'],d['knots'],x,v);g['push']({'x':z['x'],'y':z['y']});}return g;}function Dt(c,d,f){const c9=b2,g=Ie(d,f);if(!(g['length']<0x2)){c[c9(0x26d)](),c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c['lineTo'](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath'](),c['stroke']();}}var Lt={'standard':'Arial,\x20sans-serif','arial':b2(0x18d),'arial.ttf':'Arial,\x20sans-serif','romans.shx':'\x22Courier\x20New\x22,\x20monospace','simplex.shx':b2(0x214),'txt.shx':b2(0x15d),'monotxt.shx':b2(0x15d),'isocp.shx':b2(0x214),'isocpeur.shx':'\x22Courier\x20New\x22,\x20monospace','times.ttf':'\x22Times\x20New\x20Roman\x22,\x20serif','timesnr.ttf':b2(0x2a5),'gothic.ttf':'\x22Century\x20Gothic\x22,\x20sans-serif'};function Me(c){const cb=b2,d=c['toLowerCase']()['trim']();return Lt[d]||cb(0x23f);}function Nt(d,f,g){const cc=b2;if(!f[cc(0x1d2)]||f['height']<g*0x4)return;const k=f[cc(0x183)]!==0x0||f['vAlign']!==0x0,l=k&&f['alignmentPoint']?f['alignmentPoint']['x']:f['insertionPoint']['x'],m=k&&f['alignmentPoint']?f[cc(0x270)]['y']:f['insertionPoint']['y'];if(d['save'](),d['translate'](l,m),d['scale'](0x1,-0x1),f['rotation']&&d['rotate'](-f['rotation']*Math['PI']/0xb4),f['widthFactor']!==0x1&&d[cc(0x1e1)](f['widthFactor'],0x1),f['obliqueAngle']){const w=Math['tan'](f['obliqueAngle']*Math['PI']/0xb4);d['transform'](0x1,0x0,w,0x1,0x0,0x0);}const p=(f['generationFlags']&0x2)!==0x0,u=(f['generationFlags']&0x4)!==0x0;p&&d['scale'](-0x1,0x1),u&&d['scale'](0x1,-0x1);const v=Me(f['style']||'Standard');switch(d[cc(0x1a2)]=f['height']+'px\x20'+v,f[cc(0x183)]){case 0x0:d['textAlign']='left';break;case 0x1:d['textAlign']='center';break;case 0x2:d['textAlign']='right';break;case 0x3:d['textAlign']='left';break;case 0x4:d['textAlign']=cc(0x28e);break;case 0x5:d['textAlign']=cc(0x17c);break;default:d['textAlign']='left';}switch(f['vAlign']){case 0x0:d['textBaseline']='alphabetic';break;case 0x1:d['textBaseline']='bottom';break;case 0x2:d['textBaseline']='middle';break;case 0x3:d['textBaseline']='top';break;default:d['textBaseline']='alphabetic';}d['fillText'](f['text'],0x0,0x0),d['restore']();}function Bt(c){const cd=b2;return c['replace'](/\\P/g,'\x0a')[cd(0x264)](/\\[fFHWQTCAaLlOoKk][^;]*;/g,'')['replace'](/\\\\/g,'\x5c')['replace'](/\\~/g,'\u00a0')[cd(0x264)](/\{/g,'')['replace'](/\}/g,'')['replace'](/\\S[^;]*;/g,'')['trim']();}function Xt(g,k,m){const ce=b2;if(!k['text']||k['height']<m*0x4)return;g['save'](),g['translate'](k['insertionPoint']['x'],k['insertionPoint']['y']),g[ce(0x1e1)](0x1,-0x1);const p=k['textDirection']?Math['atan2'](k['textDirection']['y'],k['textDirection']['x']):(k['rotation']||0x0)*Math['PI']/0xb4;p&&g['rotate'](-p);const r=Bt(k['text'])['split']('\x0a'),v=k['height']*(k[ce(0x1d6)]||1.4),w=Me(k[ce(0x1b7)]||'Standard');g[ce(0x1a2)]=k['height']+ce(0x27f)+w;const x=(k['attachmentPoint']-0x1)%0x3,z=Math['floor']((k['attachmentPoint']-0x1)/0x3),A=['left','center','right'];g['textAlign']=A[x]??ce(0x17c);let C=0x0;const D=r['length']*v;switch(z){case 0x0:C=k['height'];break;case 0x1:C=k['height']-D/0x2;break;case 0x2:C=k['height']-D;break;}for(let F=0x0;F<r['length'];F++)g['fillText'](r[F],0x0,C+F*v);g[ce(0x1b5)]();}var Yt=0x64;function zt(f,g,k,m=0x0){const cf=b2;if(m>Yt)return null;if(k['has'](f))return k['get'](f);const p=g['blocks']['get'](f);if(!p)return k['set'](f,null),null;k['set'](f,null);let v=0x1/0x0,w=0x1/0x0,x=-0x1/0x0,z=-0x1/0x0,A=!0x1;for(const D of p[cf(0x293)]){let F;D['type']==='INSERT'?F=Te(D,g,k,m+0x1):F=B(D),F&&(A=!0x0,v=Math['min'](v,F['minX']),w=Math['min'](w,F['minY']),x=Math[cf(0x165)](x,F['maxX']),z=Math[cf(0x165)](z,F[cf(0x1ce)]));}const C=A?{'minX':v,'minY':w,'maxX':x,'maxY':z}:null;return k['set'](f,C),C;}function Te(a0,a1,a2,a3=0x0){const cg=b2,a4=zt(a0[cg(0x228)],a1,a2,a3);if(!a4)return null;const a5=a1['blocks'][cg(0x271)](a0['blockName']);if(!a5)return null;const a6=a5['basePoint']['x'],a7=a5['basePoint']['y'];let a8=a4['minX']-a6,a9=a4['minY']-a7,ab=a4[cg(0x235)]-a6,ac=a4['maxY']-a7;const ad=a0['scaleX'],af=a0['scaleY'];let ag=a8*ad,ah=ab*ad,ai=a9*af,aj=ac*af;if(ag>ah){const ax=ag;ag=ah,ah=ax;}if(ai>aj){const ay=ai;ai=aj,aj=ay;}const ak=(a0['rotation']||0x0)*Math['PI']/0xb4;if(Math['abs'](ak)<1e-10){const az=a0['insertionPoint']['x'],aA=a0['insertionPoint']['y'];let aB=ag+az,aC=ai+aA,aD=ah+az,aE=aj+aA;const aF=Math[cg(0x165)](0x1,a0['columnCount']),aG=Math['max'](0x1,a0['rowCount']);if(aF>0x1||aG>0x1){const aH=(aF-0x1)*a0['columnSpacing'],aI=(aG-0x1)*a0['rowSpacing'];aB=Math[cg(0x1df)](aB,aB+aH),aD=Math[cg(0x165)](aD,aD+aH),aC=Math['min'](aC,aC+aI),aE=Math['max'](aE,aE+aI);}return{'minX':aB,'minY':aC,'maxX':aD,'maxY':aE};}const al=Math['cos'](ak),am=Math['sin'](ak),an=[{'x':ag,'y':ai},{'x':ah,'y':ai},{'x':ah,'y':aj},{'x':ag,'y':aj}],ao=a0['insertionPoint']['x'],ap=a0['insertionPoint']['y'];let aq=0x1/0x0,ar=0x1/0x0,as=-0x1/0x0,au=-0x1/0x0;for(const aJ of an){const aK=aJ['x']*al-aJ['y']*am+ao,aL=aJ['x']*am+aJ['y']*al+ap;aq=Math['min'](aq,aK),ar=Math['min'](ar,aL),as=Math['max'](as,aK),au=Math['max'](au,aL);}const av=Math['max'](0x1,a0['columnCount']),aw=Math[cg(0x165)](0x1,a0[cg(0x1e6)]);if(av>0x1||aw>0x1){const aM=(av-0x1)*a0['columnSpacing'],aN=(aw-0x1)*a0['rowSpacing'],aO=[{'x':0x0,'y':0x0},{'x':aM,'y':0x0},{'x':aM,'y':aN},{'x':0x0,'y':aN}];for(const aP of aO){const aQ=aP['x']*al-aP['y']*am,aR=aP['x']*am+aP['y']*al;aq=Math['min'](aq,aq+aQ),ar=Math['min'](ar,ar+aR),as=Math['max'](as,as+aQ),au=Math['max'](au,au+aR);}}return{'minX':aq,'minY':ar,'maxX':as,'maxY':au};}function Rt(d,f){const ch=b2;let g=0x1/0x0,k=0x1/0x0,l=-0x1/0x0,m=-0x1/0x0,p=!0x1;const u=f?new Map():void 0x0;for(const v of d){const w=f&&u?Ee(v,f,u):B(v);w&&(p=!0x0,g=Math['min'](g,w['minX']),k=Math['min'](k,w[ch(0x294)]),l=Math['max'](l,w['maxX']),m=Math[ch(0x165)](m,w['maxY']));}return p?{'minX':g,'minY':k,'maxX':l,'maxY':m}:null;}function Ee(c,d,f){return c['type']==='INSERT'?Te(c,d,f):B(c);}var Q=null;function Ot(c){const ci=b2,d=new Map();for(const [f,g]of c['blocks']){const h=new Array(g['entities']['length']);for(let i=0x0;i<g[ci(0x293)]['length'];i++)h[i]=B(g['entities'][i]);d['set'](f,h);}return d;}function _t(c){Q=c;}function ve(){Q=null;}function Wt(c,d){if(!Q)return;const f=Q['get'](c);if(!(!f||d>=f['length']))return f[d];}function B(c){const cj=b2;switch(c[cj(0x267)]){case'LINE':return{'minX':Math['min'](c['start']['x'],c['end']['x']),'minY':Math['min'](c['start']['y'],c['end']['y']),'maxX':Math['max'](c['start']['x'],c['end']['x']),'maxY':Math[cj(0x165)](c['start']['y'],c[cj(0x274)]['y'])};case'CIRCLE':return{'minX':c['center']['x']-c[cj(0x162)],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c['radius'],'maxY':c['center']['y']+c['radius']};case'ARC':return{'minX':c[cj(0x28e)]['x']-c['radius'],'minY':c['center']['y']-c['radius'],'maxX':c['center']['x']+c[cj(0x162)],'maxY':c[cj(0x28e)]['y']+c['radius']};case cj(0x164):case'POLYLINE':{if(c['vertices']['length']===0x0)return null;let d=0x1/0x0,f=0x1/0x0,g=-0x1/0x0,h=-0x1/0x0;for(const k of c['vertices'])d=Math['min'](d,k['x']),f=Math['min'](f,k['y']),g=Math['max'](g,k['x']),h=Math['max'](h,k['y']);return{'minX':d,'minY':f,'maxX':g,'maxY':h};}case'ELLIPSE':{const l=Math[cj(0x1ff)](c['majorAxis']['x']**0x2+c['majorAxis']['y']**0x2);return{'minX':c['center']['x']-l,'minY':c['center']['y']-l,'maxX':c['center']['x']+l,'maxY':c['center']['y']+l};}case'TEXT':return{'minX':c[cj(0x1a6)]['x'],'minY':c[cj(0x1a6)]['y'],'maxX':c['insertionPoint']['x']+c[cj(0x26b)]*c['text']['length']*0.6,'maxY':c['insertionPoint']['y']+c['height']};case'MTEXT':return{'minX':c['insertionPoint']['x'],'minY':c['insertionPoint']['y']-c['height'],'maxX':c['insertionPoint']['x']+(c[cj(0x19c)]||c['height']*0xa),'maxY':c['insertionPoint']['y']+c['height']};case'SPLINE':{if(c[cj(0x247)][cj(0x1bd)]===0x0)return null;let m=0x1/0x0,p=0x1/0x0,u=-0x1/0x0,v=-0x1/0x0;for(const w of c['controlPoints'])m=Math['min'](m,w['x']),p=Math['min'](p,w['y']),u=Math[cj(0x165)](u,w['x']),v=Math[cj(0x165)](v,w['y']);return{'minX':m,'minY':p,'maxX':u,'maxY':v};}case'POINT':return{'minX':c['position']['x'],'minY':c['position']['y'],'maxX':c['position']['x'],'maxY':c['position']['y']};case'INSERT':return{'minX':c['insertionPoint']['x'],'minY':c[cj(0x1a6)]['y'],'maxX':c['insertionPoint']['x'],'maxY':c['insertionPoint']['y']};case'DIMENSION':return c[cj(0x249)]?{'minX':Math[cj(0x1df)](c['defPoint']['x'],c['defPoint2']?.['x']??c[cj(0x249)]['x'],c['defPoint3']?.['x']??c[cj(0x249)]['x']),'minY':Math['min'](c['defPoint']['y'],c[cj(0x2a3)]?.['y']??c['defPoint']['y'],c['defPoint3']?.['y']??c['defPoint']['y']),'maxX':Math[cj(0x165)](c['defPoint']['x'],c['defPoint2']?.['x']??c[cj(0x249)]['x'],c['defPoint3']?.['x']??c['defPoint']['x']),'maxY':Math['max'](c['defPoint']['y'],c['defPoint2']?.['y']??c[cj(0x249)]['y'],c['defPoint3']?.['y']??c[cj(0x249)]['y'])}:null;case'HATCH':{let x=0x1/0x0,z=0x1/0x0,A=-0x1/0x0,C=-0x1/0x0,D=!0x1;for(const F of c['boundaryPaths'])if(F['vertices']){for(const I of F['vertices'])D=!0x0,x=Math['min'](x,I['x']),z=Math['min'](z,I['y']),A=Math[cj(0x165)](A,I['x']),C=Math['max'](C,I['y']);}return D?{'minX':x,'minY':z,'maxX':A,'maxY':C}:null;}default:return null;}}var $t=new Set(['LINE','ARC','CIRCLE','LWPOLYLINE','POLYLINE','ELLIPSE','SPLINE']);function Ae(c){return $t['has'](c);}function jt(c,d){c['moveTo'](d['start']['x'],d['start']['y']),c['lineTo'](d['end']['x'],d['end']['y']);}function qt(c,d){const ck=b2;if(d['radius']<=0x0)return;const f=d['startAngle']*Math['PI']/0xb4,g=d[ck(0x18f)]*Math['PI']/0xb4;c['moveTo'](d['center']['x']+d['radius']*Math['cos'](f),d[ck(0x28e)]['y']+d[ck(0x162)]*Math['sin'](f)),c['arc'](d['center']['x'],d['center']['y'],d[ck(0x162)],f,g,!0x1);}function Ht(c,d){const cl=b2;d['radius']<=0x0||(c[cl(0x240)](d['center']['x']+d['radius'],d['center']['y']),c['arc'](d['center']['x'],d[cl(0x28e)]['y'],d['radius'],0x0,Math['PI']*0x2));}function Vt(c,d){const cm=b2,f=d['vertices'];if(f[cm(0x1bd)]<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d[cm(0x24a)]?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']];Math['abs'](k['bulge'])<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],k['bulge']);}}function Ut(c,d){const f=d['vertices'];if(f['length']<0x2)return;c['moveTo'](f[0x0]['x'],f[0x0]['y']);const g=d['closed']?f['length']:f['length']-0x1;for(let h=0x0;h<g;h++){const k=f[h],l=f[(h+0x1)%f['length']],m=k['bulge']??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}}function Gt(d,f){const cn=b2,g=Math['sqrt'](f['majorAxis']['x']**0x2+f['majorAxis']['y']**0x2+f[cn(0x1f1)]['z']**0x2);if(g<1e-10||f['minorRatio']<=0x0)return;const h=g*f['minorRatio'],k=Math['atan2'](f['majorAxis']['y'],f['majorAxis']['x']),l=Math['cos'](k),m=Math['sin'](k),p=Math['cos'](f['startParam']),u=Math['sin'](f['startParam']);d['moveTo'](f['center']['x']+g*l*p-h*m*u,f['center']['y']+g*m*p+h*l*u),d[cn(0x16d)](f['center']['x'],f['center']['y'],g,h,k,f['startParam'],f['endParam'],!0x1);}function Zt(c,d,f){const co=b2,g=Ie(d,f);if(!(g['length']<0x2)){c['moveTo'](g[0x0]['x'],g[0x0]['y']);for(let h=0x1;h<g['length'];h++)c[co(0x190)](g[h]['x'],g[h]['y']);d['flags']&0x1&&c['closePath']();}}function Se(c,d,f){const cp=b2;switch(d[cp(0x267)]){case'LINE':jt(c,d);break;case'ARC':qt(c,d);break;case'CIRCLE':Ht(c,d);break;case'LWPOLYLINE':Vt(c,d);break;case'POLYLINE':Ut(c,d);break;case'ELLIPSE':Gt(c,d);break;case cp(0x254):Zt(c,d,f);break;}}function a(){const dM=['defPoint4','8753247xTUSja','removeAllListeners','endWidth','monospace','\x20MB','zoomTo','lineWidth','handleSeed','radius','_condense','LWPOLYLINE','max','#262113','strokeRect','pan','position','wheel','slice','#7F5F00','ellipse','#FF007F','from','listeners','viewer','compareMinX','cos','push','#2F264C','toBBox','object','LAYER','#13004C','measure','#264C4C','left','acadVersion','Worker\x20terminated','rgb(','textAlign','#003FFF','#26131C','hAlign','fillRect','startPan','buildDebugStats','indexOf','ENDSEC','$DWGCODEPAGE','onPointerDown','button','set','Arial,\x20sans-serif','#5267A5','endAngle','lineTo','getWidth','#172613','entityBBoxes','endTangent','second-point','start','fillStyle','match','#FF7FBF','value','utf-8','width','defPoint5','visibleCache','tree','ENDBLK','preventDefault','font','zoomSpeed','fitToView','name','insertionPoint','frameTimestamps','#4C264C','\x20\x20Frame:\x20','#132621','decode','visible','pop','#3F7F7F','getBoundingClientRect','camera','styles','loadString','offsetY','has','restore','contextmenu','style','off','#260013','clientY','workerManager','activate','length','touches','requestRender','toFixed','hatchStyle','zoom','#ffffff','_splitRoot','989856dQVHqJ','extMin','renderStats','trueColor','ENDTAB','lastY','top-right','formatConverters','runConverters','maxY','deltaY','lineTypes','rotation','text','#00394C','#FFFF7F','selectedEntityIndex','lineSpacingFactor','Worker\x20error','#211326','color','ELLIPSE','#A55267','ensureMap','add','fromCodePoint','min','textBaseline','scale','#000000','handlePan','options','#1F7F00','rowCount','debugOptions','emitter','edges','#260900','fileName','drawCalls','#FF9F7F','#00ff88','measureTool','minX','majorAxis','STANDARD','defPoint3','49RwHTjP','CIRCLE','top','onPointerUp','spline','renderer','getHeight','bulge','leaf','isPanning','currentTool','sqrt','#7F5F3F','_allDistMargin','#808080','basePoint','20478vcUIOA','ceil','setLayers','448468snlteu','#7C52A5','onTouchMove','delete','entitiesDrawn','entityIndex','getContext','#4C0013','#004C4C','touchstart','measureColor','secondPoint','BLOCKS','\x22Courier\x20New\x22,\x20monospace','rgba(0,\x200,\x200,\x200.15)','lineType','firstPoint','renderEmpty','viewchange','#7FDFFF','devicePixelRatio','459330MIUsTZ','sin','clear','POINT','values','onWheel','POLYLINE','entries','canvas','startAngle','computeViewportBounds','spatialIndex','blockName','destroyed','#A50029','select','mouseScreenY','loadedFileName','strokeStyle','trim','minorRatio','widthFactor','loadedFileSize','layer','now','maxX','code','LINE','textDirection','showDocumentInfo','#004C00','currentSnap','#0052A5','lastDoRenderTime','Failed\x20to\x20tokenize\x20DXF\x20content.','sans-serif','moveTo','grab','windows-1252','#3F4F7F','handlePointerDown','layerManager','doRender','controlPoints','point','defPoint','closed','size','renderPending','$ACADVER','transform','getTransform','layers','boundaryPaths','#cccccc','#00261C','SPLINE','guardDestroyed','getVisibleLayerNames','map','STYLE','_minEntries','header','#131726','getTool','hypot','#7F6F3F','#007F00','#264C39','handleSelect','lastDebugStats','blobUrl','replace','#26264C','first-point','type','spatialIndexBuildTime','handlePointerUp','endpoint','height','pointerup','beginPath','build','idle','alignmentPoint','get','stopDebugLoop','#4F3F7F','end','shift_jis','data','addEventListener','doc','distance','#ffaa00','degree','identifier','search','pending','px\x20','children','items','fill','#FFFF00','handle','theme','getCursorForTool','Failed\x20to\x20decode\x20DXF\x20input.','state','midpoint','#A5007C','\x20KB','2xeRzEd','pointerdown','center','removeEventListener','worker','#261C00','handleWheel','entities','minY','debugRafId','Continuous','_maxEntries','getLayers','frameTime','closePath','big5','#A55291','#262F4C','totalLoadTime','toJSON','cursor','INSERT','debugEnabled','defPoint2','sort','\x22Times\x20New\x20Roman\x22,\x20serif','parseWithOptionalWorker','#29A500','isFrozen','#00FF00','scaleY','stroke','offsetX','438952qQCxgQ','#261713','onTouchStart','627931QfsJLo'];a=function(){return dM;};return a();}var Kt=0x64,Qt=0.5;function Ce(k,z,A,I,L,M,N=0x0,X){const cq=b2;if(N>Kt)return;const Y=A['blocks']['get'](z['blockName']);if(!Y)return;const a0=Math['max'](0x1,z['columnCount']),a1=Math['max'](0x1,z['rowCount']);for(let a2=0x0;a2<a1;a2++)for(let a3=0x0;a3<a0;a3++){k['save']();const a4=z['insertionPoint']['x']+a3*z['columnSpacing'],a5=z['insertionPoint']['y']+a2*z['rowSpacing'];k['translate'](a4,a5),z['rotation']&&k['rotate'](z['rotation']*Math['PI']/0xb4),k['scale'](z['scaleX'],z[cq(0x2aa)]),k['translate'](-Y['basePoint']['x'],-Y[cq(0x203)]['y']);const a6=Math['max'](Math['abs'](z['scaleX']),Math['abs'](z['scaleY'])),a7=M/(a6||0x1);let a8=null;const a9=Y['entities'];for(let ab=0x0;ab<a9[cq(0x1bd)];ab++){const ac=a9[ab];if(ac['type']!=='INSERT'){const af=Wt(z['blockName'],ab),ag=af!==void 0x0?af:B(ac);if(ag){const ah=Math[cq(0x165)](ag[cq(0x235)]-ag['minX'],ag['maxY']-ag['minY']);if(ah>0x0&&ah/a7<Qt)continue;}}const ad=se(ac,A['layers'],L);ac[cq(0x267)]!=='INSERT'&&Ae(ac[cq(0x267)])?(ad!==a8&&(a8!==null&&(k['stroke'](),X&&X['drawCalls']++),a8=ad,k[cq(0x26d)](),k['strokeStyle']=ad,k['lineWidth']=a7),Se(k,ac,a7),X&&(X['byType'][ac['type']]=(X['byType'][ac[cq(0x267)]]??0x0)+0x1)):(a8!==null&&(k['stroke'](),X&&X['drawCalls']++,a8=null),k['strokeStyle']=ad,k['fillStyle']=ad,k['lineWidth']=a7,ac['type']==='INSERT'?Ce(k,ac,A,I,L,a7,N+0x1,X):J(k,ac,A,I,L,a7,X));}a8!==null&&(k['stroke'](),X&&X['drawCalls']++),k['restore']();}}function Jt(d,f,g,k,l,m,p){const cr=b2;if(f['blockName']){const u=g['blocks']['get'](f['blockName']);if(u){for(const v of u['entities']){const w=se(v,g['layers'],l);d['strokeStyle']=w,d['fillStyle']=w,d['lineWidth']=m,J(d,v,g,k,l,m,p);}return;}}f['defPoint2']&&f[cr(0x1f3)]&&(d[cr(0x26d)](),d['moveTo'](f[cr(0x2a3)]['x'],f['defPoint2']['y']),d['lineTo'](f['defPoint']['x'],f['defPoint']['y']),d[cr(0x2ab)](),d['beginPath'](),d['moveTo'](f['defPoint3']['x'],f['defPoint3']['y']),d[cr(0x190)](f['defPoint']['x'],f[cr(0x249)]['y']),d['stroke']());}function ea(c,d){const cs=b2;if(d['boundaryPaths']['length']!==0x0){c['beginPath']();for(const f of d[cs(0x251)])if(f[cs(0x267)]==='polyline'&&f['vertices']&&f['vertices']['length']>0x0){const g=f['vertices'][0x0];c['moveTo'](g['x'],g['y']);for(let h=0x1;h<f['vertices'][cs(0x1bd)];h++){const k=f['vertices'][h-0x1],l=f['vertices'][h],m=f['bulges']?.[h-0x1]??0x0;Math['abs'](m)<1e-10?c['lineTo'](l['x'],l['y']):H(c,k['x'],k['y'],l['x'],l['y'],m);}f['isClosed']&&c[cs(0x29a)]();}else{if(f['type']==='edges'&&f['edges'])for(let p=0x0;p<f['edges']['length'];p++){const u=f['edges'][p];if(u[cs(0x267)]==='line')p===0x0&&c['moveTo'](u['start']['x'],u['start']['y']),c['lineTo'](u['end']['x'],u['end']['y']);else{if(u['type']==='arc'){if(p===0x0){const v=u['center']['x']+u[cs(0x162)]*Math['cos'](u['startAngle']*Math['PI']/0xb4),w=u['center']['y']+u['radius']*Math[cs(0x21d)](u['startAngle']*Math['PI']/0xb4);c['moveTo'](v,w);}c['arc'](u['center']['x'],u['center']['y'],u['radius'],u['startAngle']*Math['PI']/0xb4,u['endAngle']*Math['PI']/0xb4,!u['ccw']);}}}}d['solidFill']&&(c['globalAlpha']=0.3,c['fill']('evenodd'),c['globalAlpha']=0x1),c['stroke']();}}function ta(c,d,f){const g=f*0x3;c['beginPath'](),c['arc'](d['position']['x'],d['position']['y'],g,0x0,Math['PI']*0x2),c['fill']();}function J(c,d,f,g,h,k,l){const cu=b2;switch(l&&(l[cu(0x1ec)]++,l['byType'][d['type']]=(l['byType'][d['type']]??0x0)+0x1),d['type']){case'LINE':Pt(c,d);break;case cu(0x1f5):wt(c,d);break;case'ARC':It(c,d);break;case'LWPOLYLINE':Tt(c,d);break;case'POLYLINE':Et(c,d);break;case'ELLIPSE':At(c,d);break;case cu(0x254):Dt(c,d,k);break;case'TEXT':Nt(c,d,k);break;case'MTEXT':Xt(c,d,k);break;case cu(0x2a1):Ce(c,d,f,g,h,k,0x0,l);break;case'DIMENSION':Jt(c,d,f,g,h,k,l);break;case'HATCH':ea(c,d);break;case'POINT':ta(c,d,k);break;}}var aa=0.5,na=class{constructor(c){this['canvas']=c;const d=c['getContext']('2d',{'alpha':!0x1});if(!d)throw new Error('Failed\x20to\x20get\x202D\x20rendering\x20context.\x20The\x20canvas\x20may\x20already\x20have\x20a\x20different\x20context\x20type,\x20or\x20canvas\x20rendering\x20is\x20not\x20available\x20in\x20this\x20environment.');this['ctx']=d,this['updateSize']();}['ctx'];['width']=0x0;['height']=0x0;[b2(0x20d)](){return this['ctx'];}[b2(0x191)](){const cv=b2;return this[cv(0x19c)];}['getHeight'](){return this['height'];}['updateSize'](){const cw=b2,c=window['devicePixelRatio']||0x1,d=this[cw(0x224)][cw(0x1af)]();this['width']=d['width'],this['height']=d['height'],this['canvas']['width']=d['width']*c,this['canvas']['height']=d['height']*c;}['render'](k,v,w,x,z,A,C){const cx=b2,D=this['ctx'],F=window['devicePixelRatio']||0x1,I={'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}};D['setTransform'](F,0x0,0x0,F,0x0,0x0),D['fillStyle']=E[w]['backgroundColor'],D['fillRect'](0x0,0x0,this['width'],this['height']),me(D,v);const L=0x1/v['scale'];D['lineCap']='round',D['lineJoin']='round';let M=null;for(let N=0x0;N<k['entities']['length'];N++){const V=k['entities'][N];if(!V[cx(0x1ac)]){I['entitiesSkipped']++;continue;}if(!x['has'](V[cx(0x233)])){I['entitiesSkipped']++;continue;}if(A&&!A['has'](N)){I['entitiesSkipped']++;continue;}if(C){const Y=C[N];if(Y){const a0=(Y['maxX']-Y['minX'])*v['scale'],a1=(Y['maxY']-Y[cx(0x294)])*v['scale'];if(Math['max'](a0,a1)<aa){I['entitiesSkipped']++;continue;}}}const X=se(V,k['layers'],w);Ae(V['type'])?(X!==M&&(M!==null&&(D['stroke'](),I['drawCalls']++),M=X,D['beginPath'](),D['strokeStyle']=X,D['lineWidth']=L),Se(D,V,L),I['entitiesDrawn']++,I['byType'][V[cx(0x267)]]=(I['byType'][V[cx(0x267)]]??0x0)+0x1):(M!==null&&(D['stroke'](),I['drawCalls']++,M=null),D['strokeStyle']=X,D['fillStyle']=X,D[cx(0x160)]=L,I[cx(0x20b)]++,J(D,V,k,v,w,L,I));}if(M!==null&&(D['stroke'](),I['drawCalls']++),z>=0x0&&z<k['entities'][cx(0x1bd)]){const a2=k['entities'][z];me(D,v),D[cx(0x22e)]=E[w]['selectionColor'],D[cx(0x197)]=E[w]['selectionColor'],D['lineWidth']=L*0x3,J(D,a2,k,v,w,L);}return I;}[b2(0x218)](c){const cy=b2,d=this['ctx'],f=window['devicePixelRatio']||0x1;d['setTransform'](f,0x0,0x0,f,0x0,0x0),d['fillStyle']=E[c]['backgroundColor'],d['fillRect'](0x0,0x0,this['width'],this[cy(0x26b)]);}['destroy'](){}},ra={'showFps':!0x0,'showRenderStats':!0x0,'showDocumentInfo':!0x0,'showTimings':!0x0,'showCamera':!0x0,'position':'top-left'};function ne(c){return{...ra,...c};}function sa(c){const cz=b2;return c===0x0?'0\x20B':c<0x400?c+'\x20B':c<0x400*0x400?(c/0x400)['toFixed'](0x1)+cz(0x28b):(c/(0x400*0x400))['toFixed'](0x1)+cz(0x15e);}function oa(c){return c>=0x1?c['toFixed'](0x2)+'x':'1:'+(0x1/c)['toFixed'](0x1);}var ia='11px\x20monospace',Fe=0xf,xe=0x8,Z=0x8,S=0xa;function la(k,v,w,x,z,A){const cA=b2;k['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=[];if(x['showFps']&&C['push'](['FPS:\x20'+v['fps']+cA(0x1a9)+v[cA(0x299)]['toFixed'](0x1)+'ms']),x['showRenderStats']){const Y=v['renderStats']['entitiesDrawn']+v[cA(0x1c7)]['entitiesSkipped'],a0=['Drawn:\x20'+v['renderStats']['entitiesDrawn']+'\x20/\x20'+Y+'\x20\x20Calls:\x20'+v[cA(0x1c7)]['drawCalls']],a1=Object[cA(0x223)](v['renderStats']['byType'])['sort'](([,a2],[,a3])=>a3-a2)['slice'](0x0,0x6)[cA(0x257)](([a2,a3])=>a2+':\x20'+a3)['join']('\x20\x20');a1&&a0[cA(0x174)](a1),C['push'](a0);}if(x[cA(0x239)]){const a2=['Layers:\x20'+v['visibleLayerCount']+'\x20/\x20'+v['layerCount']+'\x20\x20Blocks:\x20'+v['blockCount']];v['dxfVersion']&&a2['push']('DXF:\x20'+v['dxfVersion']),v[cA(0x1eb)]&&a2['push']('File:\x20'+v['fileName']),v['fileSize']>0x0&&a2['push']('Size:\x20'+sa(v['fileSize'])),C['push'](a2);}if(x['showTimings']){const a3=[];v['parseTime']>0x0&&a3['push']('Parse:\x20'+v['parseTime'][cA(0x1c0)](0x0)+'ms'),v['spatialIndexBuildTime']>0x0&&a3['push']('Index:\x20'+v['spatialIndexBuildTime']['toFixed'](0x0)+'ms'),v['totalLoadTime']>0x0&&a3['push']('Load:\x20'+v[cA(0x29e)]['toFixed'](0x0)+'ms'),a3['length']>0x0&&C['push']([a3['join']('\x20\x20')]);}if(x['showCamera']){const a4=v['viewportBounds'];C[cA(0x174)](['Zoom:\x20'+oa(v[cA(0x1c2)])+'\x20\x20Pixel:\x20'+v['pixelSize'][cA(0x1c0)](0x2),'View:\x20['+a4['minX']['toFixed'](0x0)+',\x20'+a4['minY']['toFixed'](0x0)+']\x20→\x20['+a4['maxX']['toFixed'](0x0)+',\x20'+a4['maxY']['toFixed'](0x0)+']']);}if(C['length']===0x0)return;k['font']=ia;const D=[];for(let a5=0x0;a5<C['length'];a5++){a5>0x0&&D[cA(0x174)]({'text':'','isSeparator':!0x0});for(const a6 of C[a5])D['push']({'text':a6,'isSeparator':!0x1});}let F=0x0;for(const a7 of D)if(!a7['isSeparator']){const a8=k['measureText'](a7['text'])['width'];a8>F&&(F=a8);}const I=F+Z*0x2;let L=Z*0x2;for(const a9 of D)L+=a9['isSeparator']?xe:Fe;let M,N;switch(x['position']){case'top-left':M=S,N=S;break;case cA(0x1cb):M=z-I-S,N=S;break;case'bottom-left':M=S,N=A-L-S;break;case'bottom-right':M=z-I-S,N=A-L-S;break;}const V=E[w];k['fillStyle']=w==='dark'?'rgba(0,\x200,\x200,\x200.75)':'rgba(255,\x20255,\x20255,\x200.85)',k[cA(0x184)](M,N,I,L),k['strokeStyle']=w==='dark'?'rgba(255,\x20255,\x20255,\x200.15)':cA(0x215),k[cA(0x160)]=0x1,k[cA(0x167)](M+0.5,N+0.5,I-0x1,L-0x1),k['fillStyle']=w==='dark'?V['defaultEntityColor']:'rgba(0,\x200,\x200,\x200.85)',k[cA(0x180)]='left',k[cA(0x1e0)]='top';let X=N+Z;for(const ab of D)ab['isSeparator']?X+=xe:(k['fillText'](ab['text'],M+Z,X),X+=Fe);}var ca=class{['layers']=new Map();['visibility']=new Map();['colorOverrides']=new Map();['visibleCache']=null;['setLayers'](c){const cB=b2;this['layers']=new Map(c),this['visibility'][cB(0x21e)](),this['colorOverrides']['clear'](),this['visibleCache']=null;for(const [d,f]of this['layers'])this['visibility']['set'](d,!f['isOff']&&!f[cB(0x2a8)]);}['getAllLayers'](){const cC=b2;return Array[cC(0x16f)](this['layers']['values']());}['setVisible'](c,d){this['visibility']['set'](c,d),this['visibleCache']=null;}['isVisible'](c){return this['visibility']['get'](c)??!0x0;}['setColorOverride'](c,d){this['colorOverrides']['set'](c,d);}['getColorOverride'](c){const cD=b2;return this['colorOverrides'][cD(0x271)](c);}['getVisibleLayerNames'](){const cE=b2;if(this['visibleCache'])return this['visibleCache'];const c=new Set();for(const [d,f]of this['visibility'])f&&c['add'](d);return this[cE(0x19e)]=c,c;}['clear'](){this['layers']['clear'](),this['visibility']['clear'](),this['colorOverrides']['clear'](),this['visibleCache']=null;}},ha=class{[b2(0x170)]=new Map();['on'](c,d){const cF=b2;this['listeners'][cF(0x1b4)](c)||this['listeners']['set'](c,new Set()),this[cF(0x170)][cF(0x271)](c)[cF(0x1dd)](d);}['off'](c,d){this['listeners']['get'](c)?.['delete'](d);}['emit'](c,d){const f=this['listeners']['get'](c);if(f){for(const g of f)g(d);}}['removeAllListeners'](){const cG=b2;this[cG(0x170)]['clear']();}},ua=class{constructor(c,d){const cH=b2;this['canvas']=c,this['viewer']=d,this['onPointerDown']=this['handlePointerDown']['bind'](this),this['onPointerMove']=this['handlePointerMove']['bind'](this),this[cH(0x1f7)]=this[cH(0x269)]['bind'](this),this['onWheel']=this[cH(0x292)]['bind'](this),this[cH(0x157)]=this['handleTouchStart']['bind'](this),this['onTouchMove']=this['handleTouchMove']['bind'](this),this['onTouchEnd']=this['handleTouchEnd']['bind'](this),this['onContextMenu']=f=>f[cH(0x1a1)](),c[cH(0x277)](cH(0x28d),this['onPointerDown']),c['addEventListener']('pointermove',this['onPointerMove']),c['addEventListener']('pointerup',this[cH(0x1f7)]),c['addEventListener'](cH(0x16a),this['onWheel'],{'passive':!0x1}),c['addEventListener']('touchstart',this[cH(0x157)],{'passive':!0x1}),c['addEventListener']('touchmove',this[cH(0x209)],{'passive':!0x1}),c['addEventListener']('touchend',this['onTouchEnd']),c['addEventListener']('contextmenu',this['onContextMenu']);}['isPanning']=!0x1;['lastX']=0x0;[b2(0x1ca)]=0x0;['touches']=new Map();['onPointerDown'];['onPointerMove'];['onPointerUp'];[b2(0x221)];['onTouchStart'];[b2(0x209)];['onTouchEnd'];['onContextMenu'];['destroy'](){const cI=b2;this['canvas']['removeEventListener']('pointerdown',this[cI(0x18a)]),this['canvas']['removeEventListener']('pointermove',this['onPointerMove']),this['canvas']['removeEventListener'](cI(0x26c),this['onPointerUp']),this['canvas']['removeEventListener']('wheel',this['onWheel']),this['canvas']['removeEventListener'](cI(0x210),this['onTouchStart']),this['canvas'][cI(0x28f)]('touchmove',this['onTouchMove']),this[cI(0x224)]['removeEventListener']('touchend',this['onTouchEnd']),this[cI(0x224)][cI(0x28f)](cI(0x1b6),this['onContextMenu']);}[b2(0x244)](c){const cJ=b2,d=this['viewer'][cJ(0x25c)](),f=this['canvas']['getBoundingClientRect'](),g=c['clientX']-f[cJ(0x17c)],h=c['clientY']-f['top'];c[cJ(0x18b)]===0x0&&d===cJ(0x168)?this['startPan'](c,g,h):c['button']===0x1?this[cJ(0x185)](c,g,h):c['button']===0x0&&(d==='select'||d==='measure')&&this['viewer']['handleClick'](g,h);}['startPan'](c,d,f){this['isPanning']=!0x0,this['lastX']=d,this['lastY']=f,this['canvas']['setPointerCapture'](c['pointerId']),this['canvas']['style']['cursor']='grabbing';}['handlePointerMove'](c){const cK=b2,d=this['canvas'][cK(0x1af)](),f=c['clientX']-d['left'],g=c[cK(0x1ba)]-d['top'];if(this['isPanning']){const h=f-this['lastX'],i=g-this['lastY'];this['lastX']=f,this['lastY']=g,this['viewer']['handlePan'](h,i);}else this[cK(0x171)]['handleMouseMove'](f,g);}['handlePointerUp'](c){const cL=b2;this['isPanning']&&(this[cL(0x1fd)]=!0x1,this['canvas']['releasePointerCapture'](c['pointerId']),this['canvas'][cL(0x1b7)]['cursor']=this[cL(0x171)]['getTool']()==='pan'?'grab':'crosshair');}['handleWheel'](c){const cM=b2;c['preventDefault']();const d=this['canvas'][cM(0x1af)](),f=c['clientX']-d[cM(0x17c)],g=c['clientY']-d[cM(0x1f6)],h=-Math['sign'](c[cM(0x1cf)]),k=this['viewer']['getZoomSpeed'](),l=h>0x0?k:0x1/k;this[cM(0x171)]['handleZoom'](f,g,l);}['handleTouchStart'](c){c['preventDefault']();for(const d of Array['from'](c['changedTouches']))this['touches']['set'](d['identifier'],{'x':d['clientX'],'y':d['clientY']});}['handleTouchMove'](d){const cN=b2;if(d['preventDefault'](),this['touches'][cN(0x24b)]===0x2&&d['touches'][cN(0x1bd)]===0x2){const f=d['touches'][0x0],g=d['touches'][0x1],k=Array['from'](this['touches'][cN(0x220)]()),m=Math['hypot'](k[0x0]['x']-k[0x1]['x'],k[0x0]['y']-k[0x1]['y']),p=Math[cN(0x25d)](f['clientX']-g['clientX'],f[cN(0x1ba)]-g[cN(0x1ba)]);if(m>0x0){const v=p/m,w=this[cN(0x224)]['getBoundingClientRect'](),x=(k[0x0]['x']+k[0x1]['x'])/0x2-w[cN(0x17c)],z=(k[0x0]['y']+k[0x1]['y'])/0x2-w['top'],A=(f['clientX']+g['clientX'])/0x2-w['left'],C=(f[cN(0x1ba)]+g['clientY'])/0x2-w['top'];this[cN(0x171)]['handleZoom'](x,z,v),this['viewer'][cN(0x1e3)](A-x,C-z);}}else{if(this['touches']['size']===0x1&&d['touches']['length']===0x1){const D=d['touches'][0x0],F=this[cN(0x1be)]['get'](D['identifier']);F&&this[cN(0x171)]['handlePan'](D['clientX']-F['x'],D['clientY']-F['y']);}}for(const I of Array[cN(0x16f)](d['changedTouches']))this['touches'][cN(0x18c)](I[cN(0x27c)],{'x':I['clientX'],'y':I[cN(0x1ba)]});}['handleTouchEnd'](c){for(const d of Array['from'](c['changedTouches']))this['touches']['delete'](d['identifier']);}},da=0x5,fa=class{['tree']=new Le();['items']=[];[b2(0x193)]=[];['build'](c,d){const cO=b2;this['items']=[],this[cO(0x193)]=new Array(c['length'])['fill'](null);const f=d?new Map():void 0x0;for(let g=0x0;g<c['length'];g++){const h=c[g],i=d&&f?Ee(h,d,f):B(h);this['entityBBoxes'][g]=i,i&&this['items']['push']({...i,'entityIndex':g});}this['tree']['clear'](),this['tree']['load'](this[cO(0x281)]);}['search'](c,d,f,g){const cP=b2;return this[cP(0x19f)]['search']({'minX':c,'minY':d,'maxX':f,'maxY':g});}['getEntityBBox'](c){const cQ=b2;return this[cQ(0x193)][c]??null;}['getEntityBBoxes'](){const cR=b2;return this[cR(0x193)];}['clear'](){this['tree']['clear'](),this['items']=[],this['entityBBoxes']=[];}};function pa(g,k,m,p,v,w){const cS=b2,x=da/w,z=p['search'](g-x,k-x,g+x,k+x);let A=x,C=-0x1;for(let D=z['length']-0x1;D>=0x0;D--){const F=z[D],I=m[F[cS(0x20c)]];if(!I||!v['has'](I['layer'])||!I['visible'])continue;const L=ba(g,k,I);L<A&&(A=L,C=F['entityIndex']);}return C;}function ba(d,f,g){const cT=b2;switch(g[cT(0x267)]){case'LINE':return re(d,f,g['start']['x'],g['start']['y'],g['end']['x'],g['end']['y']);case'CIRCLE':return ma(d,f,g['center']['x'],g['center']['y'],g[cT(0x162)]);case'ARC':return ga(d,f,g['center']['x'],g['center']['y'],g['radius'],g['startAngle']*Math['PI']/0xb4,g['endAngle']*Math['PI']/0xb4);case cT(0x164):case'POLYLINE':{let k=0x1/0x0;const l=g['vertices'],m=g['closed']?l[cT(0x1bd)]:l['length']-0x1;for(let p=0x0;p<m;p++){const u=l[p],v=l[(p+0x1)%l[cT(0x1bd)]],w=re(d,f,u['x'],u['y'],v['x'],v['y']);k=Math['min'](k,w);}return k;}case cT(0x1da):return Fa(d,f,g['center']['x'],g['center']['y'],g['majorAxis'],g['minorRatio']);case'TEXT':case'MTEXT':{const x=B(g);return x?va(d,f,x['minX'],x['minY'],x['maxX'],x['maxY']):0x1/0x0;}case'POINT':return Math['hypot'](d-g['position']['x'],f-g['position']['y']);case'SPLINE':{let z=0x1/0x0;const A=g['controlPoints'];for(let C=0x0;C<A['length']-0x1;C++){const D=re(d,f,A[C]['x'],A[C]['y'],A[C+0x1]['x'],A[C+0x1]['y']);z=Math['min'](z,D);}return z;}default:return 0x1/0x0;}}function re(d,f,g,k,m,p){const cU=b2,v=m-g,w=p-k,x=v*v+w*w;if(x===0x0)return Math[cU(0x25d)](d-g,f-k);let z=((d-g)*v+(f-k)*w)/x;z=Math[cU(0x165)](0x0,Math['min'](0x1,z));const A=g+z*v,C=k+z*w;return Math['hypot'](d-A,f-C);}function ma(c,d,f,g,h){return Math['abs'](Math['hypot'](c-f,d-g)-h);}function ga(g,k,m,o,p,u,v){const cV=b2,w=(Math['atan2'](k-o,g-m)%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),x=(u%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']),z=(v%(0x2*Math['PI'])+0x2*Math['PI'])%(0x2*Math['PI']);if(x<=z?w>=x&&w<=z:w>=x||w<=z)return Math['abs'](Math['hypot'](g-m,k-o)-p);const A=Math[cV(0x25d)](g-(m+p*Math[cV(0x173)](u)),k-(o+p*Math['sin'](u))),C=Math['hypot'](g-(m+p*Math['cos'](v)),k-(o+p*Math['sin'](v)));return Math['min'](A,C);}function va(c,d,f,g,h,k){const cW=b2;if(c>=f&&c<=h&&d>=g&&d<=k)return 0x0;const l=Math['max'](f-c,0x0,c-h),m=Math[cW(0x165)](g-d,0x0,d-k);return Math['hypot'](l,m);}function Fa(g,k,v,w,x,z){const cX=b2,A=Math['atan2'](x['y'],x['x']),C=Math['cos'](-A),D=Math[cX(0x21d)](-A),F=(g-v)*C-(k-w)*D,I=(g-v)*D+(k-w)*C,L=Math['sqrt'](x['x']**0x2+x['y']**0x2),M=L*z;if(L<1e-10)return Math[cX(0x25d)](g-v,k-w);const N=I*(L/M),V=Math['hypot'](F,N);if(V<1e-10)return L;const X=F/V*L,Y=I/V*M;return Math['hypot'](F-X,I-Y);}var xa=class{[b2(0x288)]={'phase':b2(0x26f)};['currentSnap']=null;['activate'](){const cY=b2;this[cY(0x288)]={'phase':cY(0x266)},this['currentSnap']=null;}['deactivate'](){const cZ=b2;this['state']={'phase':'idle'},this[cZ(0x23b)]=null;}['handleClick'](d,f,g){const d0=b2,k=g?g['point']:{'x':d,'y':f};switch(this[d0(0x288)]['phase']){case'first-point':return this['state']={'phase':'second-point','firstPoint':k,'firstSnap':g??void 0x0},null;case d0(0x195):{const l=this['state']['firstPoint'],m=k,p=m['x']-l['x'],u=m['y']-l['y'],v=Math['sqrt'](p*p+u*u),w=Math['atan2'](u,p)*0xb4/Math['PI'];return this['state']={'phase':'done','firstPoint':l,'secondPoint':m,'distance':v,'angle':w},{'distance':v,'angle':w,'deltaX':p,'deltaY':u,'points':[l,m]};}case'done':return this['state']={'phase':d0(0x195),'firstPoint':k},null;default:return null;}}['handleMove'](c){const d1=b2;this[d1(0x23b)]=c;}};function ke(g,k,m,p,v,w=new Set(['endpoint',b2(0x289),b2(0x28e)])){const d2=b2,x=0xa/v,z=[],A=p['search'](g-x,k-x,g+x,k+x);for(const C of A){const D=m[C['entityIndex']];if(!D)continue;const F=C['entityIndex'];switch(D[d2(0x267)]){case d2(0x237):{if(w[d2(0x1b4)]('endpoint')&&(y(z,D['start']['x'],D[d2(0x196)]['y'],'endpoint',F,g,k,x),y(z,D['end']['x'],D['end']['y'],d2(0x26a),F,g,k,x)),w['has']('midpoint')){const I=(D['start']['x']+D['end']['x'])/0x2,L=(D['start']['y']+D['end']['y'])/0x2;y(z,I,L,d2(0x289),F,g,k,x);}break;}case d2(0x1f5):{if(w['has'](d2(0x28e))&&y(z,D['center']['x'],D['center']['y'],d2(0x28e),F,g,k,x),w[d2(0x1b4)](d2(0x26a)))for(const M of[0x0,Math['PI']/0x2,Math['PI'],0x3*Math['PI']/0x2]){const N=D['center']['x']+D['radius']*Math['cos'](M),V=D['center']['y']+D['radius']*Math['sin'](M);y(z,N,V,'endpoint',F,g,k,x);}break;}case'ARC':{if(w['has']('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x),w['has'](d2(0x26a))){const X=D[d2(0x225)]*Math['PI']/0xb4,Y=D['endAngle']*Math['PI']/0xb4;y(z,D[d2(0x28e)]['x']+D['radius']*Math['cos'](X),D['center']['y']+D['radius']*Math['sin'](X),d2(0x26a),F,g,k,x),y(z,D['center']['x']+D[d2(0x162)]*Math['cos'](Y),D['center']['y']+D['radius']*Math['sin'](Y),'endpoint',F,g,k,x);}break;}case'LWPOLYLINE':case d2(0x222):{if(w['has'](d2(0x26a))){for(const a0 of D['vertices'])y(z,a0['x'],a0['y'],'endpoint',F,g,k,x);}if(w['has']('midpoint'))for(let a1=0x0;a1<D['vertices']['length']-0x1;a1++){const a2=D['vertices'][a1],a3=D['vertices'][a1+0x1];y(z,(a2['x']+a3['x'])/0x2,(a2['y']+a3['y'])/0x2,'midpoint',F,g,k,x);}break;}case d2(0x1da):{w[d2(0x1b4)]('center')&&y(z,D['center']['x'],D['center']['y'],'center',F,g,k,x);break;}case'TEXT':{w['has']('endpoint')&&y(z,D[d2(0x1a6)]['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}case'MTEXT':{w['has']('endpoint')&&y(z,D['insertionPoint']['x'],D['insertionPoint']['y'],'endpoint',F,g,k,x);break;}}}return z[d2(0x2a4)]((a4,a5)=>Math['hypot'](a4['point']['x']-g,a4[d2(0x248)]['y']-k)-Math[d2(0x25d)](a5[d2(0x248)]['x']-g,a5[d2(0x248)]['y']-k)),z;}function y(c,d,f,g,h,k,l,m){Math['hypot'](d-k,f-l)<=m&&c['push']({'point':{'x':d,'y':f},'type':g,'entityIndex':h});}function ka(g,k,v,w,x,z){const d3=b2,A=E[z];g['setTransform'](0x1,0x0,0x0,0x1,0x0,0x0);const C=v['state'];if(v[d3(0x23b)]){const [D,F]=W(k,v['currentSnap']['point']['x'],v['currentSnap']['point']['y']);ya(g,D,F,v['currentSnap']['type'],A[d3(0x211)]);}if(C['phase']==='second-point'){const [I,L]=W(k,C['firstPoint']['x'],C['firstPoint']['y']);let M,N;if(v['currentSnap']){const [a0,a1]=W(k,v['currentSnap']['point']['x'],v[d3(0x23b)][d3(0x248)]['y']);M=a0,N=a1;}else M=w,N=x;g['strokeStyle']=A['measureColor'],g['lineWidth']=1.5,g['setLineDash']([0x6,0x3]),g['beginPath'](),g['moveTo'](I,L),g['lineTo'](M,N),g['stroke'](),g['setLineDash']([]),K(g,I,L,A['measureColor']),K(g,M,N,A[d3(0x211)]);let V,X;v[d3(0x23b)]?(V=v['currentSnap'][d3(0x248)]['x'],X=v[d3(0x23b)]['point']['y']):[V,X]=q(k,w,x);const Y=Math['hypot'](V-C['firstPoint']['x'],X-C['firstPoint']['y']);ye(g,(I+M)/0x2,(L+N)/0x2,Y,z);}if(C['phase']==='done'){const [a2,a3]=W(k,C['firstPoint']['x'],C[d3(0x217)]['y']),[a4,a5]=W(k,C['secondPoint']['x'],C[d3(0x212)]['y']);g['strokeStyle']=A['measureColor'],g['lineWidth']=0x2,g['beginPath'](),g['moveTo'](a2,a3),g['lineTo'](a4,a5),g['stroke'](),K(g,a2,a3,A[d3(0x211)]),K(g,a4,a5,A['measureColor']),ye(g,(a2+a4)/0x2,(a3+a5)/0x2,C[d3(0x279)],z);}}function ya(c,d,f,g,h){const d4=b2;c['strokeStyle']=h,c['lineWidth']=0x2;const i=0x8;switch(g){case'endpoint':c[d4(0x167)](d-i/0x2,f-i/0x2,i,i);break;case d4(0x289):c[d4(0x26d)](),c[d4(0x240)](d,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c[d4(0x190)](d-i/0x2,f+i/0x2),c['closePath'](),c['stroke']();break;case d4(0x28e):c[d4(0x26d)](),c['arc'](d,f,i/0x2,0x0,Math['PI']*0x2),c['stroke']();break;case'nearest':c['beginPath'](),c['moveTo'](d-i/0x2,f-i/0x2),c['lineTo'](d+i/0x2,f+i/0x2),c['moveTo'](d+i/0x2,f-i/0x2),c['lineTo'](d-i/0x2,f+i/0x2),c['stroke']();break;}}function K(c,d,f,g){const d5=b2;c['fillStyle']=g,c[d5(0x26d)](),c['arc'](d,f,0x4,0x0,Math['PI']*0x2),c[d5(0x282)]();}function ye(d,f,g,k,m){const d6=b2,p=k['toFixed'](0x4);d['font']='13px\x20monospace',d['textAlign']=d6(0x28e),d[d6(0x1e0)]='bottom';const v=d['measureText'](p),w=0x4,x=f-v['width']/0x2-w,z=g-0x14,A=v[d6(0x19c)]+w*0x2,C=0x12;d['fillStyle']=m==='dark'?'rgba(0,0,0,0.8)':'rgba(255,255,255,0.9)',d['fillRect'](x,z,A,C),d['fillStyle']=E[m]['measureColor'],d['fillText'](p,f,g-0x6);}var Pa=class{[b2(0x290)]=null;[b2(0x263)]=null;['nextId']=0x1;['pending']=new Map();['getWorker'](){const d7=b2;return this['worker']?this['worker']:(this[d7(0x263)]=URL['createObjectURL'](new Blob(['\x22use\x20strict\x22;(()=>{function\x20h(a){let\x20e=a.replace(/\x5cr\x5cn?/g,`\x0a`),t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&e.charCodeAt(n)===10;)n++;if(n>=r)break;let\x20o=e.indexOf(`\x0a`,n);o===-1&&(o=r);let\x20c=e.substring(n,o).trim();n=o+1;let\x20s=parseInt(c,10);if(isNaN(s)){n<r&&(o=e.indexOf(`\x0a`,n),o===-1&&(o=r),n=o+1);continue}if(n>=r)break;o=e.indexOf(`\x0a`,n),o===-1&&(o=r);let\x20p=e.substring(n,o).replace(/\x5cs+$/,\x22\x22);n=o+1,t.push({code:s,value:p})}return\x20t}function\x20m(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===9){let\x20n=r.value;switch(e++,n){case\x22$ACADVER\x22:e<a.length&&(t.acadVersion=a[e].value,e++);break;case\x22$EXTMIN\x22:if(e<a.length){let\x20o=v(a,e);t.extMin=o.point,e=o.nextIndex}break;case\x22$EXTMAX\x22:if(e<a.length){let\x20o=v(a,e);t.extMax=o.point,e=o.nextIndex}break;case\x22$INSUNITS\x22:e<a.length&&(t.insUnits=parseInt(a[e].value,10),e++);break;case\x22$MEASUREMENT\x22:e<a.length&&(t.measurement=parseInt(a[e].value,10),e++);break;case\x22$LTSCALE\x22:e<a.length&&(t.ltScale=parseFloat(a[e].value),e++);break;case\x22$DWGCODEPAGE\x22:e<a.length&&(t.dwgCodePage=a[e].value,e++);break;case\x22$HANDSEED\x22:e<a.length&&(t.handleSeed=a[e].value,e++);break;default:for(;e<a.length&&a[e].code!==9&&a[e].code!==0;)t[n]=a[e].value,e++}}else\x20e++}return\x20e}function\x20v(a,e){let\x20t={x:0,y:0,z:0};for(;e<a.length;){let\x20r=a[e].code;if(r===10)t.x=parseFloat(a[e].value),e++;else\x20if(r===20)t.y=parseFloat(a[e].value),e++;else\x20if(r===30)t.z=parseFloat(a[e].value),e++;else\x20break}return{point:t,nextIndex:e}}function\x20k(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22TABLE\x22){if(e++,e>=a.length)break;let\x20n=a[e].value;switch(e++,n){case\x22LAYER\x22:e=H(a,e,t.layers);break;case\x22LTYPE\x22:e=O(a,e,t.lineTypes);break;case\x22STYLE\x22:e=_(a,e,t.styles);break;default:e=R(a,e);break}}else\x20e++}return\x20e}function\x20R(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDTAB\x22)return\x20e+1;e++}return\x20e}function\x20H(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LAYER\x22){e++;let\x20n={name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x206:n.lineType=o.value;break;case\x2062:n.color=parseInt(o.value,10);break;case\x2070:n.flags=parseInt(o.value,10);break;case\x20370:n.lineWeight=parseInt(o.value,10);break;case\x20420:n.trueColor=parseInt(o.value,10);break}e++}t.set(n.name,n)}else\x20e++}return\x20e}function\x20O(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22LTYPE\x22){e++;let\x20n={name:\x22\x22,description:\x22\x22,pattern:[],totalLength:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.description=o.value;break;case\x2040:n.totalLength=parseFloat(o.value);break;case\x2049:n.pattern.push(parseFloat(o.value));break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20_(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDTAB\x22)return\x20e+1;if(r.code===0&&r.value===\x22STYLE\x22){e++;let\x20n={name:\x22\x22,fontName:\x22\x22,bigFontName:\x22\x22,height:0,widthFactor:1,obliqueAngle:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x203:n.fontName=o.value;break;case\x204:n.bigFontName=o.value;break;case\x2040:n.height=parseFloat(o.value);break;case\x2041:n.widthFactor=parseFloat(o.value);break;case\x2050:n.obliqueAngle=parseFloat(o.value);break}e++}n.name&&t.set(n.name,n)}else\x20e++}return\x20e}function\x20l(a){let\x20e={type:\x22\x22,layer:\x220\x22,color:256,lineType:\x22BYLAYER\x22,lineTypeScale:1,lineWeight:-1,visible:!0,extrusion:{x:0,y:0,z:1}};for(let\x20t\x20of\x20a)switch(t.code){case\x205:e.handle=t.value;break;case\x208:e.layer=t.value;break;case\x206:e.lineType=t.value;break;case\x2048:e.lineTypeScale=parseFloat(t.value);break;case\x2060:e.visible=t.value===\x220\x22||t.value===\x22\x22;break;case\x2062:e.color=parseInt(t.value,10);break;case\x20370:e.lineWeight=parseInt(t.value,10);break;case\x20420:e.trueColor=parseInt(t.value,10);break;case\x20210:e.extrusion.x=parseFloat(t.value);break;case\x20220:e.extrusion.y=parseFloat(t.value);break;case\x20230:e.extrusion.z=parseFloat(t.value);break}return\x20e}function\x20D(a){let\x20t={...l(a),type:\x22LINE\x22,start:{x:0,y:0,z:0},end:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.start.x=parseFloat(r.value);break;case\x2020:t.start.y=parseFloat(r.value);break;case\x2030:t.start.z=parseFloat(r.value);break;case\x2011:t.end.x=parseFloat(r.value);break;case\x2021:t.end.y=parseFloat(r.value);break;case\x2031:t.end.z=parseFloat(r.value);break}return\x20t}function\x20F(a){let\x20t={...l(a),type:\x22CIRCLE\x22,center:{x:0,y:0,z:0},radius:0};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break}return\x20t}function\x20E(a){let\x20t={...l(a),type:\x22ARC\x22,center:{x:0,y:0,z:0},radius:0,startAngle:0,endAngle:360};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2040:t.radius=parseFloat(r.value);break;case\x2050:t.startAngle=parseFloat(r.value);break;case\x2051:t.endAngle=parseFloat(r.value);break}return\x20t}function\x20P(a){let\x20t={...l(a),type:\x22LWPOLYLINE\x22,vertices:[],closed:!1,constantWidth:0,elevation:0},r=null;for(let\x20n\x20of\x20a)switch(n.code){case\x2070:t.closed=(parseInt(n.value,10)&1)!==0;break;case\x2038:t.elevation=parseFloat(n.value);break;case\x2043:t.constantWidth=parseFloat(n.value);break;case\x2010:r&&t.vertices.push(r),r={x:parseFloat(n.value),y:0,bulge:0,startWidth:0,endWidth:0};break;case\x2020:r&&(r.y=parseFloat(n.value));break;case\x2040:r&&(r.startWidth=parseFloat(n.value));break;case\x2041:r&&(r.endWidth=parseFloat(n.value));break;case\x2042:r&&(r.bulge=parseFloat(n.value));break}return\x20r&&t.vertices.push(r),t}function\x20T(a){let\x20t={...l(a),type:\x22POLYLINE\x22,vertices:[],closed:!1,is3d:!1};for(let\x20r\x20of\x20a)if(r.code===70){let\x20n=parseInt(r.value,10);t.closed=(n&1)!==0,t.is3d=(n&8)!==0}return\x20t}function\x20w(a){let\x20t={...l(a),type:\x22ELLIPSE\x22,center:{x:0,y:0,z:0},majorAxis:{x:1,y:0,z:0},minorRatio:1,startParam:0,endParam:Math.PI*2};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.center.x=parseFloat(r.value);break;case\x2020:t.center.y=parseFloat(r.value);break;case\x2030:t.center.z=parseFloat(r.value);break;case\x2011:t.majorAxis.x=parseFloat(r.value);break;case\x2021:t.majorAxis.y=parseFloat(r.value);break;case\x2031:t.majorAxis.z=parseFloat(r.value);break;case\x2040:t.minorRatio=parseFloat(r.value);break;case\x2041:t.startParam=parseFloat(r.value);break;case\x2042:t.endParam=parseFloat(r.value);break}return\x20t}function\x20g(a){let\x20t={...l(a),type:\x22SPLINE\x22,degree:3,flags:0,knots:[],controlPoints:[],fitPoints:[],weights:[]},r=null,n=null;for(let\x20o\x20of\x20a)switch(o.code){case\x2070:t.flags=parseInt(o.value,10);break;case\x2071:t.degree=parseInt(o.value,10);break;case\x2040:t.knots.push(parseFloat(o.value));break;case\x2041:t.weights.push(parseFloat(o.value));break;case\x2010:r&&t.controlPoints.push(r),r={x:parseFloat(o.value),y:0,z:0};break;case\x2020:r&&(r.y=parseFloat(o.value));break;case\x2030:r&&(r.z=parseFloat(o.value));break;case\x2011:n&&t.fitPoints.push(n),n={x:parseFloat(o.value),y:0,z:0};break;case\x2021:n&&(n.y=parseFloat(o.value));break;case\x2031:n&&(n.z=parseFloat(o.value));break;case\x2012:t.startTangent||(t.startTangent={x:0,y:0,z:0}),t.startTangent.x=parseFloat(o.value);break;case\x2022:t.startTangent&&(t.startTangent.y=parseFloat(o.value));break;case\x2032:t.startTangent&&(t.startTangent.z=parseFloat(o.value));break;case\x2013:t.endTangent||(t.endTangent={x:0,y:0,z:0}),t.endTangent.x=parseFloat(o.value);break;case\x2023:t.endTangent&&(t.endTangent.y=parseFloat(o.value));break;case\x2033:t.endTangent&&(t.endTangent.z=parseFloat(o.value));break}return\x20r&&t.controlPoints.push(r),n&&t.fitPoints.push(n),t}function\x20I(a){let\x20t={...l(a),type:\x22TEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,widthFactor:1,obliqueAngle:0,style:\x22STANDARD\x22,hAlign:0,vAlign:0,generationFlags:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.text=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2011:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.x=parseFloat(r.value);break;case\x2021:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.y=parseFloat(r.value);break;case\x2031:t.alignmentPoint||(t.alignmentPoint={x:0,y:0,z:0}),t.alignmentPoint.z=parseFloat(r.value);break;case\x2040:t.height=parseFloat(r.value);break;case\x2041:t.widthFactor=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2051:t.obliqueAngle=parseFloat(r.value);break;case\x207:t.style=r.value;break;case\x2071:t.generationFlags=parseInt(r.value,10);break;case\x2072:t.hAlign=parseInt(r.value,10);break;case\x2073:t.vAlign=parseInt(r.value,10);break}return\x20t}function\x20A(a){let\x20t={...l(a),type:\x22MTEXT\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,width:0,attachmentPoint:1,drawingDirection:1,rotation:0,lineSpacingStyle:1,lineSpacingFactor:1,style:\x22STANDARD\x22,bgFill:0,bgFillScale:1.5},r=[];for(let\x20n\x20of\x20a)switch(n.code){case\x201:r.push(n.value);break;case\x203:r.push(n.value);break;case\x207:t.style=n.value;break;case\x2010:t.insertionPoint.x=parseFloat(n.value);break;case\x2020:t.insertionPoint.y=parseFloat(n.value);break;case\x2030:t.insertionPoint.z=parseFloat(n.value);break;case\x2011:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.x=parseFloat(n.value);break;case\x2021:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.y=parseFloat(n.value);break;case\x2031:t.textDirection||(t.textDirection={x:0,y:0,z:0}),t.textDirection.z=parseFloat(n.value);break;case\x2040:t.height=parseFloat(n.value);break;case\x2041:t.width=parseFloat(n.value);break;case\x2044:t.lineSpacingFactor=parseFloat(n.value);break;case\x2050:t.rotation=parseFloat(n.value);break;case\x2071:t.attachmentPoint=parseInt(n.value,10);break;case\x2072:t.drawingDirection=parseInt(n.value,10);break;case\x2073:t.lineSpacingStyle=parseInt(n.value,10);break;case\x2090:t.bgFill=parseInt(n.value,10);break}return\x20t.text=r.join(\x22\x22),t}function\x20z(a){let\x20t={...l(a),type:\x22INSERT\x22,blockName:\x22\x22,insertionPoint:{x:0,y:0,z:0},scaleX:1,scaleY:1,scaleZ:1,rotation:0,columnCount:1,rowCount:1,columnSpacing:0,rowSpacing:0,attribs:[]};for(let\x20r\x20of\x20a)switch(r.code){case\x202:t.blockName=r.value;break;case\x2010:t.insertionPoint.x=parseFloat(r.value);break;case\x2020:t.insertionPoint.y=parseFloat(r.value);break;case\x2030:t.insertionPoint.z=parseFloat(r.value);break;case\x2041:t.scaleX=parseFloat(r.value);break;case\x2042:t.scaleY=parseFloat(r.value);break;case\x2043:t.scaleZ=parseFloat(r.value);break;case\x2044:t.columnSpacing=parseFloat(r.value);break;case\x2045:t.rowSpacing=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2070:t.columnCount=parseInt(r.value,10)||1;break;case\x2071:t.rowCount=parseInt(r.value,10)||1;break}return\x20t}function\x20S(a){let\x20t={...l(a),type:\x22DIMENSION\x22,blockName:\x22\x22,dimStyle:\x22STANDARD\x22,dimType:0,defPoint:{x:0,y:0,z:0},textMidpoint:{x:0,y:0,z:0},textOverride:\x22\x22,rotation:0,textRotation:0,leaderLength:0};for(let\x20r\x20of\x20a)switch(r.code){case\x201:t.textOverride=r.value;break;case\x202:t.blockName=r.value;break;case\x203:t.dimStyle=r.value;break;case\x2010:t.defPoint.x=parseFloat(r.value);break;case\x2020:t.defPoint.y=parseFloat(r.value);break;case\x2030:t.defPoint.z=parseFloat(r.value);break;case\x2011:t.textMidpoint.x=parseFloat(r.value);break;case\x2021:t.textMidpoint.y=parseFloat(r.value);break;case\x2031:t.textMidpoint.z=parseFloat(r.value);break;case\x2013:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.x=parseFloat(r.value);break;case\x2023:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.y=parseFloat(r.value);break;case\x2033:t.defPoint2||(t.defPoint2={x:0,y:0,z:0}),t.defPoint2.z=parseFloat(r.value);break;case\x2014:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.x=parseFloat(r.value);break;case\x2024:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.y=parseFloat(r.value);break;case\x2034:t.defPoint3||(t.defPoint3={x:0,y:0,z:0}),t.defPoint3.z=parseFloat(r.value);break;case\x2015:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.x=parseFloat(r.value);break;case\x2025:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.y=parseFloat(r.value);break;case\x2035:t.defPoint4||(t.defPoint4={x:0,y:0,z:0}),t.defPoint4.z=parseFloat(r.value);break;case\x2016:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.x=parseFloat(r.value);break;case\x2026:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.y=parseFloat(r.value);break;case\x2036:t.defPoint5||(t.defPoint5={x:0,y:0,z:0}),t.defPoint5.z=parseFloat(r.value);break;case\x2040:t.leaderLength=parseFloat(r.value);break;case\x2050:t.rotation=parseFloat(r.value);break;case\x2053:t.textRotation=parseFloat(r.value);break;case\x2070:t.dimType=parseInt(r.value,10);break}return\x20t}function\x20N(a){let\x20t={...l(a),type:\x22HATCH\x22,patternName:\x22\x22,solidFill:!0,associative:!1,hatchStyle:0,patternType:1,patternAngle:0,patternScale:1,boundaryPaths:[]},r=0;for(;r<a.length;){let\x20n=a[r];switch(n.code){case\x202:t.patternName=n.value;break;case\x2041:t.patternScale=parseFloat(n.value);break;case\x2052:t.patternAngle=parseFloat(n.value);break;case\x2070:t.solidFill=n.value===\x221\x22;break;case\x2071:t.associative=n.value===\x221\x22;break;case\x2075:t.hatchStyle=parseInt(n.value,10);break;case\x2076:t.patternType=parseInt(n.value,10);break;case\x2091:{let\x20o=parseInt(n.value,10);r++;for(let\x20c=0;c<o&&r<a.length;c++){let\x20s=W(a,r);t.boundaryPaths.push(s.path),r=s.nextIndex}continue}}r++}return\x20t}function\x20W(a,e){let\x20t=0;return\x20e<a.length&&a[e].code===92&&(t=parseInt(a[e].value,10),e++),(t&2)!==0?X(a,e,t):Y(a,e,t)}function\x20X(a,e,t){let\x20r={type:\x22polyline\x22,vertices:[],bulges:[],flags:t},n=!1;e<a.length&&a[e].code===72&&(n=a[e].value===\x221\x22,e++),e<a.length&&a[e].code===73&&(r.isClosed=a[e].value===\x221\x22,e++);let\x20o=0;e<a.length&&a[e].code===93&&(o=parseInt(a[e].value,10),e++);for(let\x20c=0;c<o&&e<a.length;c++){let\x20s={x:0,y:0};a[e].code===10&&(s.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.y=parseFloat(a[e].value),e++),r.vertices.push(s),n&&e<a.length&&a[e].code===42?(r.bulges.push(parseFloat(a[e].value)),e++):n&&r.bulges.push(0)}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20c=parseInt(a[e].value,10);e++;for(let\x20s=0;s<c&&e<a.length&&a[e].code===330;s++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20Y(a,e,t){let\x20r={type:\x22edges\x22,edges:[],flags:t},n=0;e<a.length&&a[e].code===93&&(n=parseInt(a[e].value,10),e++);for(let\x20o=0;o<n&&e<a.length&&a[e].code===72;o++){let\x20c=parseInt(a[e].value,10);switch(e++,c){case\x201:{let\x20s={type:\x22line\x22,start:{x:0,y:0},end:{x:0,y:0}};e<a.length&&a[e].code===10&&(s.start.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.start.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.end.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.end.y=parseFloat(a[e].value),e++),r.edges.push(s);break}case\x202:{let\x20s={type:\x22arc\x22,center:{x:0,y:0},radius:0,startAngle:0,endAngle:360,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.radius=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x203:{let\x20s={type:\x22ellipse\x22,center:{x:0,y:0},majorAxis:{x:1,y:0},minorRatio:1,startAngle:0,endAngle:Math.PI*2,ccw:!0};e<a.length&&a[e].code===10&&(s.center.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(s.center.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===11&&(s.majorAxis.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===21&&(s.majorAxis.y=parseFloat(a[e].value),e++),e<a.length&&a[e].code===40&&(s.minorRatio=parseFloat(a[e].value),e++),e<a.length&&a[e].code===50&&(s.startAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===51&&(s.endAngle=parseFloat(a[e].value),e++),e<a.length&&a[e].code===73&&(s.ccw=a[e].value===\x221\x22,e++),r.edges.push(s);break}case\x204:{let\x20s=3,p=[],b=[];e<a.length&&a[e].code===94&&(s=parseInt(a[e].value,10),e++),e<a.length&&a[e].code===73&&e++,e<a.length&&a[e].code===74&&e++;let\x20d=0;e<a.length&&a[e].code===95&&(d=parseInt(a[e].value,10),e++);let\x20x=0;e<a.length&&a[e].code===96&&(x=parseInt(a[e].value,10),e++);for(let\x20f=0;f<d&&e<a.length&&a[e].code===40;f++)p.push(parseFloat(a[e].value)),e++;for(let\x20f=0;f<x&&e<a.length;f++){let\x20y={x:0,y:0};a[e].code===10&&(y.x=parseFloat(a[e].value),e++),e<a.length&&a[e].code===20&&(y.y=parseFloat(a[e].value),e++),b.push(y)}r.edges.push({type:\x22spline\x22,degree:s,knots:p,controlPoints:b});break}default:break}}for(;e<a.length&&(a[e].code===97||a[e].code===330);)if(a[e].code===97){let\x20o=parseInt(a[e].value,10);e++;for(let\x20c=0;c<o&&e<a.length&&a[e].code===330;c++)e++}else\x20e++;return{path:r,nextIndex:e}}function\x20L(a){let\x20t={...l(a),type:\x22POINT\x22,position:{x:0,y:0,z:0}};for(let\x20r\x20of\x20a)switch(r.code){case\x2010:t.position.x=parseFloat(r.value);break;case\x2020:t.position.y=parseFloat(r.value);break;case\x2030:t.position.z=parseFloat(r.value);break}return\x20t}function\x20u(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code!==0){e++;continue}let\x20n=r.value;if(n===\x22ENDSEC\x22||n===\x22ENDBLK\x22)return\x20e+1;e++;let\x20o=[];for(;e<a.length&&a[e].code!==0;)o.push(a[e]),e++;switch(n){case\x22LINE\x22:t.push(D(o));break;case\x22CIRCLE\x22:t.push(F(o));break;case\x22ARC\x22:t.push(E(o));break;case\x22LWPOLYLINE\x22:t.push(P(o));break;case\x22ELLIPSE\x22:t.push(w(o));break;case\x22SPLINE\x22:t.push(g(o));break;case\x22TEXT\x22:t.push(I(o));break;case\x22MTEXT\x22:t.push(A(o));break;case\x22INSERT\x22:{let\x20c=z(o);o.some(p=>p.code===66&&p.value===\x221\x22)&&(e=$(a,e,c.attribs)),t.push(c);break}case\x22DIMENSION\x22:t.push(S(o));break;case\x22HATCH\x22:t.push(N(o));break;case\x22POINT\x22:t.push(L(o));break;case\x22POLYLINE\x22:{let\x20c=T(o);e=V(a,e,c.vertices),t.push(c);break}default:break}}return\x20e}function\x20V(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22VERTEX\x22){e++;let\x20n={x:0,y:0,bulge:0,startWidth:0,endWidth:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x2010:n.x=parseFloat(o.value);break;case\x2020:n.y=parseFloat(o.value);break;case\x2042:n.bulge=parseFloat(o.value);break;case\x2040:n.startWidth=parseFloat(o.value);break;case\x2041:n.endWidth=parseFloat(o.value);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20$(a,e,t){for(;e<a.length;){if(a[e].code!==0){e++;continue}let\x20r=a[e].value;if(r===\x22SEQEND\x22)return\x20e+1;if(r===\x22ENDSEC\x22||r===\x22ENDBLK\x22)return\x20e;if(r===\x22ATTRIB\x22){e++;let\x20n={tag:\x22\x22,text:\x22\x22,insertionPoint:{x:0,y:0,z:0},height:1,rotation:0,style:\x22STANDARD\x22,layer:\x220\x22,color:256};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x201:n.text=o.value;break;case\x202:n.tag=o.value;break;case\x207:n.style=o.value;break;case\x208:n.layer=o.value;break;case\x2010:n.insertionPoint.x=parseFloat(o.value);break;case\x2020:n.insertionPoint.y=parseFloat(o.value);break;case\x2030:n.insertionPoint.z=parseFloat(o.value);break;case\x2040:n.height=parseFloat(o.value);break;case\x2050:n.rotation=parseFloat(o.value);break;case\x2062:n.color=parseInt(o.value,10);break}e++}t.push(n)}else\x20for(e++;e<a.length&&a[e].code!==0;)e++}return\x20e}function\x20B(a,e,t){for(;e<a.length;){let\x20r=a[e];if(r.code===0&&r.value===\x22ENDSEC\x22)return\x20e+1;if(r.code===0&&r.value===\x22BLOCK\x22){e++;let\x20n={name:\x22\x22,basePoint:{x:0,y:0,z:0},entities:[],flags:0};for(;e<a.length&&a[e].code!==0;){let\x20o=a[e];switch(o.code){case\x202:n.name=o.value;break;case\x208:break;case\x2010:n.basePoint.x=parseFloat(o.value);break;case\x2020:n.basePoint.y=parseFloat(o.value);break;case\x2030:n.basePoint.z=parseFloat(o.value);break;case\x2070:n.flags=parseInt(o.value,10);break}e++}e=u(a,e,n.entities),n.name&&!n.name.startsWith(\x22*Model_Space\x22)&&!n.name.startsWith(\x22*Paper_Space\x22)&&t.set(n.name,n)}else\x20e++}return\x20e}var\x20C=\x22AutoCAD\x20Binary\x20DXF\x22,U={ANSI_874:\x22windows-874\x22,ANSI_932:\x22shift_jis\x22,ANSI_936:\x22gbk\x22,ANSI_949:\x22euc-kr\x22,ANSI_950:\x22big5\x22,ANSI_1250:\x22windows-1250\x22,ANSI_1251:\x22windows-1251\x22,ANSI_1252:\x22windows-1252\x22,ANSI_1253:\x22windows-1253\x22,ANSI_1254:\x22windows-1254\x22,ANSI_1255:\x22windows-1255\x22,ANSI_1256:\x22windows-1256\x22,ANSI_1257:\x22windows-1257\x22,ANSI_1258:\x22windows-1258\x22},G=\x22AC1021\x22;function\x20K(){return{acadVersion:\x22\x22,insUnits:0,measurement:0,ltScale:1}}function\x20j(a){return\x20a.replace(/\x5c\x5cU\x5c+([0-9A-Fa-f]{4})/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}function\x20q(a){if(typeof\x20a==\x22string\x22)return\x20j(a);let\x20e=new\x20Uint8Array(a);if(new\x20TextDecoder(\x22ascii\x22).decode(e.slice(0,C.length))===C)throw\x20new\x20i(\x22Binary\x20DXF\x20format\x20is\x20not\x20supported.\x20Please\x20export\x20as\x20ASCII\x20DXF.\x22);let\x20r=new\x20TextDecoder(\x22utf-8\x22).decode(a),o=r.match(/\x5c$ACADVER[\x5cs\x5cS]*?\x5cn\x5cs*1\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22;if(o&&o<G){let\x20s=r.match(/\x5c$DWGCODEPAGE[\x5cs\x5cS]*?\x5cn\x5cs*3\x5cs*\x5cn\x5cs*(\x5cS+)/)?.[1]??\x22\x22,p=U[s]??\x22windows-1252\x22;p!==\x22utf-8\x22&&(r=new\x20TextDecoder(p).decode(a))}return\x20j(r)}function\x20Q(a,e){for(;e<a.length;){if(a[e].code===0&&a[e].value===\x22ENDSEC\x22)return\x20e+1;e++}return\x20e}function\x20Z(a){a.layers.has(\x220\x22)||a.layers.set(\x220\x22,{name:\x220\x22,color:7,lineType:\x22Continuous\x22,flags:0,lineWeight:-3,isOff:!1,isFrozen:!1,isLocked:!1})}function\x20J(a){for(let[,e]of\x20a.layers)e.isOff=e.color<0,e.isOff&&(e.color=Math.abs(e.color)),e.isFrozen=(e.flags&1)!==0,e.isLocked=(e.flags&4)!==0}var\x20i=class\x20extends\x20Error{constructor(t,r){super(t);this.cause=r;this.name=\x22DxfParseError\x22}};function\x20M(a){if(typeof\x20a==\x22string\x22){if(a.length===0)throw\x20new\x20i(\x22Input\x20is\x20empty.\x20Expected\x20a\x20DXF\x20string\x20or\x20ArrayBuffer.\x22)}else\x20if(a\x20instanceof\x20ArrayBuffer){if(a.byteLength===0)throw\x20new\x20i(\x22Input\x20ArrayBuffer\x20is\x20empty.\x22)}else\x20throw\x20new\x20i(\x22Invalid\x20input\x20type.\x20Expected\x20a\x20string\x20or\x20ArrayBuffer.\x22);let\x20e;try{e=q(a)}catch(n){throw\x20n\x20instanceof\x20i?n:new\x20i(\x22Failed\x20to\x20decode\x20DXF\x20input.\x22,n)}let\x20t;try{t=h(e)}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20tokenize\x20DXF\x20content.\x22,n)}if(t.length===0)throw\x20new\x20i(\x22DXF\x20content\x20produced\x20no\x20tokens.\x20The\x20input\x20may\x20not\x20be\x20a\x20valid\x20DXF\x20file.\x22);let\x20r={header:K(),layers:new\x20Map,lineTypes:new\x20Map,styles:new\x20Map,blocks:new\x20Map,entities:[]};try{let\x20n=0;for(;n<t.length;){let\x20o=t[n];if(o.code===0&&o.value===\x22SECTION\x22){if(n++,n>=t.length)break;let\x20c=t[n].value;switch(n++,c){case\x22HEADER\x22:n=m(t,n,r.header);break;case\x22TABLES\x22:n=k(t,n,r);break;case\x22BLOCKS\x22:n=B(t,n,r.blocks);break;case\x22ENTITIES\x22:n=u(t,n,r.entities);break;default:n=Q(t,n);break}}else{if(o.code===0&&o.value===\x22EOF\x22)break;n++}}}catch(n){throw\x20new\x20i(\x22Failed\x20to\x20parse\x20DXF\x20sections.\x22,n)}return\x20Z(r),J(r),r}self.onmessage=a=>{let{type:e,id:t,payload:r}=a.data;if(e===\x22parse\x22)try{let\x20n=M(r);postMessage({type:\x22result\x22,id:t,doc:n})}catch(n){let\x20o=n\x20instanceof\x20Error?n.message:String(n);postMessage({type:\x22error\x22,id:t,message:o})}};})();\x0a'],{'type':'text/javascript'})),this['worker']=new Worker(this['blobUrl']),this['worker']['onmessage']=c=>{const d8=d7,{type:d,id:f,doc:g,message:h}=c['data'],i=this['pending']['get'](f);i&&(this[d8(0x27e)][d8(0x20a)](f),d==='result'?i['resolve'](this['reviveDocument'](g)):d==='error'&&i['reject'](new Error(h??'Worker\x20parse\x20failed')));},this['worker']['onerror']=c=>{const d9=d7,d=new Error(c['message']??d9(0x1d7));for(const [,f]of this[d9(0x27e)])f['reject'](d);this['pending']['clear'](),this['destroyWorker']();},this['worker']);}['parse'](c){return new Promise((d,f)=>{const db=b,g=this['nextId']++;this[db(0x27e)]['set'](g,{'resolve':d,'reject':f});let h;try{h=this['getWorker']();}catch(l){this['pending']['delete'](g),f(l instanceof Error?l:new Error(String(l)));return;}const k={'type':'parse','id':g,'payload':c};try{c instanceof ArrayBuffer?h['postMessage'](k,[c]):h['postMessage'](k);}catch(m){this['pending']['delete'](g),f(m instanceof Error?m:new Error(String(m)));}});}['terminate'](){const dc=b2;this['destroyWorker']();const c=new Error(dc(0x17e));for(const [,d]of this['pending'])d['reject'](c);this['pending']['clear']();}['destroyWorker'](){this['worker']&&(this['worker']['terminate'](),this['worker']=null),this['blobUrl']&&(URL['revokeObjectURL'](this['blobUrl']),this['blobUrl']=null);}['reviveDocument'](c){const dd=b2;return{...c,'layers':this['ensureMap'](c[dd(0x250)]),'lineTypes':this['ensureMap'](c['lineTypes']),'styles':this['ensureMap'](c[dd(0x1b1)]),'blocks':this['ensureMap'](c['blocks'])};}[b2(0x1dc)](c){const df=b2;return c instanceof Map?c:c&&typeof c==df(0x177)?new Map(Object['entries'](c)):new Map();}},wa=class{['canvas'];[b2(0x1f9)];[b2(0x1b0)];['layerManager'];['emitter'];[b2(0x227)];['measureTool'];['doc']=null;['options'];['currentTool'];['inputHandler'];['resizeObserver'];['formatConverters'];['workerManager']=null;['selectedEntityIndex']=-0x1;[b2(0x24c)]=!0x1;['destroyed']=!0x1;['loadGeneration']=0x0;['mouseScreenX']=0x0;['mouseScreenY']=0x0;['debugEnabled']=!0x1;[b2(0x1e7)];['lastRenderStats']=null;['lastDebugStats']=null;['frameTimestamps']=[];[b2(0x23d)]=0x0;['lastFrameTime']=0x0;['parseTime']=0x0;[b2(0x268)]=0x0;['loadedFileName']=null;['loadedFileSize']=0x0;[b2(0x295)]=0x0;constructor(c,d){const dg=b2;this['canvas']=c,this['options']={'theme':d?.['theme']??'dark','backgroundColor':d?.['backgroundColor'],'antialias':d?.['antialias']??!0x0,'minZoom':d?.['minZoom']??0.0001,'maxZoom':d?.['maxZoom']??0x186a0,'zoomSpeed':d?.['zoomSpeed']??1.1,'initialTool':d?.['initialTool']??'pan'},this['formatConverters']=d?.['formatConverters']??[],d?.['worker']&&(this['workerManager']=new Pa()),d?.['debug']?(this['debugEnabled']=!0x0,this['debugOptions']=ne(typeof d['debug']=='boolean'?void 0x0:d['debug'])):this['debugOptions']=ne(),this['renderer']=new na(c),this['camera']=new yt(this['options']),this['layerManager']=new ca(),this['emitter']=new ha(),this['spatialIndex']=new fa(),this['measureTool']=new xa(),this['currentTool']=this['options']['initialTool'],this['inputHandler']=new ua(c,this),this['resizeObserver']=new ResizeObserver(()=>this['resize']()),this['resizeObserver']['observe'](c),c['style']['cursor']=this['getCursorForTool'](this['currentTool']),this['requestRender'](),this[dg(0x2a2)]&&this['startDebugLoop']();}[b2(0x255)](){if(this['destroyed'])throw new Error('CadViewer:\x20cannot\x20call\x20methods\x20on\x20a\x20destroyed\x20instance.');}async[b2(0x1cd)](c){const dh=b2;for(const d of this[dh(0x1cc)]){let f=!0x1;try{f=d['detect'](c);}catch{continue;}if(f)return d['convert'](c);}return null;}async['loadFile'](c){const di=b2;this['guardDestroyed']();const d=++this['loadGeneration'];this['loadedFileName']=c['name'],this['loadedFileSize']=c['size'];const f=await c['arrayBuffer']();if(this['destroyed']||d!==this['loadGeneration'])return;const g=await this['runConverters'](f);if(this['destroyed']||d!==this['loadGeneration'])return;const h=performance['now'](),i=g??f;this['doc']=await this[di(0x2a6)](i,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance[di(0x234)]()-h,this['onDocumentLoaded']());}async['loadBuffer'](c){const dj=b2;this['guardDestroyed']();const d=++this['loadGeneration'];this[dj(0x22d)]=null,this['loadedFileSize']=c['byteLength'];const f=await this['runConverters'](c);if(this['destroyed']||d!==this['loadGeneration'])return;const g=performance[dj(0x234)](),h=f??c;this['doc']=await this['parseWithOptionalWorker'](h,d),!(this['destroyed']||d!==this['loadGeneration'])&&(this['parseTime']=performance['now']()-g,this['onDocumentLoaded']());}async['parseWithOptionalWorker'](c,d){const dk=b2;if(!this['workerManager'])return ae(c);try{return await this[dk(0x1bb)]['parse'](c);}catch(f){if(this['destroyed']||d!==this['loadGeneration'])return null;throw f;}}['loadDocument'](c){const dl=b2;if(this['guardDestroyed'](),++this['loadGeneration'],this[dl(0x22d)]=null,this['loadedFileSize']=0x0,this['parseTime']=0x0,!c||!Array['isArray'](c['entities'])||!(c['layers']instanceof Map))throw new Error('CadViewer:\x20invalid\x20DxfDocument\x20—\x20expected\x20entities\x20array\x20and\x20layers\x20Map.');this['doc']=c,this['onDocumentLoaded']();}[b2(0x1b2)](c){const dm=b2;this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this[dm(0x232)]=c['length'];const d=performance['now']();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}['loadArrayBuffer'](c){this['guardDestroyed'](),++this['loadGeneration'],this['loadedFileName']=null,this['loadedFileSize']=c['byteLength'];const d=performance['now']();this['doc']=ae(c),this['parseTime']=performance['now']()-d,this['onDocumentLoaded']();}['clearDocument'](){const dn=b2;this['guardDestroyed'](),++this['loadGeneration'],this['doc']=null,this['selectedEntityIndex']=-0x1,this['spatialIndex'][dn(0x21e)](),ve(),this['layerManager']['clear'](),this['measureTool']['deactivate'](),this['requestRender']();}['onDocumentLoaded'](){const dp=b2;if(!this['doc'])return;this['layerManager'][dp(0x206)](this[dp(0x278)]['layers']);const c=performance['now']();this['spatialIndex'][dp(0x26e)](this['doc'][dp(0x293)],this['doc']),_t(Ot(this['doc'])),this['spatialIndexBuildTime']=performance['now']()-c,this['selectedEntityIndex']=-0x1,this['measureTool']['deactivate'](),this['currentTool']==='measure'&&this[dp(0x1ef)]['activate'](),this['fitToView']();}[b2(0x1a4)](){const dq=b2;if(this['guardDestroyed'](),!this['doc'])return;const c=this['computeDocumentBounds']();if(!c)return;const d=this['canvas']['getBoundingClientRect']();this['camera']['setTransform'](xt(d['width'],d['height'],c['minX'],c['minY'],c['maxX'],c['maxY'])),this['requestRender'](),this['emitter']['emit'](dq(0x219),this['camera']['getTransform']());}[b2(0x15f)](c){this['guardDestroyed']();const d=this['canvas']['getBoundingClientRect'](),f=d['width']/0x2,g=d['height']/0x2,h=c/this['camera']['getTransform']()['scale'];this['camera']['zoom'](f,g,h),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['panTo'](c,d){const dr=b2;this[dr(0x255)]();const f=this['canvas']['getBoundingClientRect'](),g=this['camera']['getTransform'](),h=c*g['scale']+g[dr(0x154)],k=-d*g['scale']+g[dr(0x1b3)],l=f['width']/0x2-h,m=f['height']/0x2-k;this[dr(0x1b0)]['pan'](l,m),this['requestRender'](),this['emitter']['emit']('viewchange',this[dr(0x1b0)]['getTransform']());}['getViewTransform'](){const ds=b2;return{...this['camera'][ds(0x24f)]()};}['getZoomSpeed'](){const du=b2;return this[du(0x1e4)][du(0x1a3)];}[b2(0x298)](){return this['layerManager']['getAllLayers']();}['setLayerVisible'](c,d){const dv=b2;this['guardDestroyed'](),this['layerManager']['setVisible'](c,d),this[dv(0x1bf)]();}['setLayerColor'](c,d){const dw=b2;this['guardDestroyed'](),this[dw(0x245)]['setColorOverride'](c,d),this['requestRender']();}['setTheme'](c){const dx=b2;this['guardDestroyed'](),this[dx(0x1e4)][dx(0x285)]=c,this['requestRender']();}['getTheme'](){return this['options']['theme'];}['setBackgroundColor'](c){this['guardDestroyed'](),this['options']['backgroundColor']=c,this['requestRender']();}['setTool'](c){const dy=b2;this['guardDestroyed'](),this[dy(0x1fe)]===dy(0x17a)&&c!=='measure'&&this['measureTool']['deactivate'](),this['currentTool']=c,this['canvas']['style'][dy(0x2a0)]=this['getCursorForTool'](c),c==='measure'&&this[dy(0x1ef)][dy(0x1bc)](),c!=='select'&&(this[dy(0x1d5)]=-0x1),this['requestRender']();}['getTool'](){return this['currentTool'];}[b2(0x286)](c){const dz=b2;switch(c){case'pan':return dz(0x241);case dz(0x22b):return'crosshair';case'measure':return'crosshair';}}['on'](c,d){this['emitter']['on'](c,d);}['off'](c,d){const dA=b2;this['emitter'][dA(0x1b8)](c,d);}['getDocument'](){return this['doc'];}['getEntities'](){return this['doc']?.['entities']??[];}['resize'](){this['renderer']['updateSize'](),this['requestRender']();}['destroy'](){const dB=b2;this[dB(0x229)]=!0x0,this[dB(0x272)](),this['inputHandler']['destroy'](),this['resizeObserver']['disconnect'](),this['renderer']['destroy'](),this['emitter'][dB(0x15b)](),this['spatialIndex'][dB(0x21e)](),ve(),this['layerManager']['clear'](),this['workerManager']?.['terminate'](),this['workerManager']=null,this['doc']=null;}[b2(0x1bf)](){const dC=b2;if(!this['destroyed']){if(this['debugRafId']){this[dC(0x246)]();return;}this['renderPending']||(this[dC(0x24c)]=!0x0,requestAnimationFrame(()=>{this['renderPending']=!0x1,!this['destroyed']&&this['doRender']();}));}}['doRender'](){const dD=b2;if(!this['doc']){this['renderer'][dD(0x218)](this['options']['theme']);return;}const d=this['camera']['getTransform'](),f=this[dD(0x1f9)]['getWidth'](),g=this['renderer']['getHeight'](),k=this['computeViewportBounds'](d,f,g),m=this['spatialIndex'][dD(0x27d)](k['minX'],k['minY'],k['maxX'],k['maxY']),p=new Set();for(let x=0x0;x<m['length'];x++)p['add'](m[x]['entityIndex']);const u=performance[dD(0x234)](),v=this['renderer']['render'](this['doc'],d,this[dD(0x1e4)]['theme'],this['layerManager']['getVisibleLayerNames'](),this['selectedEntityIndex'],p,this['spatialIndex']['getEntityBBoxes']());this['lastFrameTime']=performance['now']()-u,this['lastRenderStats']=v;const w=performance['now']();for(w-this[dD(0x23d)]>=0x3&&this['frameTimestamps']['push'](w),this['lastDoRenderTime']=w;this['frameTimestamps'][dD(0x1bd)]>0x0&&this['frameTimestamps'][0x0]<w-0x3e8;)this[dD(0x1a7)]['shift']();if(this['currentTool']===dD(0x17a)&&this['measureTool']['state']['phase']!=='idle'){const z=this['renderer']['getContext']();ka(z,this['camera']['getTransform'](),this['measureTool'],this['mouseScreenX'],this['mouseScreenY'],this['options'][dD(0x285)]);}if(this['debugEnabled']){const A=this[dD(0x1f9)]['getContext'](),C=this[dD(0x186)]();this[dD(0x262)]=C,la(A,C,this['options']['theme'],this['debugOptions'],this['renderer'][dD(0x191)](),this['renderer']['getHeight']());}}['setDebug'](c){const dE=b2;this[dE(0x255)](),typeof c=='boolean'?this['debugEnabled']=c:(this['debugEnabled']=!0x0,this[dE(0x1e7)]=ne(c)),this['debugEnabled']?this['startDebugLoop']():(this['stopDebugLoop'](),this['requestRender']());}['startDebugLoop'](){if(this['debugRafId'])return;const c=()=>{if(!this['debugEnabled']||this['destroyed']){this['debugRafId']=0x0;return;}this['doRender'](),this['debugRafId']=requestAnimationFrame(c);};this['debugRafId']=requestAnimationFrame(c);}[b2(0x272)](){this['debugRafId']&&(cancelAnimationFrame(this['debugRafId']),this['debugRafId']=0x0);}['getDebugStats'](){return this['debugEnabled']?this['lastDebugStats']:null;}['buildDebugStats'](){const dF=b2,c=this['camera'][dF(0x24f)](),d=this['renderer'][dF(0x191)](),f=this['renderer'][dF(0x1fa)](),g=this['computeViewportBounds'](c,d,f);return{'fps':this['frameTimestamps'][dF(0x1bd)],'frameTime':this['lastFrameTime'],'renderStats':this['lastRenderStats']??{'entitiesDrawn':0x0,'entitiesSkipped':0x0,'drawCalls':0x0,'byType':{}},'entityCount':this['doc']?.['entities']['length']??0x0,'layerCount':this['doc']?.['layers']['size']??0x0,'visibleLayerCount':this['layerManager'][dF(0x256)]()['size'],'blockCount':this['doc']?.['blocks']['size']??0x0,'parseTime':this['parseTime'],'spatialIndexBuildTime':this[dF(0x268)],'totalLoadTime':this['parseTime']+this['spatialIndexBuildTime'],'zoom':c['scale'],'pixelSize':c['scale']>0x0?0x1/c['scale']:0x0,'viewportBounds':g,'fileName':this['loadedFileName'],'fileSize':this['loadedFileSize'],'dxfVersion':this[dF(0x278)]?.[dF(0x25a)][dF(0x17d)]??null};}[b2(0x226)](c,d,f){const dG=b2,[g,h]=q(c,0x0,f),[k,l]=q(c,d,0x0);return{'minX':Math['min'](g,k),'minY':Math[dG(0x1df)](h,l),'maxX':Math[dG(0x165)](g,k),'maxY':Math['max'](h,l)};}['handlePan'](c,d){this['camera']['pan'](c,d),this['requestRender'](),this['emitter']['emit']('viewchange',this['camera']['getTransform']());}['handleZoom'](c,d,f){const dH=b2;this['camera']['zoom'](c,d,f),this['requestRender'](),this['emitter']['emit']('viewchange',this[dH(0x1b0)]['getTransform']());}['handleClick'](c,d){const dI=b2;if(!this['doc'])return;const f=this[dI(0x1b0)][dI(0x24f)](),[g,h]=q(f,c,d);switch(this['currentTool']){case'select':this[dI(0x261)](g,h,c,d);break;case'measure':{const k=ke(g,h,this['doc']['entities'],this[dI(0x227)],f[dI(0x1e1)]),l=k['length']>0x0?k[0x0]:null,m=this['measureTool']['handleClick'](g,h,l);this[dI(0x1bf)](),m&&this[dI(0x1e8)]['emit']('measure',m);break;}}}['handleMouseMove'](c,d){const dJ=b2;if(this['mouseScreenX']=c,this[dJ(0x22c)]=d,this['currentTool']==='measure'&&this['doc']){const f=this['camera'][dJ(0x24f)](),[g,h]=q(f,c,d),i=ke(g,h,this['doc'][dJ(0x293)],this['spatialIndex'],f['scale']);this['measureTool']['handleMove'](i[0x0]??null),this['requestRender']();}}['handleSelect'](c,d,f,g){const dK=b2;if(!this[dK(0x278)])return;const h=pa(c,d,this['doc']['entities'],this['spatialIndex'],this[dK(0x245)][dK(0x256)](),this[dK(0x1b0)]['getTransform']()['scale']);if(this['selectedEntityIndex']=h,this['requestRender'](),h>=0x0&&this['doc']){const i=this['doc']['entities'][h];i&&this[dK(0x1e8)]['emit']('select',{'entity':i,'entityIndex':h,'worldPoint':{'x':c,'y':d},'screenPoint':{'x':f,'y':g}});}}['computeDocumentBounds'](){const dL=b2;return this['doc']?this[dL(0x278)]['header'][dL(0x1c6)]&&this['doc']['header']['extMax']?{'minX':this['doc']['header']['extMin']['x'],'minY':this['doc']['header'][dL(0x1c6)]['y'],'maxX':this['doc']['header']['extMax']['x'],'maxY':this[dL(0x278)]['header']['extMax']['y']}:Rt(this['doc']['entities']):null;}};export{wa as CadViewer,yt as Camera,na as CanvasRenderer,T as DxfParseError,ha as EventEmitter,ca as LayerManager,xa as MeasureTool,fa as SpatialIndex,E as THEMES,Ft as aciToHex,me as applyTransform,Rt as computeEntitiesBounds,B as computeEntityBBox,J as drawEntity,ke as findSnaps,xt as fitToView,pa as hitTest,ae as parseDxf,la as renderDebugOverlay,ka as renderMeasureOverlay,se as resolveEntityColor,q as screenToWorld,W as worldToScreen,kt as zoomAtPoint};
|