UNPKG

@typecad/typecad

Version:

๐Ÿค–programmatically ๐Ÿ’ฅcreate ๐Ÿ›ฐ๏ธhardware

1 lines โ€ข 50.8 kB
function a11_0x51ec(){const _0x1cb5d2=['forEach','red','length','outlines_public','debug','filter','elements','set','existingBoardElements','slice','string','startsWith','push','isArray','symbol','substring','footprint','zone','generator','generator_version','includes','Schematic','yellow','(net\x20','pop','net','trim','from','sort','toLowerCase','max','replace','has','layers','paper','general','setup','splice','replaceAll','line','error','get','pcb','rotation','_updateFootprintNodePublic','getCallSite','file','reference','message','options','via','gr_arc',']\x20Failed\x20to\x20create\x20footprint\x20node.\x20Is\x20the\x20.kicad_mod\x20missing\x20or\x20empty\x20in\x20build/footprints/?\x20Footprint\x20must\x20be\x20in\x20format\x20\x22library:footprint\x22\x20(e.g.,\x20\x22Resistor_SMD:R_0603_1608Metric\x22\x20or\x20\x22lib:Local_Footprint\x22','netCode','found','warn','join','drill',')\x20(layers\x20','\x22))','layer','Edge.Cuts','(segment\x20(start\x20',')\x20(end\x20','locked','\x22)\x20(uuid\x20\x22','end',')\x20(stroke\x20(width\x20','strokeWidth','type','start','mid','๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20outline\x20element\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20','uuid','gray','segmentsAdded','\x22)\x20','thickness','(thickness\x20','italic\x20','justify','vertical','mirror\x20','\x20hide','text','๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_text\x20S-expression\x20for\x20UUID\x20','\x20-\x20',')\x20(type\x20default))\x20(layer\x20\x22','๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_line\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20','\x20(called\x20from\x20','fill','\x20(locked\x20yes)','๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_poly\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20','pin','name','map','(name\x20\x22','(priority\x20','(arc_segments\x20','thermalGap','(thermal_bridge_width\x20','smoothing','hatched','(hatch_thickness\x20','hatchGap','(hatch_orientation\x20','hatchSmoothingLevel','(hatch_smoothing_value\x20','hatchSmoothingValue','(hatch_min_hole_area\x20','hatchMinHoleArea','clearance',')\x20(net_name\x20\x22','(polygon\x20(pts\x20','๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20zone\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20','polygon','(locked)\x20','not_allowed','allowed','pads','copperpour','footprints',')\x20(footprints\x20','))\x20','smoothingRadius','(smoothing\x20','(zone\x20(net\x200)\x20(net_name\x20\x22\x22)\x20(layers\x20',')))','๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20keepout\x20zone\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20','add','kicad_pcb','stringify','[BoardCreation][DIAG]\x20pcb.pcb\x20length=','(gr_line','[BoardCreation][DIAG]\x20pcb.pcb\x20prefix:\x0a','env','writeFileSync','[BoardCreation][DIAG]\x20debug\x20file\x20written:\x20',',\x20contains\x20(segment=','info','[BoardCreation][VERIFY]\x20file\x20contains\x20segments=',',\x20gr_lines=','\x20\x20\x20\x20โ””โ”€โ”€\x20','green'];a11_0x51ec=function(){return _0x1cb5d2;};return a11_0x51ec();}import{Component}from'../component';import{TrackBuilder}from'./pcb_track_builder';import{printTypecadOutputSummary}from'../schematic';import a11_0x4d17b1 from'node:fs';import a11_0x16c723 from'fast-sexpr';import a11_0x207bf3 from's-expression.js';function a11_0x1f99(_0x51ec4e,_0x1f9938){const _0x553542=a11_0x51ec();return a11_0x1f99=function(_0xa84788,_0x85774f){_0xa84788=_0xa84788-0x0;let _0x5832a0=_0x553542[_0xa84788];return _0x5832a0;},a11_0x1f99(_0x51ec4e,_0x1f9938);}import a11_0x263fab from'chalk';import a11_0x17a50a from'../logging.js';const S=new a11_0x207bf3();export async function createBoard(_0x73dc19,..._0x21d407){const _0xb57650=[],_0x1d4e57=[];_0x21d407['forEach'](_0x267526=>{if(_0x267526 instanceof Component)_0xb57650['push'](_0x267526);else _0x267526 instanceof TrackBuilder&&_0x1d4e57['push'](_0x267526);}),_0x73dc19['Schematic']['create'](..._0xb57650);const _0x5988e4=[];_0x73dc19['components']['forEach'](_0x19dfe4=>{_0x19dfe4['via']===!![]&&_0x5988e4['push'](_0x19dfe4);}),_0x73dc19['_clearComponents'](),_0x73dc19['_clearOutlines'](),_0xb57650[_0x490d0f(-0x1a9,-0x1d5)](_0x383714=>{_0x73dc19['_addComponentToBoardPublic'](_0x383714);}),_0x73dc19['stagedComponents'][_0x490d0f(-0x1b9,-0x1d5)](_0x443893=>{_0x73dc19['_addComponentToBoardPublic'](_0x443893);}),_0x5988e4['forEach'](_0x19c8e7=>{_0x73dc19['_addComponentToBoardPublic'](_0x19c8e7);});if(typeof _0x73dc19['waitForPendingAutoroutes']==='function')try{await _0x73dc19['waitForPendingAutoroutes']();}catch(_0x38b8fb){console['error'](a11_0x263fab[_0x490d0f(-0x192,-0x1d4)]('[BoardCreation]\x20Error\x20while\x20waiting\x20for\x20pending\x20autoroutes:\x20'+(_0x38b8fb?.['message']||_0x38b8fb)));}function _0x490d0f(_0x2910b3,_0x2fbaa7){return a11_0x1f99(_0x2fbaa7- -0x1d5,_0x2910b3);}a11_0x17a50a['debug'](a11_0x263fab['gray']('[BoardCreation][DEBUG]\x20Including\x20staged\x20outlines:\x20stagedOutlines='+_0x73dc19['stagedOutlines'][_0x490d0f(-0x216,-0x1d3)]+',\x20outlines_public(before)='+_0x73dc19['outlines_public'][_0x490d0f(-0x1b6,-0x1d3)])),_0x73dc19[_0x490d0f(-0x191,-0x1d2)]['push'](..._0x73dc19['stagedOutlines']),a11_0x17a50a[_0x490d0f(-0x1fd,-0x1d1)](a11_0x263fab['gray']('[BoardCreation][DEBUG]\x20outlines_public(after)='+_0x73dc19['outlines_public']['length'])),_0x73dc19['outlines']=_0x73dc19[_0x490d0f(-0x1bd,-0x1d2)][_0x490d0f(-0x1a1,-0x1d0)](_0x262fe4=>{function _0x126cb2(_0x4444eb,_0x1c1b4a){return a11_0x1f99(_0x4444eb- -0x3bd,_0x1c1b4a);}return _0x262fe4[_0x126cb2(-0x3b7,-0x3da)]['some'](_0x2ae64f=>{if(_0x2ae64f['type']==='arc')return!![];if(_0x2ae64f['type']==='line'){const _0x3fa3a6=_0x2ae64f,_0x1bf00f=/\.Cu$/['test'](_0x3fa3a6['layer']);return!_0x1bf00f;}return![];});}),_0x73dc19['tracks']=_0x73dc19[_0x490d0f(-0x1c3,-0x1d2)]['filter'](_0x20228d=>{return _0x20228d['elements']['some'](_0x358bb9=>{if(_0x358bb9['type']==='line'){const _0x4d95a5=_0x358bb9,_0x4eebb7=/\.Cu$/['test'](_0x4d95a5['layer']);return _0x4eebb7;}return![];});});const _0x47569c='(version\x2020241229)',_0x4fe234='(generator\x20\x22typecad\x22)',_0x26f12b='(generator_version\x20\x220.1.0\x22)',_0x1bf1dc='(general\x20(thickness\x201.6)\x20(legacy_teardrops\x20no))',_0x4d31f9='(paper\x20\x22A4\x22)',_0x2a3889=new Map();_0x73dc19['components']['forEach'](_0x40409f=>{function _0x1fbe3a(_0x2ac3b2,_0x57cb10){return a11_0x1f99(_0x57cb10- -0x20,_0x2ac3b2);}!_0x40409f['dnp']&&_0x40409f['uuid']&&_0x40409f['via']===![]&&_0x2a3889[_0x1fbe3a(0x22,-0x19)](_0x40409f['uuid'],_0x40409f);});const _0x893f8c=new Map();_0x73dc19['components']['forEach']((_0x484305,_0x48c2b3)=>{});let _0x391733=0x0;_0x73dc19['components'][_0x490d0f(-0x1c1,-0x1d5)](_0x2215fa=>{if(_0x2215fa['via']===!![]&&_0x2215fa['uuid']&&_0x2215fa['viaData']){_0x391733++;const _0x220567={..._0x2215fa['viaData']};_0x2215fa['pcb']&&typeof _0x2215fa['pcb']['x']==='number'&&typeof _0x2215fa['pcb']['y']==='number'&&(_0x220567['at']={'x':_0x2215fa['pcb']['x'],'y':_0x2215fa['pcb']['y']}),_0x893f8c['set'](_0x2215fa['uuid'],_0x220567);}});let _0x45158a=[];const _0x5b386c='./build/'+_0x73dc19['Boardname']+'.kicad_pcb',_0x11937b=new Map();_0x73dc19[_0x490d0f(-0x1fe,-0x1cd)]['length']>0x0&&(_0x45158a=['kicad_pcb',..._0x73dc19[_0x490d0f(-0x20d,-0x1cd)]]);let _0x4c9551=[],_0x1daca5=[_0x47569c,_0x4fe234,_0x26f12b,_0x1bf1dc,_0x4d31f9];_0x45158a['length']>0x1?(_0x45158a[_0x490d0f(-0x1e5,-0x1cc)](0x1)['forEach'](_0xa2b3f1=>{function _0x58ffad(_0x143fc0,_0x5948ff){return a11_0x1f99(_0x143fc0- -0x2de,_0x5948ff);}if(typeof _0xa2b3f1===_0x58ffad(-0x2d4,-0x31c)&&_0xa2b3f1[_0x58ffad(-0x2d3,-0x2ec)]('('))_0x4c9551[_0x58ffad(-0x2d2,-0x2c9)](_0xa2b3f1);else{if(Array[_0x58ffad(-0x2d1,-0x2cf)](_0xa2b3f1)&&_0xa2b3f1['length']>0x0){const _0x3729ff=_0xa2b3f1[0x0];if(_0x3729ff==='net'&&_0xa2b3f1['length']>=0x3&&!isNaN(Number(_0xa2b3f1[0x1]))&&(typeof _0xa2b3f1[0x2]==='string'||typeof _0xa2b3f1[0x2]===_0x58ffad(-0x2d0,-0x2f7))){const _0xb263f6=Number(_0xa2b3f1[0x1]);let _0x42ed02=String(_0xa2b3f1[0x2]),_0xa3f33b=_0x42ed02;if(_0xa3f33b['startsWith']('`')&&_0xa3f33b['endsWith']('`'))_0xa3f33b=_0xa3f33b['substring'](0x1,_0xa3f33b['length']-0x1);else _0xa3f33b[_0x58ffad(-0x2d3,-0x30b)]('\x22')&&_0xa3f33b['endsWith']('\x22')&&(_0xa3f33b=_0xa3f33b[_0x58ffad(-0x2cf,-0x2ad)](0x1,_0xa3f33b[_0x58ffad(-0x2dc,-0x29c)]-0x1));_0xa3f33b['startsWith']('/')&&(_0xa3f33b=_0xa3f33b[_0x58ffad(-0x2cf,-0x2d1)](0x1)),_0xa3f33b=_0xa3f33b['toLowerCase'](),_0xa3f33b&&_0x11937b['set'](_0xa3f33b,_0xb263f6),_0x4c9551['push'](_0xa2b3f1);}else _0x3729ff!==_0x58ffad(-0x2ce,-0x306)&&_0x3729ff!=='group'&&_0x3729ff!=='gr_rect'&&_0x3729ff!=='gr_line'&&_0x3729ff!=='gr_arc'&&_0x3729ff!=='gr_circle'&&_0x3729ff!=='gr_poly'&&_0x3729ff!=='gr_text'&&_0x3729ff!=='via'&&_0x3729ff!=='segment'&&_0x3729ff!==_0x58ffad(-0x2cd,-0x2ba)&&_0x3729ff!==_0x58ffad(-0x2cc,-0x2fb)&&_0x3729ff!==_0x58ffad(-0x2cb,-0x28b)&&_0x4c9551['push'](_0xa2b3f1);}}}),_0x1daca5[_0x490d0f(-0x1e5,-0x1d5)](_0x2b8e7d=>{const _0x4236e6=_0x2b8e7d[_0x55c810(-0xb8,-0x8b)](0x1,_0x2b8e7d['indexOf']('\x20'));function _0x55c810(_0x1f1092,_0xdc86ed){return a11_0x1f99(_0x1f1092- -0xc7,_0xdc86ed);}!_0x4c9551['some'](_0x28ca33=>typeof _0x28ca33===_0x55c810(-0xbd,-0xb4)&&_0x28ca33[_0x55c810(-0xb3,-0x9a)]('('+_0x4236e6)||Array[_0x55c810(-0xba,-0xb9)](_0x28ca33)&&_0x28ca33[0x0]===_0x4236e6)&&_0x4c9551['unshift'](_0x2b8e7d);})):_0x4c9551=[..._0x1daca5];const _0x54e50c=[];if(!_0x73dc19[_0x490d0f(-0x1bc,-0x1c0)])console['warn'](a11_0x263fab[_0x490d0f(-0x1c8,-0x1bf)]('[PCB\x20CREATE]\x20Warning:\x20No\x20schematic\x20provided.\x20Net\x20information\x20will\x20be\x20limited\x20to\x20existing\x20board\x20nets.'));else _0x73dc19[_0x490d0f(-0x208,-0x1c0)]['Nodes']&&_0x73dc19[_0x490d0f(-0x1db,-0x1c0)]['Nodes'][_0x490d0f(-0x201,-0x1d5)](_0x4a5bba=>{_0x54e50c['push'](['net',_0x4a5bba['code'],'`'+_0x4a5bba['name']+'`']);});let _0x2db5b8=_0x4c9551['filter'](_0x1913ba=>{function _0x1e6378(_0x4a4ea7,_0x2d27b6){return a11_0x1f99(_0x4a4ea7-0xbb,_0x2d27b6);}if(Array['isArray'](_0x1913ba)&&_0x1913ba[0x0]==='net')return![];if(typeof _0x1913ba==='string'&&_0x1913ba['trim']()[_0x1e6378(0xc6,0xe7)](_0x1e6378(0xd2,0xf4)))try{const _0x52a9ca=a11_0x16c723(_0x1913ba)[_0x1e6378(0xd3,0xfb)]();if(Array['isArray'](_0x52a9ca)&&_0x52a9ca[0x0]==='net')return![];}catch(_0x4c3efd){}return!![];});const _0x261237=new Map(),_0x1f73b1=new Set();_0x4c9551['forEach'](_0x34791e=>{function _0x504c9b(_0x307fdc,_0x40c39b){return a11_0x1f99(_0x40c39b-0x2af,_0x307fdc);}if(Array[_0x504c9b(0x2fe,0x2bc)](_0x34791e)&&_0x34791e[0x0]===_0x504c9b(0x2c3,0x2c8)){const _0x515273=parseInt(String(_0x34791e[0x1])),_0x37db19=String(_0x34791e[0x2]||'')['replace'](/["`]/g,'');if(!isNaN(_0x515273)){const _0x20a5a3=_0x515273+':'+_0x37db19;_0x261237['set'](_0x20a5a3,_0x34791e),_0x1f73b1['add'](_0x515273);}}else{if(typeof _0x34791e==='string'&&_0x34791e[_0x504c9b(0x2b7,0x2c9)]()['startsWith']('(net\x20'))try{const _0x56fa08=a11_0x16c723(_0x34791e)['pop']();if(Array['isArray'](_0x56fa08)&&_0x56fa08[0x0]==='net'){const _0x50be53=parseInt(String(_0x56fa08[0x1])),_0xaf7407=String(_0x56fa08[0x2]||'')['replace'](/["`]/g,'');if(!isNaN(_0x50be53)){const _0x3cdf40=_0x50be53+':'+_0xaf7407;_0x261237['set'](_0x3cdf40,_0x56fa08),_0x1f73b1['add'](_0x50be53);}}}catch(_0x4430a7){}}});const _0x2595fa=[],_0x1a8320=new Set(),_0x2601dd=new Map(),_0x53866e=_0x18bfaa=>{let _0x1055f5=_0x18bfaa['toLowerCase']();function _0x39ae3f(_0x1efb79,_0x27bc55){return a11_0x1f99(_0x1efb79- -0x2cf,_0x27bc55);}return _0x1055f5[_0x39ae3f(-0x2c4,-0x2f2)]('/')&&(_0x1055f5=_0x1055f5[_0x39ae3f(-0x2c0,-0x2cf)](0x1)),_0x1055f5;},_0x4c0995=_0x3c92c0=>{const _0x553050=String(_0x3c92c0??'')['replace'](/[`"]/g,'');return'`'+_0x553050+'`';},_0x36190d=new Map();if(_0x261237&&_0x261237['size']>0x0){const _0x1c673a=Array[_0x490d0f(-0x189,-0x1ba)](_0x261237['values']())[_0x490d0f(-0x17e,-0x1b9)]((_0x3baa2d,_0xbf6008)=>parseInt(String(_0x3baa2d[0x1]))-parseInt(String(_0xbf6008[0x1])));for(const _0x1abff2 of _0x1c673a){const _0x4a4a87=String(_0x1abff2[0x2])['replace'](/[`"]/g,'');let _0x4edf91=_0x4a4a87[_0x490d0f(-0x18b,-0x1b8)]();_0x4edf91[_0x490d0f(-0x1b4,-0x1ca)]('/')&&(_0x4edf91=_0x4edf91['substring'](0x1)),!_0x36190d['has'](_0x4edf91)&&_0x36190d['set'](_0x4edf91,_0x1abff2);}}_0x36190d['forEach']((_0x52953d,_0x26030e)=>{const _0x3f8949=parseInt(String(_0x52953d[0x1]));_0x2601dd['set'](_0x26030e,_0x52953d),_0x1a8320['add'](_0x3f8949);});let _0x11bb4e=0x0;_0x1a8320['forEach'](_0x2d906a=>_0x11bb4e=Math['max'](_0x11bb4e,_0x2d906a)),_0x54e50c['forEach'](_0x158e06=>_0x11bb4e=Math[_0x490d0f(-0x180,-0x1b7)](_0x11bb4e,parseInt(String(_0x158e06[0x1]))));const _0x30d072=(_0x542d9a,_0x1820ea)=>{let _0x1445fe=_0x542d9a+0x1;while(_0x1820ea['has'](_0x1445fe)){_0x1445fe++;}return _0x1445fe;};_0x54e50c['forEach'](_0x2aecd0=>{const _0x1317a4=parseInt(String(_0x2aecd0[0x1])),_0x5078be=_0x2aecd0[0x2],_0x1ec297=String(_0x5078be)[_0x42d064(-0xeb,-0xfb)](/[`"]/g,'');function _0x42d064(_0x4a4aef,_0x3f6953){return a11_0x1f99(_0x3f6953- -0x11a,_0x4a4aef);}let _0xb17c8e=_0x53866e(_0x1ec297);if(_0x2601dd[_0x42d064(-0xb4,-0xfa)](_0xb17c8e)){const _0x125a87=_0x2601dd['get'](_0xb17c8e),_0x2f69e1=parseInt(String(_0x125a87[0x1]));_0x11937b[_0x42d064(-0xcc,-0x113)](_0xb17c8e,_0x2f69e1);}else{let _0x4b7240=_0x1317a4;_0x1a8320['has'](_0x1317a4)&&(_0x4b7240=_0x30d072(_0x11bb4e,_0x1a8320),_0x11bb4e=_0x4b7240);const _0x44dfc3=['net',_0x4b7240,_0x5078be];_0x2601dd['set'](_0xb17c8e,_0x44dfc3),_0x1a8320['add'](_0x4b7240),_0x11937b['set'](_0xb17c8e,_0x4b7240);}});const _0x4c9a6f=new Map();_0x893f8c['forEach'](_0x1bd712=>{function _0x434deb(_0x490682,_0x2bbb1d){return a11_0x1f99(_0x2bbb1d- -0x139,_0x490682);}if(_0x1bd712[_0x434deb(-0x11d,-0x120)]&&typeof _0x1bd712['net']==='string'&&_0x1bd712['net']['trim']()['length']>0x0){const _0x50d715=_0x53866e(_0x1bd712['net']);!_0x4c9a6f['has'](_0x50d715)&&_0x4c9a6f['set'](_0x50d715,_0x1bd712[_0x434deb(-0x109,-0x120)]);}}),_0x4c9a6f['forEach']((_0x1a3811,_0x1cdeea)=>{if(_0x2601dd['has'](_0x1cdeea))return;const _0x5d3138=_0x30d072(_0x11bb4e,_0x1a8320);_0x11bb4e=_0x5d3138;const _0x44da1a=[_0x525a8c(-0x11a,-0x137),_0x5d3138,_0x4c0995(_0x1a3811)];function _0x525a8c(_0x513000,_0x328830){return a11_0x1f99(_0x328830- -0x150,_0x513000);}_0x2601dd['set'](_0x1cdeea,_0x44da1a),_0x1a8320['add'](_0x5d3138),_0x11937b[_0x525a8c(-0x122,-0x149)](_0x1cdeea,_0x5d3138);});const _0x557ca7='';if(!_0x2601dd['has'](_0x557ca7))!_0x1a8320[_0x490d0f(-0x180,-0x1b5)](0x0)?(_0x2601dd['set'](_0x557ca7,['net',0x0,'``']),_0x1a8320['add'](0x0),_0x11937b['set'](_0x557ca7,0x0)):console['warn'](a11_0x263fab['red']('[Net\x20Create]\x20Cannot\x20add\x20(net\x200\x20\x22\x22)\x20because\x20code\x200\x20is\x20already\x20in\x20use\x20by\x20a\x20named\x20net.\x20PCB\x20might\x20be\x20invalid.'));else{const _0x62ceed=_0x2601dd['get'](_0x557ca7),_0x21ad2b=parseInt(String(_0x62ceed[0x1]));_0x21ad2b!==0x0&&(!_0x1a8320[_0x490d0f(-0x1f2,-0x1b5)](0x0)?(_0x1a8320['delete'](_0x21ad2b),_0x62ceed[0x1]=0x0,_0x1a8320['add'](0x0),_0x11937b['set'](_0x557ca7,0x0)):console['warn'](a11_0x263fab[_0x490d0f(-0x1d7,-0x1d4)]('[Net\x20Create]\x20Net\x20\x22\x22\x20exists\x20with\x20code\x20'+_0x21ad2b+',\x20but\x20code\x200\x20is\x20taken.\x20PCB\x20might\x20be\x20invalid.')));}const _0x4f70fe=Array['from'](_0x2601dd['values']())['sort']((_0x4ac9d7,_0x31f96c)=>parseInt(String(_0x4ac9d7[0x1]))-parseInt(String(_0x31f96c[0x1])));_0x4f70fe[_0x490d0f(-0x1e6,-0x1d5)](_0x4bb984=>{_0x2595fa['push'](_0x4bb984);});let _0x1411d7=-0x1;const _0x4378dd=['setup',_0x490d0f(-0x1e7,-0x1b4),_0x490d0f(-0x1c6,-0x1b3),'general','generator_version','generator','version'];for(const _0x1ae20a of _0x4378dd){for(let _0x5b2b62=0x0;_0x5b2b62<_0x2db5b8['length'];_0x5b2b62++){const _0x23bbd1=_0x2db5b8[_0x5b2b62];let _0x424adb='';if(Array['isArray'](_0x23bbd1)&&typeof _0x23bbd1[0x0]==='string')_0x424adb=_0x23bbd1[0x0];else{if(typeof _0x23bbd1===_0x490d0f(-0x18b,-0x1cb)&&_0x23bbd1['startsWith']('('))try{const _0x4a86c4=a11_0x16c723(_0x23bbd1)['pop']();Array['isArray'](_0x4a86c4)&&typeof _0x4a86c4[0x0]===_0x490d0f(-0x191,-0x1cb)&&(_0x424adb=_0x4a86c4[0x0]);}catch(_0x1affc1){}}_0x424adb===_0x1ae20a&&(_0x1411d7=_0x5b2b62+0x1);}if(_0x1411d7!==-0x1&&_0x1ae20a==='setup')break;}if(_0x1411d7===-0x1){let _0x33527c=0x0;const _0x462d33=['version','generator','generator_version',_0x490d0f(-0x179,-0x1b2),'paper','layers',_0x490d0f(-0x174,-0x1b1)];for(let _0x2cdb08=0x0;_0x2cdb08<_0x2db5b8['length'];++_0x2cdb08){const _0x303316=_0x2db5b8[_0x2cdb08];let _0x3b7416='';if(Array['isArray'](_0x303316)&&typeof _0x303316[0x0]==='string')_0x3b7416=_0x303316[0x0];else{if(typeof _0x303316===_0x490d0f(-0x1b1,-0x1cb)&&_0x303316['startsWith']('('))try{const _0x3891b4=a11_0x16c723(_0x303316)['pop']();Array['isArray'](_0x3891b4)&&typeof _0x3891b4[0x0]==='string'&&(_0x3b7416=_0x3891b4[0x0]);}catch(_0x4eb29f){}}if(_0x462d33['includes'](_0x3b7416))_0x33527c=_0x2cdb08+0x1;else break;}_0x1411d7=_0x33527c>0x0?_0x33527c:_0x2db5b8['findIndex'](_0x21c181=>typeof _0x21c181!==_0x490d0f(-0x209,-0x1cb)||!_0x21c181[_0x490d0f(-0x1df,-0x1ca)]('('));if(_0x1411d7===-0x1)_0x1411d7=_0x2db5b8['length'];}_0x2595fa['length']>0x0&&_0x2db5b8[_0x490d0f(-0x1e3,-0x1b0)](_0x1411d7,0x0,..._0x2595fa);_0x4c9551=_0x2db5b8,_0x73dc19['groups']['forEach'](_0x946e18=>{function _0x37c45e(_0x45813d,_0x4a0c37){return a11_0x1f99(_0x45813d- -0xf7,_0x4a0c37);}try{const _0x37e7b6=a11_0x16c723(_0x946e18[_0x37c45e(-0xd1,-0x117)]('\x22','`'))['pop']();_0x37e7b6&&_0x4c9551['push'](_0x37e7b6);}catch(_0xa7f354){const _0x4d85ea=_0x73dc19['getCallSite'](),_0x1910cf=_0x4d85ea?'\x20(called\x20from\x20'+_0x4d85ea['file']+':'+_0x4d85ea[_0x37c45e(-0xd0,-0xf3)]+')':'';console[_0x37c45e(-0xcf,-0xe6)](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20group\x20string:\x20'+_0x946e18+'\x20-\x20'+_0xa7f354['message']+_0x1910cf));}}),_0x73dc19['_clearGroups']();_0x45158a['length']>0x1&&_0x45158a[_0x490d0f(-0x1ae,-0x1cc)](0x1)['forEach'](_0x2e05ac=>{function _0x2f0793(_0xbe30fd,_0x783888){return a11_0x1f99(_0x783888-0x372,_0xbe30fd);}if(Array['isArray'](_0x2e05ac)&&_0x2e05ac[0x0]==='footprint'){let _0xb1d7d=null,_0x31783c=null;for(const _0x1d5e2e of _0x2e05ac){if(Array['isArray'](_0x1d5e2e)){if(_0x1d5e2e[0x0]==='uuid'&&typeof _0x1d5e2e[0x1]==='string')_0xb1d7d=_0x1d5e2e[0x1]['replaceAll']('`','');else _0x1d5e2e[0x0]==='at'&&_0x1d5e2e['length']>=0x3&&(_0x31783c=_0x1d5e2e);}if(_0xb1d7d&&_0x31783c)break;}if(_0xb1d7d&&!_0x31783c)for(const _0x26ad8a of _0x2e05ac){if(Array[_0x2f0793(0x37e,0x37f)](_0x26ad8a)&&_0x26ad8a[0x0]==='at'&&_0x26ad8a[_0x2f0793(0x33c,0x374)]>=0x3){_0x31783c=_0x26ad8a;break;}}if(_0xb1d7d&&_0x2a3889[_0x2f0793(0x361,0x392)](_0xb1d7d)){const _0x3de38c=_0x2a3889[_0x2f0793(0x393,0x39b)](_0xb1d7d);if(_0x31783c){const _0x5c4343=parseFloat(String(_0x31783c[0x1])),_0x28fe02=parseFloat(String(_0x31783c[0x2]));let _0x54cbd6=0x0;if(_0x31783c['length']>0x3&&typeof _0x31783c[0x3]!=='undefined'){const _0x9ec14c=parseFloat(String(_0x31783c[0x3]));!isNaN(_0x9ec14c)&&(_0x54cbd6=_0x9ec14c);}!isNaN(_0x5c4343)&&!isNaN(_0x28fe02)?(_0x3de38c['pcb']['x']=_0x5c4343,_0x3de38c['pcb']['y']=_0x28fe02,_0x3de38c['pcb']['rotation']=_0x54cbd6):_0x3de38c[_0x2f0793(0x35e,0x39c)]['rotation']=_0x3de38c['pcb']['rotation']??0x0;}else _0x3de38c['pcb']['rotation']=_0x3de38c['pcb']['rotation']??0x0;try{for(const _0xfae3c of _0x2e05ac){if(Array['isArray'](_0xfae3c)&&_0xfae3c[0x0]==='pad')for(const _0x435185 of _0xfae3c){if(Array['isArray'](_0x435185)&&_0x435185[0x0]==='at'){if(_0x435185[_0x2f0793(0x3a9,0x374)]===0x3)_0x435185['push'](_0x3de38c['pcb']['rotation']);else _0x435185['length']===0x4&&(_0x435185[0x3]=_0x3de38c['pcb'][_0x2f0793(0x377,0x39d)]-parseFloat(String(_0x435185[0x3])));}}}const _0x138199=_0x73dc19[_0x2f0793(0x3bc,0x39e)](_0x2e05ac,_0x3de38c,_0x11937b);_0x4c9551['push'](_0x138199),_0x2a3889['delete'](_0xb1d7d);}catch(_0xa5ba75){const _0x152098=_0x73dc19[_0x2f0793(0x3a9,0x39f)](),_0x4b1f6a=_0x152098?'\x20(called\x20from\x20'+_0x152098[_0x2f0793(0x390,0x3a0)]+':'+_0x152098['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20update\x20footprint\x20node\x20for\x20'+(_0x3de38c[_0x2f0793(0x38e,0x3a1)]||_0xb1d7d)+':\x20'+_0xa5ba75[_0x2f0793(0x3c1,0x3a2)]+_0x4b1f6a));}}else{if(_0x73dc19[_0x2f0793(0x39d,0x3a3)]['remove_orphans']){}else _0x4c9551['push'](_0x2e05ac);}}else{if(Array['isArray'](_0x2e05ac)&&_0x2e05ac[0x0]===_0x2f0793(0x3a5,0x3a4)){}else{if(Array['isArray'](_0x2e05ac)&&(_0x2e05ac[0x0]==='gr_line'||_0x2e05ac[0x0]==='segment'||_0x2e05ac[0x0]===_0x2f0793(0x3b5,0x3a5)||_0x2e05ac[0x0]==='gr_rect')){}}}});_0x2a3889['forEach'](_0x495b2e=>{function _0x328cc5(_0x5722d8,_0xbc1d4f){return a11_0x1f99(_0xbc1d4f-0x2f0,_0x5722d8);}try{const _0x31bf3d=_0x73dc19['_createFootprintNodePublic'](_0x495b2e,_0x11937b);_0x4c9551[_0x328cc5(0x31f,0x2fc)](_0x31bf3d);}catch(_0x577e02){process['stdout']['write'](a11_0x263fab['bgRed']('๐Ÿ‘บ\x20Error:')+a11_0x263fab['bold']('\x20['+_0x495b2e[_0x328cc5(0x30d,0x300)]+'\x20'+_0x495b2e['reference']+'\x20'+_0x495b2e['description']+_0x328cc5(0x365,0x324))+'\x0a'),process['exit'](0x1);}}),_0x893f8c['forEach']((_0x45f0bc,_0x2ac97e)=>{let _0xf5ebaa=0x0;function _0x4578d9(_0x3628fe,_0x17da58){return a11_0x1f99(_0x3628fe-0x164,_0x17da58);}if(_0x45f0bc[_0x4578d9(0x17d,0x143)]&&_0x11937b){let _0x3c57e5=_0x45f0bc[_0x4578d9(0x17d,0x141)][_0x4578d9(0x181,0x17b)]();_0x3c57e5['startsWith']('/')&&(_0x3c57e5=_0x3c57e5['substring'](0x1)),_0x11937b[_0x4578d9(0x184,0x165)](_0x3c57e5)?_0xf5ebaa=_0x11937b['get'](_0x3c57e5):(console['warn']('[BoardCreation]\x20Could\x20not\x20resolve\x20via\x20net\x20\x22'+_0x45f0bc['net']+'\x22\x20in\x20board\x20net\x20map,\x20defaulting\x20to\x20net\x200'),_0xf5ebaa=0x0);}else{if(_0x45f0bc['uuid']){const _0x58c1eb=_0x73dc19['_resolveNetPublic']('','1',_0x45f0bc['uuid'],_0x11937b,_0x45f0bc['net']);_0xf5ebaa=_0x58c1eb[_0x4578d9(0x199,0x1db)],_0x58c1eb[_0x4578d9(0x19a,0x1d0)]&&(_0x45f0bc[_0x4578d9(0x17d,0x1a3)]=_0x58c1eb['netName'],_0x45f0bc['netCode']=_0x58c1eb['netCode']);}else console[_0x4578d9(0x19b,0x1de)]('[BoardCreation]\x20Via\x20missing\x20UUID\x20and\x20net\x20name.\x20Assigning\x20to\x20net\x200.'),_0xf5ebaa=0x0;}const _0x277a2a=_0x45f0bc['layers']?_0x45f0bc['layers']['map'](_0x115420=>'\x22'+_0x115420+'\x22')[_0x4578d9(0x19c,0x184)]('\x20'):'\x22F.Cu\x22\x20\x22B.Cu\x22',_0x1b12d9='(via\x20(at\x20'+(_0x45f0bc['at']?.['x']||0x0)+'\x20'+(_0x45f0bc['at']?.['y']||0x0)+')\x20(size\x20'+(_0x45f0bc['size']||0.6)+')\x20(drill\x20'+(_0x45f0bc[_0x4578d9(0x19d,0x188)]||0.3)+_0x4578d9(0x19e,0x1c2)+_0x277a2a+')\x20(free\x20yes)\x20(net\x20'+_0xf5ebaa+')\x20(uuid\x20\x22'+_0x45f0bc['uuid']+_0x4578d9(0x19f,0x1b8);try{const _0x25f6bb=a11_0x16c723(_0x1b12d9['replaceAll']('\x22','`'))['pop']();if(_0x25f6bb)_0x4c9551['push'](_0x25f6bb);else{const _0x41b245=_0x73dc19['getCallSite'](),_0x5df29c=_0x41b245?'\x20(called\x20from\x20'+_0x41b245['file']+':'+_0x41b245['line']+')':'';console[_0x4578d9(0x18c,0x1d1)](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20via\x20S-expression\x20(fsexp\x20returned\x20undefined/empty):\x20'+_0x1b12d9+_0x5df29c));}}catch(_0x268d99){const _0xe7edc1=_0x73dc19['getCallSite'](),_0x2d4a8d=_0xe7edc1?'\x20(called\x20from\x20'+_0xe7edc1['file']+':'+_0xe7edc1['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20via\x20S-expression\x20for\x20UUID\x20'+_0x45f0bc['uuid']+':\x20'+_0x1b12d9+'\x20-\x20'+_0x268d99['message']+_0x2d4a8d));}}),_0x73dc19[_0x490d0f(-0x1fb,-0x1d2)][_0x490d0f(-0x1cd,-0x1d5)](_0x55aad3=>{function _0x130bcd(_0x23afbd,_0x1034b3){return a11_0x1f99(_0x1034b3- -0x280,_0x23afbd);}_0x55aad3[_0x130bcd(-0x233,-0x27a)][_0x130bcd(-0x2a1,-0x280)](_0x2e1e44=>{let _0x5912a0='';function _0xb60b0f(_0x546c2b,_0x4d30e6){return a11_0x1f99(_0x4d30e6-0x118,_0x546c2b);}if(_0x2e1e44['type']==='line'){const _0x1bfcf5=_0x2e1e44,_0x178f91=_0x1bfcf5[_0xb60b0f(0x116,0x154)]['includes']('.Cu')&&!_0x1bfcf5['layer'][_0xb60b0f(0x106,0x12c)](_0xb60b0f(0x122,0x155));_0x178f91?_0x5912a0=_0xb60b0f(0x119,0x156)+_0x1bfcf5['start']['x']+'\x20'+_0x1bfcf5['start']['y']+_0xb60b0f(0x128,0x157)+_0x1bfcf5['end']['x']+'\x20'+_0x1bfcf5['end']['y']+')\x20(width\x20'+_0x1bfcf5['strokeWidth']+')\x20(locked\x20'+(_0x1bfcf5[_0xb60b0f(0x16f,0x158)]?'yes':'no')+')\x20(layer\x20\x22'+_0x1bfcf5['layer']+_0xb60b0f(0x157,0x159)+_0x1bfcf5['uuid']+_0xb60b0f(0x155,0x153):_0x5912a0='(gr_line\x20(start\x20'+_0x1bfcf5['start']['x']+'\x20'+_0x1bfcf5['start']['y']+')\x20(end\x20'+_0x1bfcf5[_0xb60b0f(0x156,0x15a)]['x']+'\x20'+_0x1bfcf5[_0xb60b0f(0x195,0x15a)]['y']+_0xb60b0f(0x17a,0x15b)+_0x1bfcf5[_0xb60b0f(0x168,0x15c)]+')\x20(type\x20default))\x20(layer\x20\x22'+_0x1bfcf5['layer']+'\x22)\x20(uuid\x20\x22'+_0x1bfcf5['uuid']+'\x22))';}else{if(_0x2e1e44[_0xb60b0f(0x172,0x15d)]==='arc'){const _0x23f6dd=_0x2e1e44;_0x5912a0='(gr_arc\x20(start\x20'+_0x23f6dd[_0xb60b0f(0x169,0x15e)]['x']+'\x20'+_0x23f6dd['start']['y']+')\x20(mid\x20'+_0x23f6dd['mid']['x']+'\x20'+_0x23f6dd[_0xb60b0f(0x134,0x15f)]['y']+')\x20(end\x20'+_0x23f6dd['end']['x']+'\x20'+_0x23f6dd['end']['y']+')\x20(stroke\x20(width\x20'+_0x23f6dd['strokeWidth']+')\x20(type\x20default))\x20(layer\x20\x22'+_0x23f6dd['layer']+'\x22)\x20(uuid\x20\x22'+_0x23f6dd['uuid']+_0xb60b0f(0x12d,0x153);}}if(_0x5912a0)try{const _0x4fd8e0=a11_0x16c723(_0x5912a0[_0xb60b0f(0x100,0x13e)]('\x22','`'))['pop']();if(_0x4fd8e0)_0x4c9551[_0xb60b0f(0x101,0x124)](_0x4fd8e0);else{const _0x498819=_0x73dc19['getCallSite'](),_0x29bc4e=_0x498819?'\x20(called\x20from\x20'+_0x498819['file']+':'+_0x498819['line']+')':'';console['error'](a11_0x263fab['red'](_0xb60b0f(0x15c,0x160)+_0x2e1e44['uuid']+':\x20'+_0x5912a0+_0x29bc4e));}}catch(_0x4eeb2c){const _0x3fbccb=_0x73dc19['getCallSite'](),_0xfdd44b=_0x3fbccb?'\x20(called\x20from\x20'+_0x3fbccb['file']+':'+_0x3fbccb['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20outline\x20element\x20S-expression\x20for\x20UUID\x20'+_0x2e1e44[_0xb60b0f(0x17a,0x161)]+':\x20'+_0x5912a0+'\x20-\x20'+_0x4eeb2c['message']+_0xfdd44b));}});});_0x73dc19['___diagCounters']&&console['log'](a11_0x263fab[_0x490d0f(-0x19a,-0x18b)]('[BoardCreation][DIAG]\x20segmentsAdded='+_0x73dc19['___diagCounters'][_0x490d0f(-0x1aa,-0x18a)]+',\x20grLinesAdded='+_0x73dc19['___diagCounters']['grLinesAdded']+',\x20parseFailures='+_0x73dc19['___diagCounters']['parseFailures']));_0x73dc19['grTexts']['forEach'](_0x3c8b88=>{let _0x9aa6ad='',_0x765b60='';_0x3c8b88['font']&&(_0x765b60+='(face\x20\x22'+_0x3c8b88['font']+_0x5a922d(0x183,0x1b4));const _0x2b840b=_0x3c8b88['width']??1.27,_0x1aa0f4=_0x3c8b88['height']??1.27;_0x765b60+='(size\x20'+_0x1aa0f4+'\x20'+_0x2b840b+')\x20';_0x3c8b88[_0x5a922d(0x1af,0x1b5)]!==undefined&&(_0x765b60+=_0x5a922d(0x1cb,0x1b6)+_0x3c8b88[_0x5a922d(0x1d9,0x1b5)]+')\x20');function _0x5a922d(_0x25da67,_0x5c1f01){return a11_0x1f99(_0x5c1f01-0x168,_0x25da67);}_0x3c8b88['bold']&&(_0x765b60+='bold\x20');_0x3c8b88['italic']&&(_0x765b60+=_0x5a922d(0x1e0,0x1b7));_0x9aa6ad+='(font\x20'+_0x765b60['trim']()+')';let _0x1cf80e='';const _0x2ca5f1=_0x3c8b88[_0x5a922d(0x1d8,0x1b8)]?.['horizontal']??'left',_0x38d453=_0x3c8b88[_0x5a922d(0x1e2,0x1b8)]?.[_0x5a922d(0x1f0,0x1b9)]??'bottom',_0x45e110=_0x3c8b88['justify']?.['mirror']??![];_0x1cf80e+=_0x2ca5f1+'\x20',_0x1cf80e+=_0x38d453+'\x20';_0x45e110&&(_0x1cf80e+=_0x5a922d(0x1b4,0x1ba));_0x9aa6ad+='\x20(justify\x20'+_0x1cf80e['trim']()+')';_0x3c8b88['hide']&&(_0x9aa6ad+=_0x5a922d(0x1b8,0x1bb));const _0x157b25='(gr_text\x20\x22'+_0x3c8b88[_0x5a922d(0x193,0x1bc)]+'\x22\x20(at\x20'+_0x3c8b88['x']+'\x20'+_0x3c8b88['y']+'\x20'+_0x3c8b88['rotation']+')\x20(layer\x20\x22'+_0x3c8b88['layer']+_0x5a922d(0x161,0x1a9)+_0x3c8b88['uuid']+'\x22)\x20(effects\x20'+_0x9aa6ad+'))';try{const _0x1b8e8c=a11_0x16c723(_0x157b25['replaceAll']('\x22','`'))['pop']();if(_0x1b8e8c)_0x4c9551[_0x5a922d(0x1ba,0x174)](_0x1b8e8c);else{const _0x4ca9a3=_0x73dc19['getCallSite'](),_0x5665c2=_0x4ca9a3?'\x20(called\x20from\x20'+_0x4ca9a3[_0x5a922d(0x161,0x196)]+':'+_0x4ca9a3['line']+')':'';console[_0x5a922d(0x172,0x190)](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_text\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20'+_0x3c8b88['uuid']+':\x20'+_0x157b25+_0x5665c2));}}catch(_0x2fe8c2){const _0x4f95fb=_0x73dc19['getCallSite'](),_0x1c88ed=_0x4f95fb?'\x20(called\x20from\x20'+_0x4f95fb[_0x5a922d(0x193,0x196)]+':'+_0x4f95fb['line']+')':'';console[_0x5a922d(0x1c6,0x190)](a11_0x263fab['red'](_0x5a922d(0x1c8,0x1bd)+_0x3c8b88['uuid']+':\x20'+_0x157b25+_0x5a922d(0x205,0x1be)+_0x2fe8c2['message']+_0x1c88ed));}}),_0x73dc19['grLines']['forEach'](_0x462020=>{const _0x448842=_0x462020['locked']?'\x20(locked\x20yes)':'',_0x3ced13='(gr_line\x20(start\x20'+_0x462020[_0x3657aa(-0xbe,-0xa0)]['x']+'\x20'+_0x462020['start']['y']+_0x3657aa(-0xc5,-0x88)+_0x462020['end']['x']+'\x20'+_0x462020['end']['y']+')\x20(stroke\x20(width\x20'+_0x462020[_0x3657aa(-0xc0,-0xc2)]+_0x3657aa(-0xad,-0x91)+_0x462020['layer']+'\x22)\x20(uuid\x20\x22'+_0x462020['uuid']+'\x22)'+_0x448842+')';function _0x3657aa(_0x13b7c3,_0x1252e5){return a11_0x1f99(_0x13b7c3- -0x104,_0x1252e5);}try{const _0x3b0b02=a11_0x16c723(_0x3ced13['replaceAll']('\x22','`'))[_0x3657aa(-0xec,-0xff)]();if(_0x3b0b02)_0x4c9551['push'](_0x3b0b02);else{const _0x253a9b=_0x73dc19['getCallSite'](),_0x369756=_0x253a9b?'\x20(called\x20from\x20'+_0x253a9b['file']+':'+_0x253a9b['line']+')':'';console['error'](a11_0x263fab['red'](_0x3657aa(-0xac,-0xe6)+_0x462020[_0x3657aa(-0xbb,-0xe1)]+':\x20'+_0x3ced13+_0x369756));}}catch(_0x314844){const _0x110ebb=_0x73dc19['getCallSite'](),_0x455ea5=_0x110ebb?_0x3657aa(-0xab,-0xb0)+_0x110ebb['file']+':'+_0x110ebb[_0x3657aa(-0xdd,-0xeb)]+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_line\x20S-expression\x20for\x20UUID\x20'+_0x462020[_0x3657aa(-0xbb,-0x79)]+':\x20'+_0x3ced13+'\x20-\x20'+_0x314844['message']+_0x455ea5));}}),_0x73dc19['grCircles']['forEach'](_0x5dd0d1=>{const _0x4cf98f=_0x5dd0d1['fill']?'\x20(fill\x20solid)':'';function _0x136b79(_0x27c7f0,_0x560828){return a11_0x1f99(_0x560828- -0x243,_0x27c7f0);}const _0x150dab=_0x5dd0d1['locked']?'\x20(locked\x20yes)':'',_0x3d3d1e='(gr_circle\x20(center\x20'+_0x5dd0d1['center']['x']+'\x20'+_0x5dd0d1['center']['y']+')\x20(end\x20'+_0x5dd0d1['end']['x']+'\x20'+_0x5dd0d1['end']['y']+')\x20(stroke\x20(width\x20'+_0x5dd0d1['strokeWidth']+')\x20(type\x20default))\x20(layer\x20\x22'+_0x5dd0d1['layer']+'\x22)'+_0x4cf98f+'\x20(uuid\x20\x22'+_0x5dd0d1[_0x136b79(-0x229,-0x1fa)]+'\x22)'+_0x150dab+')';try{const _0x35cece=a11_0x16c723(_0x3d3d1e['replaceAll']('\x22','`'))[_0x136b79(-0x204,-0x22b)]();if(_0x35cece)_0x4c9551['push'](_0x35cece);else{const _0xe439d3=_0x73dc19[_0x136b79(-0x1d4,-0x216)](),_0x49c086=_0xe439d3?'\x20(called\x20from\x20'+_0xe439d3[_0x136b79(-0x1ea,-0x215)]+':'+_0xe439d3['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_circle\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20'+_0x5dd0d1['uuid']+':\x20'+_0x3d3d1e+_0x49c086));}}catch(_0x4edfa1){const _0xfec736=_0x73dc19['getCallSite'](),_0x44c21b=_0xfec736?'\x20(called\x20from\x20'+_0xfec736[_0x136b79(-0x1e0,-0x215)]+':'+_0xfec736['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_circle\x20S-expression\x20for\x20UUID\x20'+_0x5dd0d1['uuid']+':\x20'+_0x3d3d1e+_0x136b79(-0x1d6,-0x1ed)+_0x4edfa1[_0x136b79(-0x213,-0x213)]+_0x44c21b));}}),_0x73dc19['grRects']['forEach'](_0x20f716=>{const _0x1c5176=_0x20f716[_0x336af7(0x349,0x33f)]?'\x20(fill\x20solid)':'',_0x196a05=_0x20f716[_0x336af7(0x350,0x325)]?'\x20(locked\x20yes)':'';function _0x336af7(_0x8f80be,_0x246785){return a11_0x1f99(_0x246785-0x2e5,_0x8f80be);}const _0xfe690d='(gr_rect\x20(start\x20'+_0x20f716[_0x336af7(0x2f0,0x32b)]['x']+'\x20'+_0x20f716['start']['y']+_0x336af7(0x2e6,0x324)+_0x20f716['end']['x']+'\x20'+_0x20f716['end']['y']+')\x20(stroke\x20(width\x20'+_0x20f716['strokeWidth']+')\x20(type\x20default))\x20(layer\x20\x22'+_0x20f716['layer']+'\x22)'+_0x1c5176+'\x20(uuid\x20\x22'+_0x20f716['uuid']+'\x22)'+_0x196a05+')';try{const _0x5ed6ce=a11_0x16c723(_0xfe690d['replaceAll']('\x22','`'))['pop']();if(_0x5ed6ce)_0x4c9551['push'](_0x5ed6ce);else{const _0x1f00ac=_0x73dc19['getCallSite'](),_0x479384=_0x1f00ac?'\x20(called\x20from\x20'+_0x1f00ac[_0x336af7(0x33b,0x313)]+':'+_0x1f00ac['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_rect\x20S-expression\x20(fsexp\x20returned\x20undefined/empty)\x20for\x20UUID\x20'+_0x20f716[_0x336af7(0x2e6,0x32e)]+':\x20'+_0xfe690d+_0x479384));}}catch(_0x2aa462){const _0x128456=_0x73dc19[_0x336af7(0x34c,0x312)](),_0x55c22d=_0x128456?'\x20(called\x20from\x20'+_0x128456['file']+':'+_0x128456['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_rect\x20S-expression\x20for\x20UUID\x20'+_0x20f716['uuid']+':\x20'+_0xfe690d+'\x20-\x20'+_0x2aa462['message']+_0x55c22d));}}),_0x73dc19['grPolys']['forEach'](_0x3ffb77=>{const _0x316903=_0x3ffb77['points']['map'](_0x4a7eb3=>'(xy\x20'+_0x4a7eb3['x']+'\x20'+_0x4a7eb3['y']+')')['join']('\x20'),_0x59295d=_0x3ffb77['fill']?'\x20(fill\x20solid)':'',_0x377e16=_0x3ffb77['locked']?_0x24c41(-0x1d0,-0x1a5):'';function _0x24c41(_0xdc94d1,_0x266314){return a11_0x1f99(_0xdc94d1- -0x22b,_0x266314);}const _0x429222='(gr_poly\x20(pts\x20'+_0x316903+')\x20(stroke\x20(width\x20'+_0x3ffb77['strokeWidth']+')\x20(type\x20default))\x20(layer\x20\x22'+_0x3ffb77['layer']+'\x22)'+_0x59295d+'\x20(uuid\x20\x22'+_0x3ffb77[_0x24c41(-0x1e2,-0x1f1)]+'\x22)'+_0x377e16+')';try{const _0x283bbc=a11_0x16c723(_0x429222['replaceAll']('\x22','`'))['pop']();if(_0x283bbc)_0x4c9551['push'](_0x283bbc);else{const _0x1118f2=_0x73dc19['getCallSite'](),_0x10c550=_0x1118f2?_0x24c41(-0x1d2,-0x1f0)+_0x1118f2[_0x24c41(-0x1fd,-0x204)]+':'+_0x1118f2['line']+')':'';console['error'](a11_0x263fab[_0x24c41(-0x22a,-0x22d)](_0x24c41(-0x1cf,-0x1dc)+_0x3ffb77[_0x24c41(-0x1e2,-0x20f)]+':\x20'+_0x429222+_0x10c550));}}catch(_0x3622e9){const _0x19e00f=_0x73dc19['getCallSite'](),_0x5638b6=_0x19e00f?'\x20(called\x20from\x20'+_0x19e00f['file']+':'+_0x19e00f['line']+')':'';console['error'](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20gr_poly\x20S-expression\x20for\x20UUID\x20'+_0x3ffb77['uuid']+':\x20'+_0x429222+'\x20-\x20'+_0x3622e9['message']+_0x5638b6));}}),_0x73dc19['zones'][_0x490d0f(-0x201,-0x1d5)](_0x5e60ad=>{let _0x1e2e5f=0x0,_0x41866a='';if(_0x5e60ad['net']){const _0x20fb64=_0x5e60ad['net']['split'](':'),_0x75c3df=_0x20fb64[0x0];if(_0x75c3df===_0x302b65(-0x7f,-0x92)&&_0x20fb64['length']===0x3){const _0x2a4e2a=_0x20fb64[0x1],_0x4d7d75=_0x20fb64[0x2],_0x376cbc=_0x73dc19['_resolveNetPublic'](_0x2a4e2a,_0x4d7d75,undefined,_0x11937b);_0x1e2e5f=_0x376cbc[_0x302b65(-0xa7,-0x66)],_0x41866a=_0x376cbc['netName'];}else{if(_0x75c3df==='net'&&_0x20fb64[_0x302b65(-0xda,-0xb6)]===0x2){const _0x3e4a02=_0x20fb64[0x1];if(_0x73dc19['Schematic']&&_0x73dc19[_0x302b65(-0xc7,-0xd7)]['Nodes']){const _0x321f78=_0x73dc19[_0x302b65(-0xc7,-0xa7)]['Nodes']['find'](_0x548cdf=>{let _0x2c49fb=_0x548cdf[_0x2dd1d0(0x65,0x49)]['toLowerCase'](),_0x3f626b=_0x3e4a02['toLowerCase']();if(_0x2c49fb['startsWith']('/'))_0x2c49fb=_0x2c49fb['substring'](0x1);if(_0x3f626b['startsWith']('/'))_0x3f626b=_0x3f626b['substring'](0x1);function _0x2dd1d0(_0x38ad2f,_0x46520e){return a11_0x1f99(_0x38ad2f-0x7,_0x46520e);}return _0x2c49fb===_0x3f626b;});if(_0x321f78)_0x1e2e5f=_0x321f78['code'],_0x41866a=_0x321f78[_0x302b65(-0x7e,-0x7b)];else{const _0x14e3b5=_0x3e4a02[_0x302b65(-0xbf,-0xb8)]()['replace'](/^\//,'');if(_0x11937b['has'](_0x14e3b5))_0x1e2e5f=_0x11937b['get'](_0x14e3b5),_0x41866a=_0x3e4a02;else{const _0x1a50e6=_0x73dc19['getCallSite'](),_0x1f7321=_0x1a50e6?_0x302b65(-0x83,-0x54)+_0x1a50e6[_0x302b65(-0xae,-0xb6)]+':'+_0x1a50e6['line']+')':'';console['error'](a11_0x263fab['red']('[PCB\x20ZONE]\x20ERROR:\x20Net\x20\x22'+_0x3e4a02+'\x22\x20not\x20found\x20in\x20schematic\x20or\x20board'+_0x1f7321));}}}}}}function _0x302b65(_0xe9155d,_0x38c415){return a11_0x1f99(_0xe9155d- -0xdc,_0x38c415);}const _0x494031=_0x5e60ad['polygon'][_0x302b65(-0x7d,-0x55)](_0x4cb77d=>'(xy\x20'+_0x4cb77d['x']+'\x20'+_0x4cb77d['y']+')')['join']('\x20'),_0x3b2df2=_0x5e60ad['name']?_0x302b65(-0x7c,-0x5f)+_0x5e60ad['name']+'\x22)\x20':'',_0x298467=_0x5e60ad['locked']?'(locked)\x20':'',_0x138314=_0x5e60ad['priority']!==undefined&&_0x5e60ad['priority']!==0x0?_0x302b65(-0x7b,-0x8a)+_0x5e60ad['priority']+')\x20':'';let _0x39e441=[];if(_0x5e60ad['filled']!==![]){_0x39e441['push']('yes');_0x5e60ad['fillMode']==='hatched'&&_0x39e441['push']('(mode\x20hatched)');_0x5e60ad['fillArcSegments']!==undefined&&_0x39e441['push'](_0x302b65(-0x7a,-0xa0)+_0x5e60ad['fillArcSegments']+')');_0x39e441['push']('(thermal_gap\x20'+_0x5e60ad[_0x302b65(-0x79,-0xac)]+')'),_0x39e441['push'](_0x302b65(-0x78,-0x7a)+_0x5e60ad['thermalBridgeWidth']+')');_0x5e60ad[_0x302b65(-0x77,-0xaf)]&&_0x5e60ad[_0x302b65(-0x77,-0x60)]!=='none'&&_0x5e60ad['smoothingRadius']!==undefined&&(_0x39e441['push']('(smoothing\x20'+_0x5e60ad['smoothing']+')'),_0x39e441['push']('(radius\x20'+_0x5e60ad['smoothingRadius']+')'));_0x5e60ad['islandRemovalMode']!==undefined&&(_0x39e441['push']('(island_removal_mode\x20'+_0x5e60ad['islandRemovalMode']+')'),_0x5e60ad['islandRemovalMode']===0x2&&_0x5e60ad['islandAreaMin']!==undefined&&_0x39e441['push']('(island_area_min\x20'+_0x5e60ad['islandAreaMin']+')'));if(_0x5e60ad['fillMode']===_0x302b65(-0x76,-0x74)){if(_0x5e60ad['hatchThickness']!==undefined)_0x39e441['push'](_0x302b65(-0x75,-0xaa)+_0x5e60ad['hatchThickness']+')');if(_0x5e60ad[_0x302b65(-0x74,-0x9d)]!==undefined)_0x39e441[_0x302b65(-0xd0,-0xda)]('(hatch_gap\x20'+_0x5e60ad['hatchGap']+')');if(_0x5e60ad['hatchOrientation']!==undefined)_0x39e441['push'](_0x302b65(-0x73,-0x51)+_0x5e60ad['hatchOrientation']+')');if(_0x5e60ad[_0x302b65(-0x72,-0xa5)]!==undefined)_0x39e441['push']('(hatch_smoothing_level\x20'+_0x5e60ad[_0x302b65(-0x72,-0x6a)]+')');if(_0x5e60ad['hatchSmoothingValue']!==undefined)_0x39e441[_0x302b65(-0xd0,-0x101)](_0x302b65(-0x71,-0x2c)+_0x5e60ad[_0x302b65(-0x70,-0x83)]+')');if(_0x5e60ad['hatchBorderAlgorithm'])_0x39e441['push']('(hatch_border_algorithm\x20'+_0x5e60ad['hatchBorderAlgorithm']+')');if(_0x5e60ad['hatchMinHoleArea']!==undefined)_0x39e441['push'](_0x302b65(-0x6f,-0x37)+_0x5e60ad[_0x302b65(-0x6e,-0xa6)]+')');}}const _0x3828c9=_0x39e441['length']>0x0?'(fill\x20'+_0x39e441['join']('\x20')+')\x20':'';let _0x56b771='';if(_0x5e60ad['connectPads']==='thru_hole_only')_0x56b771='(connect_pads\x20thru_hole_only\x20(clearance\x20'+_0x5e60ad['clearance']+'))\x20';else{if(_0x5e60ad['connectPads']==='full')_0x56b771='(connect_pads\x20yes\x20(clearance\x20'+_0x5e60ad[_0x302b65(-0x6d,-0x7f)]+'))\x20';else _0x5e60ad['connectPads']==='no'?_0x56b771='(connect_pads\x20no\x20(clearance\x20'+_0x5e60ad[_0x302b65(-0x6d,-0x8c)]+'))\x20':_0x56b771='(connect_pads\x20(clearance\x20'+_0x5e60ad['clearance']+'))\x20';}const _0xdcbf22=_0x5e60ad['layers'][_0x302b65(-0x7d,-0xc1)](_0x23af51=>'\x22'+_0x23af51+'\x22')['join']('\x20'),_0xa56c2c='(zone\x20(net\x20'+_0x1e2e5f+_0x302b65(-0x6c,-0x58)+_0x41866a+'\x22)\x20(layers\x20'+_0xdcbf22+')\x20'+_0x3b2df2+'(uuid\x20\x22'+_0x5e60ad['uuid']+'\x22)\x20'+_0x298467+_0x138314+'(hatch\x20'+_0x5e60ad['hatchStyle']+'\x20'+_0x5e60ad['hatchPitch']+')\x20'+_0x56b771+'(min_thickness\x20'+_0x5e60ad['minThickness']+')\x20'+_0x3828c9+_0x302b65(-0x6b,-0x5a)+_0x494031+')))';try{const _0x72c945=a11_0x16c723(_0xa56c2c['replaceAll']('\x22','`'))['pop']();if(_0x72c945)_0x4c9551['push'](_0x72c945);else{const _0x5108f2=_0x73dc19['getCallSite'](),_0x143b40=_0x5108f2?'\x20(called\x20from\x20'+_0x5108f2['file']+':'+_0x5108f2[_0x302b65(-0xb5,-0x7b)]+')':'';console['error'](a11_0x263fab['red'](_0x302b65(-0x6a,-0x59)+_0x5e60ad[_0x302b65(-0x93,-0xc2)]+':\x20'+_0xa56c2c+_0x143b40));}}catch(_0x34a539){const _0x198124=_0x73dc19['getCallSite'](),_0x3dd6b5=_0x198124?'\x20(called\x20from\x20'+_0x198124['file']+':'+_0x198124['line']+')':'';console[_0x302b65(-0xb4,-0x94)](a11_0x263fab['red']('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20zone\x20S-expression\x20for\x20UUID\x20'+_0x5e60ad['uuid']+':\x20'+_0xa56c2c+_0x302b65(-0x86,-0xc6)+_0x34a539['message']+_0x3dd6b5));}}),_0x73dc19['keepoutZones']['forEach'](_0x1f7600=>{const _0x4880d2=_0x1f7600[_0x59daf9(0x33c,0x35e)][_0x59daf9(0x328,0x316)](_0x1e9a7d=>'(xy\x20'+_0x1e9a7d['x']+'\x20'+_0x1e9a7d['y']+')')['join']('\x20'),_0x5ca35f=_0x1f7600['name']?'(name\x20\x22'+_0x1f7600['name']+'\x22)\x20':'',_0x3858f8=_0x1f7600['locked']?_0x59daf9(0x33d,0x2f9):'',_0x14da9b=_0x1f7600['priority']!==undefined&&_0x1f7600['priority']!==0x0?_0x59daf9(0x32a,0x358)+_0x1f7600['priority']+')\x20':'',_0x48cb11=_0x1f7600['restrictions']||{};function _0x59daf9(_0x1decd7,_0x519c46){return a11_0x1f99(_0x1decd7-0x2c9,_0x519c46);}const _0x9f2c19=_0x48cb11['tracks']?_0x59daf9(0x33e,0x309):_0x59daf9(0x33f,0x33d),_0x150afd=_0x48cb11['vias']?'not_allowed':'allowed',_0x1b7772=_0x48cb11[_0x59daf9(0x340,0x34a)]?_0x59daf9(0x33e,0x366):'allowed',_0x34f28e=_0x48cb11[_0x59daf9(0x341,0x357)]?'not_allowed':'allowed',_0x21bc56=_0x48cb11[_0x59daf9(0x342,0x315)]?'not_allowed':'allowed',_0x30b9f1='(keepout\x20(tracks\x20'+_0x9f2c19+')\x20(vias\x20'+_0x150afd+')\x20(pads\x20'+_0x1b7772+')\x20(copperpour\x20'+_0x34f28e+_0x59daf9(0x343,0x36e)+_0x21bc56+_0x59daf9(0x344,0x2fe);let _0x47a5a7='';_0x1f7600[_0x59daf9(0x32e,0x2f5)]&&_0x1f7600['smoothing']!=='none'&&_0x1f7600[_0x59daf9(0x345,0x347)]!==undefined&&(_0x47a5a7=_0x59daf9(0x346,0x32b)+_0x1f7600['smoothing']+')\x20(radius\x20'+_0x1f7600['smoothingRadius']+')\x20');const _0x43e794=_0x1f7600['layers']['map'](_0x2873e7=>'\x22'+_0x2873e7+'\x22')['join']('\x20'),_0x45a8ba=_0x1f7600['hatchStyle']||'edge',_0x1e0eb1=_0x1f7600['hatchPitch']||0.508,_0x4eb270=_0x59daf9(0x347,0x337)+_0x43e794+')\x20'+_0x5ca35f+'(uuid\x20\x22'+_0x1f7600['uuid']+'\x22)\x20'+_0x3858f8+_0x14da9b+'(hatch\x20'+_0x45a8ba+'\x20'+_0x1e0eb1+')\x20'+_0x30b9f1+_0x47a5a7+'(polygon\x20(pts\x20'+_0x4880d2+_0x59daf9(0x348,0x370);try{const _0x485d57=a11_0x16c723(_0x4eb270['replaceAll']('\x22','`'))['pop']();if(_0x485d57)_0x4c9551[_0x59daf9(0x2d5,0x2ca)](_0x485d57);else{const _0x44bdb0=_0x73dc19['getCallSite'](),_0x96c852=_0x44bdb0?_0x59daf9(0x322,0x32a)+_0x44bdb0['file']+':'+_0x44bdb0['line']+')':'';console['error'](a11_0x263fab[_0x59daf9(0x2ca,0x2c9)](_0x59daf9(0x349,0x355)+_0x1f7600['uuid']+':\x20'+_0x4eb270+_0x96c852));}}catch(_0x2e7b50){const _0x423542=_0x73dc19['getCallSite'](),_0x5c7fe8=_0x423542?_0x59daf9(0x322,0x342)+_0x423542[_0x59daf9(0x2f7,0x306)]+':'+_0x423542['line']+')':'';console['error'](a11_0x263fab[_0x59daf9(0x2ca,0x308)]('๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20parse\x20keepout\x20zone\x20S-expression\x20for\x20UUID\x20'+_0x1f7600[_0x59daf9(0x312,0x31c)]+':\x20'+_0x4eb270+'\x20-\x20'+_0x2e7b50[_0x59daf9(0x2f9,0x30d)]+_0x5c7fe8));}});let _0x40dca4=null;const _0x255665=_0x4c9551['find'](_0x3ad6dc=>Array['isArray'](_0x3ad6dc)&&_0x3ad6dc[0x0]==='version'),_0x48e9d0=_0x4c9551['find'](_0x484f7b=>typeof _0x484f7b==='string'&&_0x484f7b['startsWith']('(version\x20'));if(_0x255665)_0x40dca4=_0x255665;else _0x48e9d0?_0x40dca4=_0x48e9d0:_0x40dca4=_0x47569c;_0x4c9551=_0x4c9551['filter'](_0x4e0762=>{function _0x41a4e3(_0x1099a6,_0x3996d3){return a11_0x1f99(_0x3996d3-0x30b,_0x1099a6);}if(Array[_0x41a4e3(0x349,0x318)](_0x4e0762)&&_0x4e0762[0x0]==='version')return![];if(typeof _0x4e0762==='string'&&_0x4e0762['startsWith']('(version\x20'))return![];return!![];}),_0x4c9551['unshift'](_0x40dca4);const _0x3d1829=new Set();_0x3d1829['add'](0x0),_0x4c9551[_0x490d0f(-0x1bd,-0x1d5)](_0x20497c=>{Array['isArray'](_0x20497c)&&_0x20497c[0x0]==='footprint'&&_0x20497c['forEach'](_0x3ad51f=>{function _0x4ec133(_0x24e9ea,_0x3b208b){return a11_0x1f99(_0x24e9ea-0x2f0,_0x3b208b);}Array[_0x4ec133(0x2fd,0x316)](_0x3ad51f)&&_0x3ad51f[0x0]==='pad'&&_0x3ad51f['forEach'](_0x3d7ed0=>{function _0x40510f(_0x558731,_0x3b7067){return a11_0x1f99(_0x558731- -0x170,_0x3b7067);}if(Array['isArray'](_0x3d7ed0)&&_0x3d7ed0[0x0]==='net'){const _0x568542=parseInt(String(_0x3d7ed0[0x1]));!isNaN(_0x568542)&&_0x3d1829[_0x40510f(-0xef,-0x130)](_0x568542);}});});}),_0x4c9551[_0x490d0f(-0x20b,-0x1d5)](_0x49eeca=>{function _0x1230c0(_0x186031,_0x10bca8){return a11_0x1f99(_0x186031-0x9,_0x10bca8);}Array['isArray'](_0x49eeca)&&_0x49eeca[0x0]==='via'&&_0x49eeca[_0x1230c0(0x9,-0x22)](_0x31a87c=>{function _0x27ff86(_0x4bf706,_0x3f717c){return a11_0x1f99(_0x4bf706- -0x3ba,_0x3f717c);}if(Array['isArray'](_0x31a87c)&&_0x31a87c[0x0]===_0x27ff86(-0x3a1,-0x3b4)){const _0x5d50f5=parseInt(String(_0x31a87c[0x1]));!isNaN(_0x5d50f5)&&_0x3d1829['add'](_0x5d50f5);}});}),_0x4c9551[_0x490d0f(-0x1e4,-0x1d5)](_0x259d40=>{function _0x5d8e53(_0x8c1af6,_0x4c0913){return a11_0x1f99(_0x4c0913- -0x35c,_0x8c1af6);}Array[_0x5d8e53(-0x36e,-0x34f)](_0x259d40)&&_0x259d40[0x0]===_0x5d8e53(-0x367,-0x34b)&&_0x259d40['forEach'](_0x569c7f=>{function _0x3faa46(_0x18dd1d,_0x897059){return a11_0x1f99(_0x897059- -0xde,_0x18dd1d);}if(Array['isArray'](_0x569c7f)&&_0x569c7f[0x0]==='net'){const _0x26b3f6=parseInt(String(_0x569c7f[0x1]));!isNaN(_0x26b3f6)&&_0x3d1829[_0x3faa46(-0x8c,-0x5d)](_0x26b3f6);}});});const _0x237cd6=[_0x490d0f(-0x134,-0x153),..._0x4c9551];try{try{const _0x49bb17=_0x4c9551[_0x490d0f(-0x1f4,-0x1d0)](_0x3a1ff9=>Array['isArray'](_0x3a1ff9)&&_0x3a1ff9[0x0]==='segment'),_0x53a86d=_0x4c9551[_0x490d0f(-0x1fd,-0x1d0)](_0x77ade0=>Array['isArray'](_0x77ade0)&&_0x77ade0[0x0]==='gr_line'),_0x3019c7=[];_0x49bb17['forEach'](_0x5ae3ac=>{try{const _0x383740=_0x5ae3ac['find'](_0x4340e4=>Array['isArray'](_0x4340e4)&&_0x4340e4[0x0]==='uuid');if(_0x383740&&_0x383740[0x1])_0x3019c7['push'](String(_0x383740[0x1]));}catch(_0x36476f){}});try{const _0x22d52c=_0x73dc19['stagedOutlines'][_0x490d0f(-0x15a,-0x176)](_0x24c63a=>_0x24c63a[_0x490d0f(-0x16b,-0x18c)])['filter'](Boolean),_0x22ae99=_0x22d52c['filter'](_0x19872f=>!JSON['stringify'](_0x4c9551)['includes'](_0x19872f));if(_0x22ae99['length']>0x0)for(const _0x524c2f of _0x22ae99){const _0x425431=_0x73dc19['stagedOutlines']['find'](_0x322643=>_0x322643['uuid']===_0x524c2f);a11_0x17a50a[_0x490d0f(-0x1ba,-0x1d1)](a11_0x263fab['gray']('[BoardCreation][DIAG]\x20missing\x20outline\x20'+_0x524c2f+':\x20fullOutline='+JSON[_0x490d0f(-0x143,-0x152)](_0x425431)));}else a11_0x17a50a['debug'](a11_0x263fab[_0x490d0f(-0x145,-0x18b)]('[BoardCreation][DIAG]\x20all\x20staged\x20outlines\x20present\x20in\x20final_board_contents'));}catch(_0x144235){}}catch(_0x4f7d3b){}const _0x50911e=S['serialize'](_0x237cd6)['replaceAll']('`','\x22');try{const _0x4f37a3=_0x50911e['substring'](0x0,0x4b0);a11_0x17a50a['debug'](a11_0x263fab['gray']('[BoardCreation][DIAG]\x20serialized\x20prefix:\x0a'+_0x4f37a3+'\x0a---'));const _0x4df241=_0x50911e['includes']('(segment'),_0x54e9ef=_0x50911e['includes']('(gr_line');a11_0x17a50a['debug'](a11_0x263fab['gray']('[BoardCreation][DIAG]\x20serialized\x20contains\x20(segment='+_0x4df241+',\x20gr_line='+_0x54e9ef+')'));}catch(_0x394b56){}_0x73dc19['_setPcb'](_0x73dc19['prettyPrintSExpr'](_0x50911e));try{const _0x20a86e=_0x73dc19[_0x490d0f(-0x184,-0x1ab)]??'';a11_0x17a50a['debug'](a11_0x263fab[_0x490d0f(-0x15b,-0x18b)](_0x490d0f(-0x116,-0x151)+_0x20a86e['length']+',\x20contains\x20(segment='+_0x20a86e['includes']('(segment')+',\x20contains\x20(gr_line='+_0x20a86e[_0x490d0f(-0x1c7,-0x1c1)](_0x490d0f(-0x179,-0x150))+')')),a11_0x17a50a['debug'](a11_0x263fab[_0x490d0f(-0x176,-0x18b)](_0x490d0f(-0x18c,-0x14f)+_0x20a86e['substring'](0x0,0x320)+'\x0a---'));}catch(_0x3169e3){}try{if(process[_0x490d0f(-0x16b,-0x14e)]['TYPECAD_DEBUG_BOARD_WRITE']==='1'){const _0x2f57ca='./build/'+_0x73dc19['Boardname']+'.debug.kicad_pcb';a11_0x4d17b1[_0x490d0f(-0x17a,-0x14d)](_0x2f57ca,_0x73dc19['pcb'],{'encoding':'utf8'});const _0x2b9b41=a11_0x4d17b1['readFileSync'](_0x2f57ca,{'encoding':'utf8'});a11_0x17a50a['debug'](a11_0x263fab['gray'](_0x490d0f(-0x10d,-0x14c)+_0x2f57ca+',\x20length='+_0x2b9b41[_0x490d0f(-0x1fd,-0x1d3)]+_0x490d0f(-0x14d,-0x14b)+_0x2b9b41['includes']('(segment')+',\x20gr_line='+_0x2b9b41['includes'](_0x490d0f(-0x197,-0x150))+')'));}}catch(_0x14e644){a11_0x17a50a['error'](a11_0x263fab[_0x490d0f(-0x1e2,-0x1d4)]('[BoardCreation][DIAG]\x20Could\x20not\x20write/read\x20debug\x20PCB\x20file:\x20'+String(_0x14e644)));}}catch(_0x18cbc3){const _0x400f5c=_0x73dc19['getCallSite'](),_0x3cde3a=_0x400f5c?'\x20(called\x20from\x20'+_0x400f5c[_0x490d0f(-0x1e1,-0x1a7)]+':'+_0x400f5c['line']+')':'';console['error'](a11_0x263fab['red']('\x20๐Ÿ‘บ\x20Error:\x20Failed\x20to\x20serialize\x20final\x20board\x20structure:\x20'+_0x18cbc3[_0x490d0f(-0x18f,-0x1a5)]+_0x3cde3a)),_0x73dc19['_setPcb']('');return;}try{a11_0x4d17b1['writeFileSync'](_0x5b386c,_0x73dc19['pcb']);try{const _0x9a7929=a11_0x4d17b1['readFileSync'](_0x5b386c,{'encoding':'utf8'}),_0x17dd9f=_0x9a7929[_0x490d0f(-0x17e,-0x1c1)]('(segment'),_0x2552ad=_0x9a7929['includes']('(gr_line');a11_0x17a50a[_0x490d0f(-0x189,-0x14a)](a11_0x263fab['gray'](_0x490d0f(-0x160,-0x149)+_0x17dd9f+_0x490d0f(-0x175,-0x148)+_0x2552ad));const _0x305c3b=_0x73dc19['stagedOutlines']['slice'](0x0,0xa)['flatMap'](_0x5ce1cb=>(_0x5ce1cb['elements']??[])['map'](_0x3d8e58=>_0x3d8e58['uuid']))['filter'](Boolean),_0x309fe5=_0x305c3b[_0x490d0f(-0x1b1,-0x1d0)](_0x182906=>_0x9a7929['includes'](_0x182906)),_0x108421=_0x305c3b['filter'](_0xad2d21=>!_0x9a7929[_0x490d0f(-0x1c6,-0x1c1)](_0xad2d21));a11_0x17a50a['info'](a11_0x263fab['gray']('[BoardCreation][VERIFY]\x20staged\x20ELEMENT\x20UUIDs\x20present\x20in\x20file:\x20'+_0x309fe5['length']+'/'+_0x305c3b['length'])),a11_0x17a50a['debug'](a11_0x263fab['gray']('[BoardCreation][VERIFY]\x20foundElementUuids='+JSON['stringify'](_0x309fe5)+',\x20missingElementUuids='+JSON['stringify'](_0x108421))),_0x309fe5['length']<_0x305c3b[_0x490d0f(-0x1f7,-0x1d3)]&&a11_0x17a50a[_0x490d0f(-0x1e0,-0x19e)](a11_0x263fab['yellow']('[BoardCreation]